OpenTTD GameScript API 20241220-master-g59680867c3
|
Class to switch current mode to Async Mode. More...
#include <script_asyncmode.hpp>
Public Member Functions | |
GSAsyncMode (bool asynchronous) | |
Creating instance of this class switches the build mode to Asynchronous or Non-Asynchronous (normal). | |
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. |