equal
deleted
inserted
replaced
38 |
38 |
39 #define MIN_SERVINT_PERCENT 5 |
39 #define MIN_SERVINT_PERCENT 5 |
40 #define MAX_SERVINT_PERCENT 90 |
40 #define MAX_SERVINT_PERCENT 90 |
41 #define MIN_SERVINT_DAYS 30 |
41 #define MIN_SERVINT_DAYS 30 |
42 #define MAX_SERVINT_DAYS 800 |
42 #define MAX_SERVINT_DAYS 800 |
|
43 |
|
44 /** Get the service interval domain. |
|
45 * Get the new proposed service interval for the vehicle is indeed, clamped |
|
46 * within the given bounds. @see MIN_SERVINT_PERCENT ,etc. |
|
47 * @param index proposed service interval |
|
48 */ |
|
49 static inline uint16 GetServiceIntervalClamped(uint index) |
|
50 { |
|
51 return (_patches.servint_ispercent) ? clamp(index, MIN_SERVINT_PERCENT, MAX_SERVINT_PERCENT) : clamp(index, MIN_SERVINT_DAYS, MAX_SERVINT_DAYS); |
|
52 } |
43 |
53 |
44 VARDEF TileIndex _last_built_train_depot_tile; |
54 VARDEF TileIndex _last_built_train_depot_tile; |
45 VARDEF TileIndex _last_built_road_depot_tile; |
55 VARDEF TileIndex _last_built_road_depot_tile; |
46 VARDEF TileIndex _last_built_aircraft_depot_tile; |
56 VARDEF TileIndex _last_built_aircraft_depot_tile; |
47 VARDEF TileIndex _last_built_ship_depot_tile; |
57 VARDEF TileIndex _last_built_ship_depot_tile; |