(svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.

This commit is contained in:
peter1138
2007-04-18 18:37:40 +00:00
parent aa284fd531
commit 41cf2fa69b
9 changed files with 73 additions and 14 deletions

View File

@@ -35,6 +35,10 @@ bool UsesWagonOverride(const Vehicle *v);
#define GetCustomVehicleSprite(v, direction) GetCustomEngineSprite(v->engine_type, v, direction)
#define GetCustomVehicleIcon(et, direction) GetCustomEngineSprite(et, NULL, direction)
/* Handler to Evaluate callback 36. If the callback fails (i.e. most of the
* time) orig_value is returned */
uint GetVehicleProperty(const Vehicle *v, uint8 property, uint orig_value);
enum VehicleTrigger {
VEHICLE_TRIGGER_NEW_CARGO = 1,
/* Externally triggered only for the first vehicle in chain */