summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
AgeCommit message (Collapse)Author
2006-03-26(svn r4120) Use the new station functions where appropriatetron
2006-03-24(svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the ↵tron
station from a tile
2006-03-12(svn r3832) Replace some magic numbers by (Diag)Direction enumstron
2006-03-12(svn r3829) Reduce the use of _error_message by directly returning error ↵tron
codes instead of using this global variable
2006-03-08(svn r3786) More work for DirDifftron
2006-03-08(svn r3784) Add a type and functions to handle direction changestron
2006-03-08(svn r3783) Replace further ints and magic numbers by Direction, ↵tron
DiagDirection and friends
2006-03-04(svn r3758) Remove the news validation callback. It is superseded by r3757.tron
2006-03-04(svn r3757) -Feature: Delete news items about vehicles, when they get staletron
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
2006-02-11(svn r3588) - Refit: Use only one global to return the refit capacity rather ↵peter1138
than one per vehicle type.
2006-02-10(svn r3585) Similar changes to the order handlers of the other vehicle types ↵tron
like r3584
2006-02-06(svn r3564) Several smaller changes:tron
- 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
2006-02-03(svn r3524) - Split newgrf features from engine.[ch] into ↵peter1138
newgrf_engine.[ch], and add the new files to project files.
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-01-18(svn r3402) -Fix: [building/cloning] added a string telling if build failed ↵bjarni
due to not being able to build a vehicle. Triggered when cloning a retired design
2006-01-12(svn r3396) - Autoreplace changes:peter1138
- Change fixed array per player to a single pool. This avoids future problems with vehicle numbers and decreases savegame size. Engine replacements from previous savegames will be lost. - Move engine replacement code from players.c to engine.c. (thanks to blathijs for rewriting this)
2006-01-05(svn r3367) Unify the 4 distinct ↵tron
CMD_CHANGE_{AIRCRAFT,ROADVEH,SHIP,TRAIN}_SERVICE_INT commands into one CMD_CHANGE_SERVICE_INT command. As side effect this is a -Fix: The default AI tried to change the service intervals of vehicles via the CMD_CHANGE_TRAIN_SERVICE_INT command - regardless of the type of the vehicle - which of course failed for non-trains
2005-12-28(svn r3352) - NewGRF: Move initialization of vehicle random_bits to DC_EXEC ↵peter1138
blocks to allow use of Random() instead of InteractiveRandom(), which will alleviate some possible network desyncs.
2005-12-14(svn r3297) Staticisetron
2005-11-29(svn r3248) - Codechange: Change interface of CanRefitTo() to supply the ↵peter1138
engine type directly instead of getting it from a vehicle. This allows the function to be used before vehicles are involved.
2005-11-26(svn r3239) - Codechange: Introduce and use helper functions for engine ↵peter1138
replacement code.
2005-11-16(svn r3204) Make handling of clicking on vehicles a bit less ugly by ↵tron
avoiding function declarations in .c files and unnecessary indirection
2005-11-16(svn r3196) Use structs instead of magic offsets into arraystron
2005-11-14(svn r3181) -Bracingtron
-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
2005-11-14(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBITtron
2005-11-13(svn r3172) static, consttron
2005-11-08(svn r3156) -Fix: removed some cases where autoreplace windows were redrawn ↵bjarni
when nothing was changed due to the FOR_ALL_VEHICLES(), redrawing those windows are slow
2005-11-05(svn r3138) -Fix: [clone vehicles] fixed assert when it was possible to ↵bjarni
allocate some vehicles to clone a train, but not for all cars Now it gives "too many vehicles" error message instead To make this work, AllocateVehicles() needed to be moved to vehicle.c (from aircraft_cmd.c) and made non-static
2005-10-31(svn r3111) -Fix: [autoreplace] [ 1341783 ] Assertion failure in vehicle.c ↵bjarni
line 378 running MaybeReplaceVehicle() is now delayed until after the loop in CallVehicleTicks() This avoids selling the vehicle the loop currently works with (and continues to work with afterwards)
2005-10-30(svn r3105) readded 2 line that should not have been removed in last ↵bjarni
commit(3104). Now cargo are removed when refitting (like it should)
2005-10-30(svn r3104) -Codechange: [refit] removed now obsolite code that the old ↵bjarni
autoreplace needed
2005-10-29(svn r3101) -Codechange: added _new_vehicle_idbjarni
this var works like _new_train_id and the rest of that kind of vars, except it is set each time a vehicle is build, nomatter what type this is a nice tool to code vehicle independent code, which in turn can reduce code duplication Right now it's used in ReplaceVehicle() and CmdCloneVehicle()
2005-10-28(svn r3098) static, const, uint -> TileIndex, indentation, bracing, unused ↵tron
return values, ... mostly related to the clone vehicle GUI
2005-10-24(svn r3081) -Codechange: [autoreplace] complete rewrite of autoreplacebjarni
this is a complete rewrite, that makes use of existing commands like build and sell this means that multiheaded train engines are replaced correctly
2005-10-23(svn r3078) Some more stuff, which piled up:tron
- 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
2005-10-15(svn r3046) Replace some numbers with sprite names and fix a typo in the ↵tron
sprite list
2005-10-11(svn r3030) More work for GB/SB, this time concerning the waiting_acceptance ↵tron
attribute of stations
2005-10-03(svn r3010) Get rid of quite some dubious casts, either by using GB(), ↵tron
proper types or just removing them
2005-10-01(svn r3003) Change int, uint, uin16 and byte to EngineID where appropriate, ↵tron
plus some related changes (mostly casts)
2005-09-30(svn r3001) s/Player*/const Player*/tron
s/byte/PlayerID/ s/int/PlayerID/ and related changes
2005-09-26(svn r2990) Remove _engine_original_sprites and replace all uses with ↵peter1138
references to our (new) original engine/vehicle tables.
2005-09-13(svn r2949) The AI no longer needs to 'cheat' to build aircraft; eg it ↵Darkvater
builds them now from a hangar. Also, to query the price of a new aircraft tile information is not needed
2005-09-13(svn r2948) -Fix: the old AI needs a special flag that triggers all kind of ↵truelight
special abilities you really don't want to know about (free bridges, etc..) I removed this flag some revisions ago, but the Aircraft part depends on it, so I re-enabled it again..
2005-08-25(svn r2890) Fix some signed/unsigned comparison warnings (tokai)tron
2005-08-08(svn r2842) Fix bug with aircraft autoreplace (peter1138)ludde
2005-08-06(svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to ↵bjarni
serverside -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)
2005-07-31(svn r2764) -Feature: Clone vehiclesbjarni
-This allows a player to clone an excisting vehicle of his own -[fix]: this uncovered an excisting bug in CmdBuildRailVehicle() where depots could build trains of the wrong track type. This is fixed -Thanks to Celestar for drawing the sprites and _luca_ for including them in openttd.grf
2005-07-28(svn r2732) -Codechange: Cleaned the order flags some more. Hit some ↵celestar
inconsistencies while trying to locate bug 1244167
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron