Changeset - r22560:9ceeb1ec6dbe
[Not reviewed]
master
0 1 0
frosch - 7 years ago 2017-03-05 14:43:21
frosch@openttd.org
(svn r27767) -Codechange: Industries and houses should just use the default-case in Action 4.
1 file changed with 0 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/newgrf.cpp
Show inline comments
 
@@ -5465,30 +5465,24 @@ static void FeatureNewName(ByteReader *b
 
			case GSF_SHIPS:
 
			case GSF_AIRCRAFT:
 
				if (!generic) {
 
					Engine *e = GetNewEngine(_cur.grffile, (VehicleType)feature, id, HasBit(_cur.grfconfig->flags, GCF_STATIC));
 
					if (e == NULL) break;
 
					StringID string = AddGRFString(_cur.grffile->grfid, e->index, lang, new_scheme, false, name, e->info.string_id);
 
					e->info.string_id = string;
 
				} else {
 
					AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED);
 
				}
 
				break;
 

	
 
			case GSF_INDUSTRIES: {
 
				AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED);
 
				break;
 
			}
 

	
 
			case GSF_HOUSES:
 
			default:
 
				switch (GB(id, 8, 8)) {
 
					case 0xC4: // Station class name
 
						if (_cur.grffile->stations == NULL || _cur.grffile->stations[GB(id, 0, 8)] == NULL) {
 
							grfmsg(1, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring", GB(id, 0, 8));
 
						} else {
 
							StationClassID cls_id = _cur.grffile->stations[GB(id, 0, 8)]->cls_id;
 
							StationClass::Get(cls_id)->name = AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
 
						}
 
						break;
 

	
 
					case 0xC5: // Station name
0 comments (0 inline, 0 general)