Age | Commit message (Collapse) | Author |
|
VehicleEnterDepot()
This revealed duplicated code like aircraft lists got invalidated twice
Moved invalidation of the vehicle detail window to VehicleServiceInDepot() as it should always be updated when serviced
|
|
(can only be done in goto depot orders)
Example: make a train transport iron ore from A to B, then it visits a depot and refits to steel
It then transport steel back to A or near A if there is a factory and then it visits another depot to refit to iron ore again
This is controlled in the orders. If a goto depot order is lightlighted, then "Unload" changes to "Refit"
Control click "Refit" removes the refit part of the order (as the tooltip says)
The player will still pay the normal refit costs
Known issues:
If a vehicle is not in a depot, then the refit window will fail to tell refitted cargo capacity
Refit costs in the refit window can sometimes print 0 when it should not because the refit calculation is unaware that the vehicle will be refitted in between
Warning: autoreplace got a protection against replacing something so you get a new cargo type, but it can fail here. In the iron ore/steel example, it can see that
the vehicle carries iron ore and the new one can be refitted to iron ore, then it will replace. It will not check to see that it's valid for steel as well.
This is something to look into in the future
|
|
may change.
|
|
priority isn't supported.
|
|
vehicles in a depot.
IsWholeTrainInDepot() is removed as CheckTrainInDepot() could be used instead
Cleaned up the check to see if a vehicle is valid for start/stop
|
|
|
|
from each time the window is redrawn
To do this, the player struct contains an array, that contains the count of each engine type that the player owns
Those arrays are updated each time a vehicle is build or deleted and is calculated on load (it's not saved)
It's possible to access the arrays outside of the autoreplace GUI, so feel free to read from them in other patches as well
|
|
it accepts
DiagDirections, and add TileOffsByDir that handles Directions.
-Codechange: Make the treeloop use TileOffsByDir().
|
|
of trains that are in it
|
|
more uniform.
-Cleanup: whitespace alignment of a few tables.
|
|
|
|
into GetRefitCost()
Now it's possible to tell refit costs for an EngineID without actually having build a vehicle
|
|
Now all vehicles are serviced when it's time for service and they are in a depot
This will avoid the goto depot order from ever showing up when in a depot
|
|
large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
|
|
now vehicles can't be sent to a depot when they are already inside a depot
before they would remember the order and try to turn around when leaving the depot
|
|
vehicles to depots
|
|
will now alter the service/stopping in depot flag instead of cancelling the goto depot order
|
|
goto depot button
-Codechange: unified the code for mass goto depot to avoid duplicated code
-Fix: Vehicles already on the way to depots will not be cancelled by mass goto depot (made it really hard to send all vehicles at once)
|
|
depot" button
it's located in the vehicle list screen and does the same as in the shared orders window (send all vehicles in list to a depot)
it will still not inform the player if a vehicle failed to find a depot, so don't take for granted that all of them go
|
|
this will try to send all vehicles in the list to depots/hangars
currently if one fails to find a depot, it will not tell the player
|
|
{' -> '} else {', tabs between code and comment, etc.
|
|
'/*' or '*/' in '//' style comments.
|
|
at the depot and leave right away.
To tell the difference the status of stopping vehicles will be in red,
while servicing vehicles will be green.
-Codechange: remove some dead code in CmdSendAircraftToHangar() since it is
conflicting with new functionality. Now p2 means the same for all types
|
|
off due to absence of distance-normalization (Rojer)
|
|
-Codechange: introduced DestinationID, which is in fact an union of several types
Used in Order struct, so no longer StationID is abused for all targets.
Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
|
|
-Codechange: IsValidXXXID now also checks if XXX is really valid, not if the number is within range
Both changes again in preperation of the new mem-pool system, which requires this.
IsValidXXXID is not a bit less pretty, but that will be cleaned up after the new mem-pool system
|
|
-Codechange: renamed DeleteDestinationFromVehicleOrder to RemoveOrderFromAllVehicles to reflect his function better
-Codechange: changed the params of RemoveOrderFromAllVehicles, to avoid unneeded variable-creation
|
|
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
|
|
|
|
the offset since 1920
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
|
|
date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
|
|
non-electrified depot even if they would have left right away if the depot had catenary
this solves the issue where electric engines in a certain situation could leave non-electrified depots, turn around and enter all the time
|
|
now the user will get an error if he tries to start the train and the status bar will say "no power" instead of "stopped"
Electric trains already driving in and out of non-electrified depots will still do so, but you can't start new ones
|
|
This allows a set to disallow a vehicle from being started, i.e. to not be able to leave the depot. This is almost a partner to callback 1D.
|
|
may affect the default refit costs for the default rail vehicles.
|
|
tabulation; nothing serious.
|
|
r5463)
this was present long before 5463
Darkvater deserves some of the credit for this fix since he discovered where the first pointer got set incorrectly
|
|
instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes
|
|
|
|
livery overrides and powered wagon weight/power on the last engine before the wagon.
|
|
calling the refit capacity callback.
|
|
|
|
wagons in depot
also fixed a serious typo in peter1138's comments
|
|
|
|
This simplifies code that works with more than one vehicle type.
|
|
lose the cargo onboard (useful when adding wagons to a train)
|
|
|
|
_new_vehicle_id is enough.
|
|
for frequent debug messages (performance stats)
|
|
processing the next train order, do not even consider reversing the train if the last order was to a waypoint.
|