diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2019-04-22 09:10:04 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-04-29 17:40:22 +0100 |
commit | 5b34c8019f135afd9f20d043a489ab96f286038a (patch) | |
tree | 84b38701d78f2348ad1e54c5cb379fc15bdcfe67 /src/industry_cmd.cpp | |
parent | fcf06ba4c43bb9b7ac0b8541377a5240b3e01126 (diff) | |
download | openttd-5b34c8019f135afd9f20d043a489ab96f286038a.tar.xz |
Codechange: Remove Company/OwnerByte types
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 9978145fa..06c6cde56 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1077,7 +1077,7 @@ static bool SearchLumberMillTrees(TileIndex tile, void *user_data) if (IsTileType(tile, MP_TREES) && GetTreeGrowth(tile) > 2) { ///< 3 and up means all fully grown trees /* found a tree */ - Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE); + Backup<CompanyID> cur_company(_current_company, OWNER_NONE, FILE_LINE); _industry_sound_ctr = 1; _industry_sound_tile = tile; @@ -1436,7 +1436,7 @@ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTil } /* Clear the tiles as OWNER_TOWN to not affect town rating, and to not clear protected buildings */ - Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE); + Backup<CompanyID> cur_company(_current_company, OWNER_TOWN, FILE_LINE); CommandCost ret = DoCommand(cur_tile, 0, 0, DC_NONE, CMD_LANDSCAPE_CLEAR); cur_company.Restore(); @@ -1541,7 +1541,7 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags, /* _current_company is OWNER_NONE for randomly generated industries and in editor, or the company who funded or prospected the industry. * Perform terraforming as OWNER_TOWN to disable autoslope and town ratings. */ - Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE); + Backup<CompanyID> cur_company(_current_company, OWNER_TOWN, FILE_LINE); TILE_AREA_LOOP(tile_walk, ta) { uint curh = TileHeight(tile_walk); @@ -1966,7 +1966,7 @@ CommandCost CmdBuildIndustry(TileIndex tile, DoCommandFlag flags, uint32 p1, uin if (deity_prospect || (_game_mode != GM_EDITOR && _current_company != OWNER_DEITY && _settings_game.construction.raw_industry_construction == 2 && indspec->IsRawIndustry())) { if (flags & DC_EXEC) { /* Prospected industries are build as OWNER_TOWN to not e.g. be build on owned land of the founder */ - Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE); + Backup<CompanyID> cur_company(_current_company, OWNER_TOWN, FILE_LINE); /* Prospecting has a chance to fail, however we cannot guarantee that something can * be built on the map, so the chance gets lower when the map is fuller, but there * is nothing we can really do about that. */ @@ -2128,7 +2128,7 @@ static Industry *PlaceIndustry(IndustryType type, IndustryAvailabilityCallType c */ static void PlaceInitialIndustry(IndustryType type, bool try_hard) { - Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE); + Backup<CompanyID> cur_company(_current_company, OWNER_NONE, FILE_LINE); IncreaseGeneratingWorldProgress(GWP_INDUSTRY); PlaceIndustry(type, IACT_MAPGENERATION, try_hard); @@ -2760,7 +2760,7 @@ void IndustryDailyLoop() return; // Nothing to do? get out } - Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE); + Backup<CompanyID> cur_company(_current_company, OWNER_NONE, FILE_LINE); /* perform the required industry changes for the day */ @@ -2788,7 +2788,7 @@ void IndustryDailyLoop() void IndustryMonthlyLoop() { - Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE); + Backup<CompanyID> cur_company(_current_company, OWNER_NONE, FILE_LINE); _industry_builder.MonthlyLoop(); |