Commit Graph

352 Commits (dbbf71a4e7740259e09deb9c42b6942a239ac012)

Author SHA1 Message Date
peter1138 8b2e4e970a (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported. 18 years ago
bjarni 97210faa75 (svn r6524) -Code cleanup r6515: cleaned up the command to start/stop all 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
18 years ago
glx f03975c251 (svn r6496) -Codechange: removed direct map access in train_cmd.c (Rubidium) 18 years ago
bjarni c545edf46f (svn r6424) -Codechange: [autoreplace] removed a loop though all vehicles 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
18 years ago
Darkvater 7e4d0f112e (svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts
DiagDirections, and add TileOffsByDir that handles Directions.
-Codechange: Make the treeloop use TileOffsByDir().
18 years ago
glx ab5135dd38 (svn r6395) -Fix: when converting a depot from/to elrail, update the power of trains that are in it 18 years ago
rubidium 21ac20aeca (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
-Cleanup: whitespace alignment of a few tables.
18 years ago
Darkvater 52fa30022a (svn r6378) -Codechange: Rename VLW_FLAGS to VLW_MASK as it is a mask 18 years ago
bjarni 21195804c3 (svn r6376) -Codechange: [vehicle refit] moved all refit cost calculations into GetRefitCost()
Now it's possible to tell refit costs for an EngineID without actually having build a vehicle
18 years ago
bjarni fa7309cded (svn r6356) -Fix: FS#263 planes come out of hangar and drive back into hangar
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
18 years ago
tron d5e5a78cf4 (svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as 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
18 years ago
bjarni 5a86b502c2 (svn r6352) -Fix: FS#322 Send to depot bug
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
18 years ago
bjarni 14e8615cf2 (svn r6304) -Codechange r6295: Use !! instead of (bool) in commands to send vehicles to depots 18 years ago
bjarni 545584ec51 (svn r6295) -Feature: using goto depot with a different control selection will now alter the service/stopping in depot flag instead of cancelling the goto depot order 18 years ago
bjarni 71da9f3abc (svn r6291) -Feature: Vehicle lists from the station window now also got the 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)
18 years ago
bjarni 1d011b57d2 (svn r6246) -Feature: added the many times requested "send all vehicle to 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
18 years ago
bjarni 386468dc72 (svn r6229) -Feature: Shared order lists now got a "goto depot" button
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
18 years ago
rubidium 86dc219b4b (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 18 years ago
rubidium 0ce4de99dc (svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments. 18 years ago
bjarni 422d073910 (svn r6165) -Feature: control click Goto Depot will now make the vehicle service
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
18 years ago
Darkvater 4f00dd7400 (svn r6159) -Fix: FindClosestTrainDepot hardly ever found a depot with NPF off due to absence of distance-normalization (Rojer) 18 years ago
truelight 65f5ec13f6 (svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
-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)
18 years ago
truelight 213c71be3f (svn r6053) -Codechange: renamed all IsXXXIndex to IsValidXXXID
-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
18 years ago
truelight bdc1d681a7 (svn r6052) -Codechange: change OrderType (order->type) in a typedef
-Codechange: renamed DeleteDestinationFromVehicleOrder to RemoveOrderFromAllVehicles to reflect his function better
-Codechange: changed the params of RemoveOrderFromAllVehicles, to avoid unneeded variable-creation
18 years ago
rubidium 908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 18 years ago
rubidium db397d5a75 (svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant. 18 years ago
rubidium e87e065e41 (svn r5926) -Codechange: make _cur_year contain the full year, instead of 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
18 years ago
rubidium 9fc837ad85 (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
bjarni db57e88d45 (svn r5854) -Fix: [elrails] now electric engines are stopped if they enter a 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
18 years ago
bjarni 1e47593786 (svn r5853) -Fix: [elrails] FS#178 Electric Trains can leave Conventional Depot
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
18 years ago
peter1138 8048e8c5bd (svn r5822) - NewGRF: add support for callback 31, vehicle start/stop check. 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. 18 years ago
peter1138 53d2650d9b (svn r5819) - NewGRF: add support for refit costs specified in NewGRF. This may affect the default refit costs for the default rail vehicles. 18 years ago
Darkvater 3deee7318e (svn r5665) - Codechange: check pointers against NULL, coding style, tabulation; nothing serious. 18 years ago
bjarni 1ee788c0fb (svn r5664) -Fix: [SF 1518090 ] moving train engines in depot - crash (svn 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
18 years ago
tron 3c368fc05e (svn r5624) Use {IsPlainRailTile,IsRailDepot,IsRailWaypoint,HasSignals}() instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes 18 years ago
peter1138 34e18cbdfe (svn r5427) - Codechange: testing for "== true" is redundant. 18 years ago
peter1138 33f1abc620 (svn r5240) - NewGRF: when there is more than one engine in a consist, base livery overrides and powered wagon weight/power on the last engine before the wagon. 18 years ago
peter1138 9b043436d8 (svn r5187) - NewGRF: temporarily change a vehicle's cargo subtype when calling the refit capacity callback. 18 years ago
bjarni 0372cceb2f (svn r5176) fixing the typo, that should have been fixed in last commit 18 years ago
bjarni c4fe960ebf (svn r5175) -Fix: [autoreplace] FS#186 autoreplaced trains can leave all wagons in depot
also fixed a serious typo in peter1138's comments
18 years ago
tron 7fd88e5798 (svn r5155) - Remove the bridge branch merge (revision r5070) 18 years ago
peter1138 20cdd71c9f (svn r5105) - NewGRF: Move callbackmask from *VehicleInfo to EngineInfo. This simplifies code that works with more than one vehicle type. 18 years ago
peter1138 18b0ea5473 (svn r5104) - When refitting a vehicle to its existing cargo type, don't lose the cargo onboard (useful when adding wagons to a train) 18 years ago
peter1138 2802c4b9c6 (svn r5103) - Add cargo subtype parameter to refit commands (mart3p) 18 years ago
tron 9ee944cabb (svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough. 18 years ago
KUDr 6b1f0d610c (svn r5093) -CodeChange: [YAPF] min. debug level changed from 1 to 3 and 4 for frequent debug messages (performance stats) 18 years ago
peter1138 c1df13f299 (svn r5071) - Fix (FS#184): "Erroneous train reversal on waypoints". When processing the next train order, do not even consider reversing the train if the last order was to a waypoint. 18 years ago
celestar b618b75c9b (svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above:
	Any railway track combination (excluding depots and waypoints)
	Any road combination (excluding depots)
	Clear tiles (duh), including fields
	Tunnel entrances
	Bridge heads

Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing

There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
18 years ago
celestar 53cc2673ab (svn r5064) -Fix: Remove stay debug stuff from lat commit. (thanks peter1138) 18 years ago
celestar 0b72bcdcaa (svn r5063) -Codechange: Add a function to determine the length of a platform (request by KUDr) 18 years ago