Age | Commit message (Collapse) | Author |
|
mentioned there)
-Now refit orders are copied when copying orders
-Fixed an initilation issue where CT_INVALID was used instead of CT_NO_REFIT (resulted in crashes in the order window)
-Fixed a compiler warning in the function to load TTD savegames
|
|
longer closed by a window event if the list is empty
The window is now closed when the order is deleted.
This is because removing windows from a window event is asking for problems
|
|
Now it happened again. Somebody got warnings, that I didn't get... I will look into this issue
|
|
(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
|
|
more uniform.
-Cleanup: whitespace alignment of a few tables.
|
|
do not skip vehicles without an order list, because they still can have a current order and/or last visited station, which must be inspected
|
|
|
|
removed when a road or rail depot got deleted (Darkvater and me)
This bug is probably ages old
|
|
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
|
|
|
|
nothing to do
with the Order-pool, but with the place of the order within the vehicle-order
(hence its name) (part of FS#13, blathijs)
|
|
-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)
|
|
- Start using DeleteXXX for every pool item, not manually doing it
- Use some wrapper to improve logic
- Rewrote some pieces to improve logic
|
|
-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
|
|
|
|
invalid ones
-Codechange: use IsValidXXX where ever possible
Note: both changes to prepare for new pool system, which needs those changes.
For every pool there are 2 ugly lines, which will be removed when done
implementing new pool system.
Based on FS#13 by blathijs, partly implemented.
|
|
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
|
|
|
|
|
|
scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
|
|
pool block clean up.
|
|
coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
|
|
reservation in savegames and update where used
- Also add this capability to settings
|
|
|
|
This is used to delete
- all news about a vehicle, when it gets deleted
- "vehicle has stopped in depot" news, when it gets started
- "vehicle has invalid orders" news, when the orders get changed
|
|
-Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory
-Codechange: Increased maximum number of roadstops to 16.
-Fix: Several conditions where a slot becomes unliked from a vehicle
-Codechange: ClearSlot now only takes one parameter, the vehicle
-Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only
-Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around
-Codechange: Adjusted debug levels
TODO: Make the slot finder compatible with (a) pathfinder(s).
|
|
SL_MAX_VERSION
|
|
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements
|
|
|
|
|
|
trains: Use the length of the train before the replacement as reference length
|
|
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
|
|
|
|
-Add: added several hooks (event-callbacks) for road-related-stuff
|
|
'major' version to just: version.
|
|
false; else return true; is confusing
|
|
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
|
|
|
|
|
|
long trains
-Trains will now remember the length of stations it visits and sell cars
when being autoreplaced if they became too long
-If it needs to remove cars, then it starts from the front and sells
all it can find until the train is short enough
-This only works for trains, that knows the station length of the route
so a full uninterrupted run is needed
-a train needs 1-2 runs to detect if the shortest station is expanded
-This feature can be turned on and off in the train replace window
and each company can have it's own setting
-NOTE: minor savegame version bump
|
|
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
|
|
order don't have that order restored (i_dachev). Also disallow non-train type vehicles to have non-stop orders.
|
|
save/load code, static in saveload.c
|
|
|
|
|
|
of GB - should be a bit nicer to read
|
|
off????
- Also simplified/optimized the code.
- Now it uses manhattan distance as an approximation instead of actual distance to find the distance. Much faster.
|
|
|
|
|