Age | Commit message (Collapse) | Author |
|
ReplaceVehicleWndProc()
|
|
deselect the engine instead of selecting the first in the list (consistent with all other windows)
-Fix: [autoreplace GUI] engine info is now drawn in the right side even if the left list is empty
|
|
info text in the autoreplace window
|
|
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
|
|
locomotives consisting of more than one unit will only be counted once
This also cleaned up the counting loop alot and it will also (hopefully) be faster (didn't benchmark it)
|
|
more uniform.
-Cleanup: whitespace alignment of a few tables.
|
|
to 'data'.
|
|
|
|
every WE_PAINT
-Codechange: Initialize sorting-type on WE_CREATE instead of checking every time.
-Codechange: Update custom vehiclelist_d with standard list_d struct, more static
|
|
superfluous header includes
-Codechange: Unify the Sorting struct both for vehicle-lists and network-lists.
|
|
PlayerVehWndProc() into WE_CREATE
|
|
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.
|