File diff r7191:b6964312d678 → r7192:543ddd0c4867
src/newgrf_station.cpp
Show inline comments
 
@@ -375,13 +375,13 @@ static uint32 StationGetVariable(const R
 
			case 0x46:
 
			case 0x47:
 
			case 0x49: return 0x2110000;       // Platforms, tracks & position
 
			case 0x42: return 0;               // Rail type (XXX Get current type from GUI?)
 
			case 0x43: return _current_player; // Station owner
 
			case 0x44: return 2;               // PBS status
 
			case 0xFA: return max(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0); // Build date
 
			case 0xFA: return clamp(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); // Build date, clamped to a 16 bit value
 
		}
 

	
 
		*available = false;
 
		return UINT_MAX;
 
	}
 

	
 
@@ -417,13 +417,13 @@ static uint32 StationGetVariable(const R
 
		case 0xF0: return st->facilities;
 
		case 0xF1: return st->airport_type;
 
		case 0xF2: return st->truck_stops->status;
 
		case 0xF3: return st->bus_stops->status;
 
		case 0xF6: return st->airport_flags;
 
		case 0xF7: return GB(st->airport_flags, 8, 8);
 
		case 0xFA: return max(st->build_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0);
 
		case 0xFA: return clamp(st->build_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535);
 
	}
 

	
 
	/* Handle cargo variables with parameter, 0x60 to 0x65 */
 
	if (variable >= 0x60 && variable <= 0x65) {
 
		CargoID c = GetCargoTranslation(parameter, object->u.station.statspec->grffile);