Age | Commit message (Collapse) | Author |
|
PlayerVehWndProc()
This is possible now that the window number is known when running WE_CREATE and it's a nicer solution
|
|
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)
|
|
|
|
vehicle list windows
this list is also used by mass goto depot to ensure that they use the same vehicles
right now only the list of all vehicles use this for goto depot, but eventually all the types will use this
|
|
|
|
|
|
resizing to smaller windows (AsterixMG)
|
|
vehicle list windows (spotted by Darkvater)
|
|
(forgot to disable the button in this condition)
-Code cleanup r6246: simplified SendAllVehiclesToDepot() and moved an { in PlayerVehWndProc()
|
|
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
|
|
one is not used in any other files either (Thanks Tron for pointing this out)
|
|
any other files anymore
added window_type to arguments and used it to replace an if cascade with a switch case
|
|
|
|
w->resize.step_height
it was only used twice, so there was no reason to calculate it for each event
|
|
code to delete an empty shared orders list is now much simpler
cleaned up the code to handle button clicks
fixed an assert if widget 9 was pressed on a list with vehicles for another company
|
|
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
|
|
the window
Since the order is no more, the player will not need that particular window anymore
this could happen if the player opened the window and then sold all the vehicles (or crashed them)
A crash could happen if a new order gets the same (now freed) OrderID and the vehicle using it is not of the same type as the window expect
|
|
this makes the list type detection much easier and allowed an if cascade to be turned into a switch case
this also makes it easier to add more list types
|
|
Player(vehicle)WndProc into PlayerVehWndProc
Those 4 unified functions were really much alike, so there was no reason to have so much dublicated code
|
|
{' -> '} else {', tabs between code and comment, etc.
|
|
'/*' or '*/' in '//' style comments.
|
|
8) with SHARE_FLAG
|
|
the list is available in the orders window and looks like the list buttons from the station windows (small vehicle)
The button is disabled if the vehicle do not have any shared orders or it got shared orders, but an empty order list
based on a patch by nycom, thought it ended up getting heavily modified
Thanks to TrueLight for proofreading and suggestions
|
|
-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)
|
|
(or, will do that).
It isn't the best name, but we couldn't find any better.
This unifies the pool-system even more.
|
|
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
|
|
of r5907.
|
|
fix some bogus warnings on MSVC by using (void*) casts
|
|
|
|
code. Less code, less data, simply better
|
|
date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
|
|
list for road vehicles, aircraft and ships.
|
|
|
|
better than raw numbers
|
|
vehicle purchase windows.
|
|
Fixes FS#106
|
|
the left list, and only the selected rail type in the right list, to
allow converting electric engines to non-electric.
|
|
_*_vehicle_info[]; create and use a function to retrieve data, and ensure constness.
|
|
code and proofreading, thanks to peter1138 for another lot of code and ideas.
|
|
function call for drawing of vehicles.
|
|
|
|
|
|
Reduce variable scope, remove write-only variables, turn do-while-loops with multiple induction variables into canonical for-loops
|
|
|
|
- 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
|
|
shuffling order of rail vehicle purchase list (and replace vehicle list)
|
|
currently ALL available wagons are displayed in the right menu in the replace window
however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying
Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
|
|
(based on meush's work)
|
|
newgrf_engine.[ch], and add the new files to project files.
|
|
|