Static Public Member Functions |
static function | GetOpenTTDVersion () |
| Get current OpenTTD version.
|
static function | HasWorldGenBug () |
| Checks if the OpenTTD version that execute your script has the bug that APIs that perform a DoCommand (world modifying actions) will carry out the action, but return the same value as in test mode.
|
static function | GetSuperLibVersion () |
static function | PrintLibInfo (log_level=_SuperLib_Log.LVL_INFO) |
static function | Trim (string) |
static function | SplitString (delimiter, string, limit=null) |
static function | FindFromEnd (substr, string, startidx=null) |
static function | FindCharFromEnd (findchar, string, startidx=null) |
static function | GetCurrentDateString () |
static function | GetDateString (date) |
static function | SetSign (tile, message, force_build_sign=false) |
static function | BreakPoint (sign_tile, force_break_point=false) |
static function | HasSign (text) |
static function | GetSign (text) |
static function | HasSignAt (tile) |
static function | GetSignAt (tile) |
static function | ClearAllSigns (except_tile=-1) |
static function | GetPAXCargo () |
static function | GetMailCargo () |
static function | GetCargoWithLargestAvailabilityInLargestTown (cargo_list) |
static function | GetTownProducedCargoList () |
static function | GetTownAcceptedCargoList () |
static function | ItemValuator (a) |
static function | Valuate (list, valuator,...) |
| Apply a valuator function to every item of an AIList.
|
static function | CallFunction (func, args) |
| Call a function with the arguments given.
|
static function | ListValueSum (ai_list) |
static function | CopyListSwapValuesAndItems (old_list) |
static function | GetListMinValue (ai_list) |
static function | GetListMaxValue (ai_list) |
static function | SquirrelListToAIList (squirrel_list) |
static function | ArrayFind (array, toFind) |
static function | Min (x1, x2) |
static function | Max (x1, x2) |
static function | Clamp (x, min, max) |
static function | Abs (a) |
function _SuperLib_Helper::HasWorldGenBug |
( |
| ) |
|
|
static |
Checks if the OpenTTD version that execute your script has the bug that APIs that perform a DoCommand (world modifying actions) will carry out the action, but return the same value as in test mode.
Eg. it will just return id 0 for all things that you create.
If this method returns true, you should call AIController.Sleep(1) to terminate world generation and start the game, before calling any API method that perform a DoCommand, and where you use the return value in any way.
This bug is further described here in the bug tracker: http://bugs.openttd.org/task/5561