Changeset - r26687:39a66c00d4a4
[Not reviewed]
master
0 1 0
Peter Nelson - 21 months ago 2022-12-18 12:27:26
peter1138@openttd.org
Change: Support engine property 0xC6 in purchase list.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/newgrf_engine.cpp
Show inline comments
 
@@ -975,6 +975,8 @@ static uint32 VehicleGetVariable(Vehicle
 
			case 0x92: return Clamp(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 0xFFFF); // Date of last service
 
			case 0x93: return GB(Clamp(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 0xFFFF), 8, 8);
 
			case 0xC4: return Clamp(_cur_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR; // Build year
 
			case 0xC6: return Engine::Get(this->self_type)->grf_prop.local_id;
 
			case 0xC7: return GB(Engine::Get(this->self_type)->grf_prop.local_id, 8, 8);
 
			case 0xDA: return INVALID_VEHICLE; // Next vehicle
 
			case 0xF2: return 0; // Cargo subtype
 
		}
0 comments (0 inline, 0 general)