Pausing the game is causing a malfunction when building objects.
I can solve this with a boolian function that lets me know if the game is paused.
example:
is_pause ()
If the game is paused the script is paused also. What exactly is the malfunction?
Quote from: Dwachs on October 18, 2020, 09:26:32 AMIf the game is paused the script is paused also. What exactly is the malfunction?
The "is_work_allowed_here" function keeps working even if the game is paused.
What I want to do is show a warning message that says "Advance is not allowed with the game paused." Every time the player tries to use a tool with the game paused, is it possible to do this?.
in r 9303
Great, it works as expected, thank you very much!. 8)
There is a problem that I could not notice at first, using "debug.is_paused ()" causes simutrans to pause, this should not happen. :-[
will fix tonight.
In script/api/api_control.cc line 90 replace pause_game by is_game_paused
Quote from: Dwachs on October 19, 2020, 06:54:27 AM
will fix tonight.
In script/api/api_control.cc line 90 replace pause_game by is_game_paused
Excellent, now it works perfect. :)
I want to do an experiment, is it possible to do the same with the underground view tool ?, so I can try to fix a small problem in the underground constructions.
bool is_game_paused()
{
tool_pause_t t;
return t.is_selected();
}