--- a/src/engine.h Fri May 11 15:13:08 2007 +0000
+++ b/src/engine.h Fri May 25 00:25:08 2007 +0000
@@ -105,6 +105,7 @@
byte refit_cost;
byte misc_flags;
byte callbackmask;
+ byte retire_early; ///< Number of years early to retire vehicle
};
struct Engine {
@@ -119,7 +120,7 @@
PlayerByte preview_player;
byte preview_wait;
byte player_avail;
- byte type; ///< type, ie VEH_ROAD, VEH_TRAIN, etc. Same as in vehicle.h
+ VehicleType type; ///< type, ie VEH_ROAD, VEH_TRAIN, etc. Same as in vehicle.h
};
/**
@@ -271,6 +272,7 @@
EngineID from;
EngineID to;
EngineRenew *next;
+ GroupID group_id;
};
/**
@@ -316,7 +318,7 @@
* @return The engine type to replace with, or INVALID_ENGINE if no
* replacement is in the list.
*/
-EngineID EngineReplacement(EngineRenewList erl, EngineID engine);
+EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group);
/**
* Add an engine replacement to the given renewlist.
@@ -326,7 +328,7 @@
* @param flags The calling command flags.
* @return 0 on success, CMD_ERROR on failure.
*/
-int32 AddEngineReplacement(EngineRenewList* erl, EngineID old_engine, EngineID new_engine, uint32 flags);
+int32 AddEngineReplacement(EngineRenewList* erl, EngineID old_engine, EngineID new_engine, GroupID group, uint32 flags);
/**
* Remove an engine replacement from a given renewlist.
@@ -335,12 +337,12 @@
* @param flags The calling command flags.
* @return 0 on success, CMD_ERROR on failure.
*/
-int32 RemoveEngineReplacement(EngineRenewList* erl, EngineID engine, uint32 flags);
+int32 RemoveEngineReplacement(EngineRenewList* erl, EngineID engine, GroupID group, uint32 flags);
/** When an engine is made buildable or is removed from being buildable, add/remove it from the build/autoreplace lists
* @param type The type of engine
*/
-void AddRemoveEngineFromAutoreplaceAndBuildWindows(byte type);
+void AddRemoveEngineFromAutoreplaceAndBuildWindows(VehicleType type);
/* Engine list manipulators - current implementation is only C wrapper of CBlobT<EngineID> class (helpers.cpp) */
void EngList_Create(EngineList *el); ///< Creates engine list