Age | Commit message (Collapse) | Author |
|
(mart3p)
|
|
(mart3p)
|
|
checking its refit mask. If aircraft can be refitted to passengers, no change happens, else the first refittable type is chosen. Also use refit capacity to determine the default capacity.
|
|
CheckStoppedInHangar()
-Fix: Be more strict what it means for an aircraft to be in a hangar: It's not just being stopped on a hangar tile
|
|
lose the cargo onboard (useful when adding wagons to a train)
|
|
|
|
_new_vehicle_id is enough.
|
|
|
|
variations
|
|
and was number of vehicles (of a type, not total) was reached
now the new vehicle gets the same number as the old one, completely removing the problem where we could run out of numbers
since we don't have to find free numbers for the new vehicles, autoreplace should be somewhat faster, specially in late games
NOTE: in CmdBuildRailVehicle(), bit 0 and 1 in p2 have been switched to make the meaning of bit 0 consistent with the other build commands. CmdCloneVehicle() is modified to follow this as well
|
|
so that graphic changes are visible. (mart3p)
|
|
not GUI windows yet) (mart3p)
|
|
avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
|
|
(DaleStan)
|
|
coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
|
|
|
|
|
|
station from a tile
|
|
|
|
codes instead of using this global variable
|
|
|
|
|
|
DiagDirection and friends
|
|
|
|
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
|
|
than one per vehicle type.
|
|
like r3584
|
|
- 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
|
|
newgrf_engine.[ch], and add the new files to project files.
|
|
|
|
due to not being able to build a vehicle. Triggered when cloning a retired design
|
|
- 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)
|
|
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
|
|
blocks to allow use of Random() instead of InteractiveRandom(), which will alleviate some possible network desyncs.
|
|
|
|
engine type directly instead of getting it from a vehicle. This allows the function to be used before vehicles are involved.
|
|
replacement code.
|
|
avoiding function declarations in .c files and unnecessary indirection
|
|
|
|
-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
|
|
|
|
|
|
when nothing was changed
due to the FOR_ALL_VEHICLES(), redrawing those windows are slow
|
|
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
|
|
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)
|
|
commit(3104). Now cargo are removed when refitting (like it should)
|
|
autoreplace needed
|
|
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()
|
|
return values, ... mostly related to the clone vehicle GUI
|
|
this is a complete rewrite, that makes use of existing commands like build and sell
this means that multiheaded train engines are replaced correctly
|