diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-03 17:15:48 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 549caca39cebc8c988f4e51d79d353cab4646d58 (patch) | |
tree | 6739fb0721fae36d6fc58eabd4be642062386dee /src/town_gui.cpp | |
parent | b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2 (diff) | |
download | openttd-549caca39cebc8c988f4e51d79d353cab4646d58.tar.xz |
Codechange: Move command arguments to the back of the networked command function calls.
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r-- | src/town_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp index a4bb24063..9082fc7b3 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -287,7 +287,7 @@ public: } case WID_TA_EXECUTE: - DoCommandP(this->town->xy, this->window_number, this->sel_index, CMD_DO_TOWN_ACTION | CMD_MSG(STR_ERROR_CAN_T_DO_THIS)); + DoCommandP(CMD_DO_TOWN_ACTION | CMD_MSG(STR_ERROR_CAN_T_DO_THIS), this->town->xy, this->window_number, this->sel_index); break; } } @@ -474,12 +474,12 @@ public: _warn_town_no_roads = true; } - DoCommandP(0, this->window_number, 0, CMD_EXPAND_TOWN | CMD_MSG(STR_ERROR_CAN_T_EXPAND_TOWN)); + DoCommandP(CMD_EXPAND_TOWN | CMD_MSG(STR_ERROR_CAN_T_EXPAND_TOWN), 0, this->window_number, 0); break; } case WID_TV_DELETE: // delete town - only available on Scenario editor - DoCommandP(0, this->window_number, 0, CMD_DELETE_TOWN | CMD_MSG(STR_ERROR_TOWN_CAN_T_DELETE)); + DoCommandP(CMD_DELETE_TOWN | CMD_MSG(STR_ERROR_TOWN_CAN_T_DELETE), 0, this->window_number, 0); break; } } @@ -561,7 +561,7 @@ public: { if (str == nullptr) return; - DoCommandP(0, this->window_number, 0, CMD_RENAME_TOWN | CMD_MSG(STR_ERROR_CAN_T_RENAME_TOWN), nullptr, str); + DoCommandP(CMD_RENAME_TOWN | CMD_MSG(STR_ERROR_CAN_T_RENAME_TOWN), 0, this->window_number, 0, str); } }; @@ -1162,8 +1162,8 @@ public: if (strcmp(buf, this->townname_editbox.text.buf) != 0) name = this->townname_editbox.text.buf; } - bool success = DoCommandP(tile, this->town_size | this->city << 2 | this->town_layout << 3 | random << 6, - townnameparts, CMD_FOUND_TOWN | CMD_MSG(errstr), cc, name); + bool success = DoCommandP(CMD_FOUND_TOWN | CMD_MSG(errstr), cc, + tile, this->town_size | this->city << 2 | this->town_layout << 3 | random << 6, townnameparts, name); /* Rerandomise name, if success and no cost-estimation. */ if (success && !_shift_pressed) this->RandomTownName(); |