|
|
|
@ -2769,16 +2769,13 @@ static void FeatureNewName(byte *buf, int len)
|
|
|
|
|
|
|
|
|
|
len -= (int)name_length;
|
|
|
|
|
|
|
|
|
|
if (name_length == 1) {
|
|
|
|
|
grfmsg(7, "FeatureNewName: Can't add empty name");
|
|
|
|
|
} else {
|
|
|
|
|
grfmsg(8, "FeatureNewName: %d <- %s", id, name);
|
|
|
|
|
grfmsg(8, "FeatureNewName: 0x%04X <- %s", id, name);
|
|
|
|
|
|
|
|
|
|
switch (feature) {
|
|
|
|
|
case GSF_TRAIN:
|
|
|
|
|
case GSF_ROAD:
|
|
|
|
|
case GSF_SHIP:
|
|
|
|
|
case GSF_AIRCRAFT: {
|
|
|
|
|
case GSF_AIRCRAFT:
|
|
|
|
|
if (id < TOTAL_NUM_ENGINES) {
|
|
|
|
|
StringID string = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_8000_KIRBY_PAUL_TANK_STEAM + id);
|
|
|
|
|
SetCustomEngineName(id, string);
|
|
|
|
@ -2786,7 +2783,6 @@ static void FeatureNewName(byte *buf, int len)
|
|
|
|
|
AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, id);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case GSF_TOWNHOUSE:
|
|
|
|
|
default:
|
|
|
|
@ -2808,14 +2804,13 @@ static void FeatureNewName(byte *buf, int len)
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0xC9: { // House name
|
|
|
|
|
case 0xC9: // House name
|
|
|
|
|
if (_cur_grffile->housespec == NULL || _cur_grffile->housespec[GB(id, 0, 8)] == NULL) {
|
|
|
|
|
grfmsg(1, "FeatureNewName: Attempt to name undefined house 0x%X, ignoring.", GB(id, 0, 8));
|
|
|
|
|
} else {
|
|
|
|
|
_cur_grffile->housespec[GB(id, 0, 8)]->building_name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case 0xD0:
|
|
|
|
|
case 0xDC:
|
|
|
|
@ -2850,7 +2845,6 @@ static void FeatureNewName(byte *buf, int len)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Action 0x05 */
|
|
|
|
|
static void GraphicsNew(byte *buf, int len)
|
|
|
|
|