Mercurial > hg > openttd
changeset 13102:f5a5aaceaea7 draft
(svn r17603) -Codechange: since now, towns are 'founded' instead of 'built'
author | smatz <smatz@openttd.org> |
---|---|
date | Mon, 21 Sep 2009 18:16:00 +0000 |
parents | 98ee0c6f5ea5 |
children | 1a431d89ef83 |
files | src/callback_table.cpp src/command.cpp src/command_type.h src/gui.h src/industry_gui.cpp src/lang/english.txt src/toolbar_gui.cpp src/town_cmd.cpp src/town_gui.cpp |
diffstat | 9 files changed, 18 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/callback_table.cpp +++ b/src/callback_table.cpp @@ -37,7 +37,7 @@ CommandCallback CcPlaySound10; CommandCallback CcPlaceSign; CommandCallback CcTerraform; -CommandCallback CcBuildTown; +CommandCallback CcFoundTown; CommandCallback CcGiveMoney; /* rail_gui.cpp */ @@ -77,7 +77,7 @@ /* 0x06 */ CcBuildLoco, /* 0x07 */ CcBuildRoadVeh, /* 0x08 */ CcBuildShip, - /* 0x09 */ CcBuildTown, + /* 0x09 */ CcFoundTown, /* 0x0A */ CcBuildRoadTunnel, /* 0x0B */ CcBuildRailTunnel, /* 0x0C */ CcBuildWagon,
--- a/src/command.cpp +++ b/src/command.cpp @@ -146,7 +146,7 @@ DEF_COMMAND(CmdSellShareInCompany); DEF_COMMAND(CmdBuyCompany); -DEF_COMMAND(CmdBuildTown); +DEF_COMMAND(CmdFoundTown); DEF_COMMAND(CmdRenameTown); DEF_COMMAND(CmdDoTownAction); @@ -296,7 +296,7 @@ {CmdSellShareInCompany, 0}, // CMD_SELL_SHARE_IN_COMPANY {CmdBuyCompany, 0}, // CMD_BUY_COMANY - {CmdBuildTown, CMD_OFFLINE}, // CMD_BUILD_TOWN + {CmdFoundTown, CMD_OFFLINE}, // CMD_FOUND_TOWN {CmdRenameTown, CMD_SERVER}, // CMD_RENAME_TOWN {CmdDoTownAction, 0}, // CMD_DO_TOWN_ACTION
--- a/src/command_type.h +++ b/src/command_type.h @@ -242,7 +242,7 @@ CMD_SELL_SHARE_IN_COMPANY, ///< sell a share from a company CMD_BUY_COMPANY, ///< buy a company which is bankrupt - CMD_BUILD_TOWN, ///< build a town + CMD_FOUND_TOWN, ///< found a town CMD_RENAME_TOWN, ///< rename a town CMD_DO_TOWN_ACTION, ///< do a action from the town detail window (like advertises or bribe)
--- a/src/gui.h +++ b/src/gui.h @@ -80,7 +80,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transport_type, byte bridge_type); void ShowBuildIndustryWindow(); -void ShowBuildTownWindow(); +void ShowFoundTownWindow(); void ShowMusicWindow();
--- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -343,7 +343,7 @@ this->HandleButtonClick(DPIW_FUND_WIDGET); if (Town::GetNumItems() == 0) { - ShowErrorMessage(STR_ERROR_MUST_BUILD_TOWN_FIRST, STR_ERROR_CAN_T_GENERATE_INDUSTRIES, 0, 0); + ShowErrorMessage(STR_ERROR_MUST_FOUND_TOWN_FIRST, STR_ERROR_CAN_T_GENERATE_INDUSTRIES, 0, 0); } else { extern void GenerateIndustries(); _generating_world = true; @@ -378,7 +378,7 @@ /* Show error if no town exists at all */ if (Town::GetNumItems() == 0) { SetDParam(0, indsp->name); - ShowErrorMessage(STR_ERROR_MUST_BUILD_TOWN_FIRST, STR_ERROR_CAN_T_BUILD_HERE, pt.x, pt.y); + ShowErrorMessage(STR_ERROR_MUST_FOUND_TOWN_FIRST, STR_ERROR_CAN_T_BUILD_HERE, pt.x, pt.y); return; }
--- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2026,9 +2026,9 @@ # Town generation window (SE) STR_FOUND_TOWN_CAPTION :{WHITE}Town Generation STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}New Town -STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Construct new town +STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Found new town STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Random Town -STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Build town in random location +STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Found town in random location STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Many random towns STR_FOUND_TOWN_RANDOM_TOWNS_TOOLTIP :{BLACK}Cover the map with randomly placed towns @@ -3279,7 +3279,7 @@ # Town related errors STR_ERROR_CAN_T_GENERATE_TOWN :{WHITE}Can't build any towns STR_ERROR_CAN_T_RENAME_TOWN :{WHITE}Can't rename town... -STR_ERROR_CAN_T_BUILD_TOWN_HERE :{WHITE}Can't build town here... +STR_ERROR_CAN_T_FOUND_TOWN_HERE :{WHITE}Can't found town here... STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP_SUB :{WHITE}... too close to edge of map STR_ERROR_TOO_CLOSE_TO_ANOTHER_TOWN :{WHITE}... too close to another town STR_ERROR_TOO_MANY_TOWNS :{WHITE}... too many towns @@ -3292,7 +3292,7 @@ STR_ERROR_CAN_T_BUILD_HERE :{WHITE}Can't build {STRING} here... STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY :{WHITE}Can't construct this industry type here... STR_ERROR_INDUSTRY_TOO_CLOSE :{WHITE}... too close to another industry -STR_ERROR_MUST_BUILD_TOWN_FIRST :{WHITE}... must build town first +STR_ERROR_MUST_FOUND_TOWN_FIRST :{WHITE}... must found town first STR_ERROR_ONLY_ONE_ALLOWED_PER_TOWN :{WHITE}... only one allowed per town STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS_WITH_POPULATION_OF_1200 :{WHITE}... can only be built in towns with a population of at least 1200 STR_ERROR_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}... can only be built in rainforest areas
--- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -827,7 +827,7 @@ { w->HandleButtonClick(TBSE_TOWNGENERATE); SndPlayFx(SND_15_BEEP); - ShowBuildTownWindow(); + ShowFoundTownWindow(); } static void ToolbarScenGenIndustry(Window *w)
--- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1596,7 +1596,7 @@ * @param text unused * @return the cost of this operation or an error */ -CommandCost CmdBuildTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) +CommandCost CmdFoundTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { /* Only in the scenario editor */ if (_game_mode != GM_EDITOR) return CMD_ERROR;
--- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -840,7 +840,7 @@ new TownDirectoryWindow(&_town_directory_desc); } -void CcBuildTown(bool success, TileIndex tile, uint32 p1, uint32 p2) +void CcFoundTown(bool success, TileIndex tile, uint32 p1, uint32 p2) { if (success) { SndPlayTileFx(SND_1F_SPLAT, tile); @@ -1032,12 +1032,12 @@ { uint32 townnameparts; if (!GenerateTownName(&townnameparts)) { - ShowErrorMessage(STR_ERROR_TOO_MANY_TOWNS, STR_ERROR_CAN_T_BUILD_TOWN_HERE, 0, 0); + ShowErrorMessage(STR_ERROR_TOO_MANY_TOWNS, STR_ERROR_CAN_T_FOUND_TOWN_HERE, 0, 0); return; } DoCommandP(tile, this->town_size | this->city << 2 | this->town_layout << 3, townnameparts, - CMD_BUILD_TOWN | CMD_MSG(STR_ERROR_CAN_T_BUILD_TOWN_HERE), CcBuildTown); + CMD_FOUND_TOWN | CMD_MSG(STR_ERROR_CAN_T_FOUND_TOWN_HERE), CcFoundTown); } virtual void OnPlaceObjectAbort() @@ -1054,7 +1054,7 @@ NULL, _nested_found_town_widgets, lengthof(_nested_found_town_widgets) ); -void ShowBuildTownWindow() +void ShowFoundTownWindow() { if (_game_mode != GM_EDITOR && !Company::IsValidID(_local_company)) return; AllocateWindowDescFront<FoundTownWindow>(&_found_town_desc, 0);