OpenTTD GameScript API
20240906-master-gd5ff6b4156
|
Class to switch current mode to Async Mode. More...
Public Member Functions | |
GSAsyncMode (bool asynchronous) | |
Creating instance of this class switches the build mode to Asynchronous or Non-Asynchronous (normal). More... | |
Class to switch current mode to Async Mode.
If you create an instance of this class, the mode will be switched to either Asynchronous or Non-Asynchronous mode. The original mode is stored and recovered from when ever the instance is destroyed. In Asynchronous mode all the commands you execute are queued for later execution. The system checks if it would be able to execute your requests, and returns what the cost would be. The actual cost and whether the command succeeded when the command is eventually executed may differ from what was reported to the script.
GSAsyncMode::GSAsyncMode | ( | bool | asynchronous | ) |
Creating instance of this class switches the build mode to Asynchronous or Non-Asynchronous (normal).
asynchronous | Whether the new mode should be Asynchronous, if true, or Non-Asynchronous, if false. |