Merge branch 'master' into jgrpp
# Conflicts: # projects/openttd_vs140.vcxproj.filters # projects/openttd_vs141.vcxproj.filters # projects/openttd_vs142.vcxproj.filters # src/base_consist.h # src/company_base.h # src/newgrf_config.cpp # src/newgrf_config.h # src/openttd.cpp # src/saveload/saveload.cpp # src/saveload/saveload.h # src/saveload/station_sl.cpp # src/settings.cpp # src/signs_base.h # src/string.cpp # src/string_func.h # src/table/misc_settings.ini # src/table/settings.h.preamble # src/town_cmd.cpp # src/vehicle.cpp # src/vehicle_cmd.cpp # src/video/cocoa/cocoa_v.mm # src/video/null_v.cpp
This commit is contained in:
@@ -722,20 +722,20 @@ bool AfterLoadGame()
|
||||
if (IsSavegameVersionBefore(SLV_84)) {
|
||||
for (Company *c : Company::Iterate()) {
|
||||
c->name = CopyFromOldName(c->name_1);
|
||||
if (c->name != nullptr) c->name_1 = STR_SV_UNNAMED;
|
||||
if (!c->name.empty()) c->name_1 = STR_SV_UNNAMED;
|
||||
c->president_name = CopyFromOldName(c->president_name_1);
|
||||
if (c->president_name != nullptr) c->president_name_1 = SPECSTR_PRESIDENT_NAME;
|
||||
if (!c->president_name.empty()) c->president_name_1 = SPECSTR_PRESIDENT_NAME;
|
||||
}
|
||||
|
||||
for (Station *st : Station::Iterate()) {
|
||||
st->name = CopyFromOldName(st->string_id);
|
||||
/* generating new name would be too much work for little effect, use the station name fallback */
|
||||
if (st->name != nullptr) st->string_id = STR_SV_STNAME_FALLBACK;
|
||||
if (!st->name.empty()) st->string_id = STR_SV_STNAME_FALLBACK;
|
||||
}
|
||||
|
||||
for (Town *t : Town::Iterate()) {
|
||||
t->name = CopyFromOldName(t->townnametype);
|
||||
if (t->name != nullptr) t->townnametype = SPECSTR_TOWNNAME_START + _settings_game.game_creation.town_name;
|
||||
if (!t->name.empty()) t->townnametype = SPECSTR_TOWNNAME_START + _settings_game.game_creation.town_name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2780,11 +2780,11 @@ bool AfterLoadGame()
|
||||
* highest possible number to get them numbered in the
|
||||
* order they have in the pool. */
|
||||
for (Waypoint *wp : Waypoint::Iterate()) {
|
||||
if (wp->name != nullptr) wp->town_cn = UINT16_MAX;
|
||||
if (!wp->name.empty()) wp->town_cn = UINT16_MAX;
|
||||
}
|
||||
|
||||
for (Waypoint* wp : Waypoint::Iterate()) {
|
||||
if (wp->name != nullptr) MakeDefaultName(wp);
|
||||
if (!wp->name.empty()) MakeDefaultName(wp);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user