-This means that one company can only have one setting for renew and replacing
more clients will not fight due to different settings anymore
-This is a needed step in the line to fix autoreplacing dualheaded locomotives
NOTE: savegame revision bump (peter1138 + me in coop)
- Fix: [refitting] The refit window now shows the correct refit options for the entire consist. Only if at least one of the vehicles in the train can be refitted to a certain cargo, it is shown in the list.
- Fix: [refitting] When refitting to a cargo which is already carried by some vehicles in the consist, the capacities of those vehicles are taken into account when calculating the new capacity of the train in the refit window.
- Add: GetVehicleTrackdir() helper function.
- Codechange: Moved SortStruct from vehicle_gui.h to ttd.h, so the dependency from vehicle.h on vehicle_gui.h could be removed.
- Codechange: Typedeffed the VehicleTypes struct so it can be used as the type for Vehicle.type instead of "byte".
- Codechange: Removed prototype for VehicleSorter(), which had no implementation anymore and was never called.
- I also changed an order of strings from On, Off to Off, On, so this can be used ingame with the WWT_4 widget type.
- Since the newssettings now take 2 bits per setting (off/summary/on) _news_display_opt is widened to 32 bits and the settings code changed slightly to accomodate for a maximum of 16 message-types.
This will make things more difficult as narrow curves
and depots impose rather strict speed limits. Feedback welcome
For those who don't like low-speed curves: Switch it off
This bug was not triggered by the current code, but it's easier to code new features if you do not have to think about such limitations
like you can't hide an item in the middle of the list ;)
-Codechange: renamed all 'schedule' stuff to 'order(list)'
-Codechange: moved all order-stuff to order_cmd.c / order.h
-Codechange: vehicles that share orders are now linked to eachother
with next_shared/prev_shared in Vehicle
Developers: please use AssignOrder to assign data to an order. If not,
you _WILL_ make the save-routine to assert!
(in prepare of dynamic arrays):
- DEREF_XXX is changed into GetXXX
- All direct call are directed via GetXXX
- struct Industry has now an index-field
- ENUM'd some stuff
- Replaced home built loops with FOR_ALL_XXX
- Added _stations_size, _vehicles_size, ... which gives the length of the
array (which will be dynamic in the near future)
- Changed lengtof(XXX) to _XXX_size (e.g. _stations_size)
- Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX)
- Made the sort-functions of all 4 dynamic
- Made all 4 Initialize functions more of the same
- Some minor tab-fixing and stuff
(tnx to Tron for proof-reading my 100kb patch ;))
Note for all: please do NOT directly call _stations, _vehicles, _towns and
_industries, but use the right wrapper to access them. Thank you.
Ps: please also do not use 'v++', where v is of type Vehicle *.
Note: If people could watch out for initialising structs with
*non-constants* in future... it's a bit annoying, I
know, but Open Watcom isn't the only compiler which
doesn't support this (yet) - Borland, for example,
still doesn't like it.
- Replaced "WP(w,replaceveh_d).line_height" with
"w->resize.step_height" since they needed to be the same anyway
- Cleaned the code a litte for readability (like correct tabbing)
- Added company color to replace vehicle windows to make them look like
the rest of the vehicle windows and made the caption text white (also to
fit the standard)
--This line, and those below, will be ignored--
M vehicle_gui.c
M lang/english.txt
M window.h
This feature works much like autorenew, but it will get you a new engine type instead of a new one of the same type. Once
ordered, it will automatically replace the engines while they visits a depot. The GUI for setting this up have been added on the
vehicle overview windows
Note: autorenew is now autoreplace, but to the same engine type
Nice new features, that was added to make this possible
- windows can now have two independant vertical scrollbars
- CMD_SHOW_NO_ERROR have been added as a flag for DoCommandP. It will make it do the action instead of showing the red box with
estimated costs even if shift is pressed
- fixed problem where enginetypes where not initialized when loading a game. It's now done in InitializeGame()