Codechange: Template script command calls.

This commit is contained in:
Michael Lutz
2021-11-01 21:30:34 +01:00
parent eab18f06a4
commit 6691ee3b96
30 changed files with 310 additions and 185 deletions

View File

@@ -12,17 +12,18 @@
#include "../../command_type.h"
#include "../../settings_type.h"
#include "../../network/network.h"
#include "../../misc_cmd.h"
#include "../../safeguards.h"
/* static */ bool ScriptGame::Pause()
{
return ScriptObject::DoCommand(0, PM_PAUSED_GAME_SCRIPT, 1, CMD_PAUSE);
return ScriptObject::Command<CMD_PAUSE>::Do(0, PM_PAUSED_GAME_SCRIPT, 1, {});
}
/* static */ bool ScriptGame::Unpause()
{
return ScriptObject::DoCommand(0, PM_PAUSED_GAME_SCRIPT, 0, CMD_PAUSE);
return ScriptObject::Command<CMD_PAUSE>::Do(0, PM_PAUSED_GAME_SCRIPT, 0, {});
}
/* static */ bool ScriptGame::IsPaused()