Codechange: Use std::string for most of the user-settable custom names.
This commit is contained in:
@@ -62,8 +62,7 @@ void MoveBuoysToWaypoints()
|
||||
TileIndex xy = st->xy;
|
||||
Town *town = st->town;
|
||||
StringID string_id = st->string_id;
|
||||
char *name = st->name;
|
||||
st->name = nullptr;
|
||||
std::string name = st->name;
|
||||
Date build_date = st->build_date;
|
||||
/* TTDPatch could use "buoys with rail station" for rail waypoints */
|
||||
bool train = st->train_station.tile != INVALID_TILE;
|
||||
@@ -176,7 +175,7 @@ static const SaveLoad _old_station_desc[] = {
|
||||
SLE_CONDNULL(1, SL_MIN_VERSION, SLV_4), ///< alpha_order
|
||||
|
||||
SLE_VAR(Station, string_id, SLE_STRINGID),
|
||||
SLE_CONDSTR(Station, name, SLE_STR | SLF_ALLOW_CONTROL, 0, SLV_84, SL_MAX_VERSION),
|
||||
SLE_CONDSSTR(Station, name, SLE_STR | SLF_ALLOW_CONTROL, SLV_84, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(Station, indtype, SLE_UINT8, SLV_103, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(Station, had_vehicle_of_type, SLE_FILE_U16 | SLE_VAR_U8, SL_MIN_VERSION, SLV_122),
|
||||
SLE_CONDVAR(Station, had_vehicle_of_type, SLE_UINT8, SLV_122, SL_MAX_VERSION),
|
||||
@@ -389,7 +388,7 @@ static const SaveLoad _base_station_desc[] = {
|
||||
SLE_VAR(BaseStation, xy, SLE_UINT32),
|
||||
SLE_REF(BaseStation, town, REF_TOWN),
|
||||
SLE_VAR(BaseStation, string_id, SLE_STRINGID),
|
||||
SLE_STR(BaseStation, name, SLE_STR | SLF_ALLOW_CONTROL, 0),
|
||||
SLE_SSTR(BaseStation, name, SLE_STR | SLF_ALLOW_CONTROL),
|
||||
SLE_VAR(BaseStation, delete_ctr, SLE_UINT8),
|
||||
SLE_VAR(BaseStation, owner, SLE_UINT8),
|
||||
SLE_VAR(BaseStation, facilities, SLE_UINT8),
|
||||
|
Reference in New Issue
Block a user