Update to 1.11.0-beta1
This commit is contained in:
@@ -97,6 +97,7 @@ CommandProc CmdInsertOrder;
|
||||
CommandProc CmdChangeServiceInt;
|
||||
|
||||
CommandProc CmdBuildIndustry;
|
||||
CommandProc CmdIndustryCtrl;
|
||||
|
||||
CommandProc CmdSetCompanyManagerFace;
|
||||
CommandProc CmdSetCompanyColour;
|
||||
@@ -170,6 +171,7 @@ CommandProc CmdShowStoryPage;
|
||||
CommandProc CmdRemoveStoryPage;
|
||||
CommandProc CmdRemoveStoryPageElement;
|
||||
CommandProc CmdScrollViewport;
|
||||
CommandProc CmdStoryPageButton;
|
||||
|
||||
CommandProc CmdLevelLand;
|
||||
|
||||
@@ -264,6 +266,8 @@ static const Command _command_proc_table[] = {
|
||||
DEF_CMD(CmdChangeServiceInt, 0, CMDT_VEHICLE_MANAGEMENT ), // CMD_CHANGE_SERVICE_INT
|
||||
|
||||
DEF_CMD(CmdBuildIndustry, CMD_DEITY, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_INDUSTRY
|
||||
DEF_CMD(CmdIndustryCtrl, CMD_STR_CTRL | CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_INDUSTRY_CTRL
|
||||
|
||||
DEF_CMD(CmdSetCompanyManagerFace, 0, CMDT_OTHER_MANAGEMENT ), // CMD_SET_COMPANY_MANAGER_FACE
|
||||
DEF_CMD(CmdSetCompanyColour, 0, CMDT_OTHER_MANAGEMENT ), // CMD_SET_COMPANY_COLOUR
|
||||
|
||||
@@ -330,6 +334,7 @@ static const Command _command_proc_table[] = {
|
||||
DEF_CMD(CmdRemoveStoryPage, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_REMOVE_STORY_PAGE
|
||||
DEF_CMD(CmdRemoveStoryPageElement, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_REMOVE_STORY_ELEMENT_PAGE
|
||||
DEF_CMD(CmdScrollViewport, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_SCROLL_VIEWPORT
|
||||
DEF_CMD(CmdStoryPageButton, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_STORY_PAGE_BUTTON
|
||||
|
||||
DEF_CMD(CmdLevelLand, CMD_ALL_TILES | CMD_NO_TEST | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_LEVEL_LAND; test run might clear tiles multiple times, in execution that only happens once
|
||||
|
||||
@@ -425,7 +430,7 @@ bool IsCommandAllowedWhilePaused(uint32 cmd)
|
||||
CMDPL_NO_ACTIONS, ///< CMDT_SERVER_SETTING
|
||||
CMDPL_NO_ACTIONS, ///< CMDT_CHEAT
|
||||
};
|
||||
assert_compile(lengthof(command_type_lookup) == CMDT_END);
|
||||
static_assert(lengthof(command_type_lookup) == CMDT_END);
|
||||
|
||||
assert(IsValidCommand(cmd));
|
||||
return _game_mode == GM_EDITOR || command_type_lookup[_command_proc_table[cmd & CMD_ID_MASK].type] <= _settings_game.construction.command_pause_level;
|
||||
@@ -573,7 +578,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
|
||||
int x = TileX(tile) * TILE_SIZE;
|
||||
int y = TileY(tile) * TILE_SIZE;
|
||||
|
||||
if (_pause_mode != PM_UNPAUSED && !IsCommandAllowedWhilePaused(cmd)) {
|
||||
if (_pause_mode != PM_UNPAUSED && !IsCommandAllowedWhilePaused(cmd) && !estimate_only) {
|
||||
ShowErrorMessage(GB(cmd, 16, 16), STR_ERROR_NOT_ALLOWED_WHILE_PAUSED, WL_INFO, x, y);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user