1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it.

This commit is contained in:
hackykid
2005-06-06 00:19:24 +00:00
parent 09aadafda1
commit 1018d3b786
8 changed files with 249 additions and 180 deletions

View File

@@ -588,6 +588,16 @@ int GetCustomEngineSprite(byte engine, const Vehicle *v, byte direction)
return r;
}
/**
* Check if a wagon is currently using a wagon override
* @param v The wagon to check
* @return true if it is using an override, false otherwise
*/
bool UsesWagonOverride(const Vehicle *v) {
assert(v->type == VEH_Train);
return (GetWagonOverrideSpriteSet(v->engine_type, v->u.rail.first_engine) != NULL);
}
/**
* Evaluates a newgrf callback
* @param callback_info info about which callback to evaluate