smatz
61a42f42c1
(svn r16640) -Codechange: move roadstop stuff to separate files
2009-06-23 21:44:48 +00:00
rubidium
8ca2ccc456
(svn r16581) -Codechange: unify the access to Engine::lifelength.
2009-06-16 13:52:18 +00:00
rubidium
ee96d737b2
(svn r16580) -Codechange: rename Engine::image_index to original_image_index to not confuse it with image_index from *VehInfo.
2009-06-16 13:31:06 +00:00
smatz
af85994f7f
(svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check
2009-06-06 16:54:22 +00:00
frosch
c9eac207ea
(svn r16498) -Codechange: Remove hardly used HASBITS.
2009-06-01 15:01:54 +00:00
alberth
580e478e4e
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
2009-06-01 11:43:36 +00:00
frosch
6e06b592ad
(svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more vehicles in more places. Esp. they were only invalidated for trains.
2009-05-31 12:03:14 +00:00
smatz
e419fe6d3f
(svn r16442) -Codechange: use new Vehicle accessors at more places
2009-05-26 22:45:48 +00:00
smatz
0c53f04c07
(svn r16441) -Codechange: new class SpecializedVehicle used as superclass for all vehicle types
2009-05-26 22:10:13 +00:00
yexo
f044ad6f80
(svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them.
2009-05-26 21:59:49 +00:00
rubidium
82cdacb20c
(svn r16427) -Codechange: replace a few magic numbers with an existing constant and unduplicate a few lines.
2009-05-26 08:53:16 +00:00
frosch
eeb3f75cfe
(svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted.
2009-05-24 16:52:42 +00:00
rubidium
cd382b28a3
(svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier.
2009-05-23 09:10:56 +00:00
rubidium
489253b630
(svn r16390) -Codechange: move u.road to RoadVehicle.
2009-05-22 20:22:20 +00:00
rubidium
1ceb349779
(svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate
2009-05-22 20:18:45 +00:00
rubidium
521c265282
(svn r16384) -Codechange: move u.effect to EffectVehicle
2009-05-22 18:56:25 +00:00
rubidium
86fc432293
(svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle.
2009-05-22 18:17:20 +00:00
smatz
70d3ed15c8
(svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted
2009-05-22 13:53:14 +00:00
smatz
512db5248e
(svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get()
2009-05-18 16:21:28 +00:00
rubidium
8df6765823
(svn r16340) -Codechange: introduce SoundID (uint16) and use that instead of SoundFX, which was used as a byte and uint16 at different places, when the uint16 sound ID is meant.
2009-05-17 17:17:48 +00:00
smatz
0c10daa243
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
2009-05-17 01:00:56 +00:00
smatz
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
2009-05-16 23:34:14 +00:00
frosch
2431cc099e
(svn r16303) -Codechange: Use the question mark as default sprite when creating vehicles, instead of arbitrary sprites not related to the vehicle. (though that also applies to the question mark)
2009-05-13 21:45:56 +00:00
smatz
c189a15e3e
(svn r16302) -Codechange: remove Vehicle::AllocateList
2009-05-13 21:38:23 +00:00
frosch
8bb92c110d
(svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code.
2009-05-09 13:37:18 +00:00
rubidium
5c5b357043
(svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible.
2009-04-21 23:40:56 +00:00
rubidium
c3e87f345d
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
2009-03-15 00:32:18 +00:00
frosch
d86e821f53
(svn r15701) -Fix [FS#2595]: Blame NewGRFs returning inconsistent information in purchase-list/after building before users have a chance to blame OpenTTD for incorrectly autorenewing/-replacing.
2009-03-13 21:28:40 +00:00
rubidium
404cff525b
(svn r15677) -Fix [FS#2546]: vehicle images would be determined during the process of moving the vehicle which means that only the (orientation) data for the vehicles in front of it is valid. Now the data for the vehicles behind the vehicle are valid too.
2009-03-11 23:23:08 +00:00
rubidium
b003536ea8
(svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove.
2009-03-11 20:43:14 +00:00
rubidium
77a1323eef
(svn r15671) -Codechange: bit of coding style/clarification.
2009-03-11 15:00:40 +00:00
frosch
90a81da62b
(svn r15654) -Fix: Only ever call any vehicle callbacks after the whole articulated engine has been built. (except 0x16)
2009-03-09 18:56:50 +00:00
rubidium
7c084bb3e6
(svn r15635) -Fix [FS#2707]: don't allow more than 64 road vehicles to reserve a slot at a single road stop. 255 + 1 gives trouble, but 64 is even more than the roadstop would be able to handle within the slot timeout time.
2009-03-07 18:19:53 +00:00
rubidium
251f6f676f
(svn r15596) -Change: road vehicles can stop at stops when they own the stop, not when they own the road/tram track.
2009-03-01 21:48:03 +00:00
frosch
abe4692da2
(svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, which cannot accept CT_INVALID.
...
-Codechange: Add Engine::GetDefaultCargoType() and Engine::CanCarryCargo() and use them.
-Fix [FS#2617]: When articulated parts have no available default cargo, use the cargo type of the first part for livery selection.
-Change: To decide whether a vehicle is refittable do not test its current capacity for being zero, but always use the 'capacity property'.
Note: The property is used unmodifed without calling CB 15/36. By setting it to a non-zero value and returning zero in the callback vehicles can be refitted to/from zero capacity for e.g. livery effects.
Note: It is intentional that you cannot control refittability by CB 36.
2009-02-21 12:52:41 +00:00
frosch
9eb880ab43
(svn r15540) -Fix: Testing of 'only_this' in CmdRefitRoadVeh() could be skipped by 'continue'.
2009-02-21 11:54:25 +00:00
frosch
8eb906dda9
(svn r15534) -Codechange: Rename some variables.
2009-02-20 23:21:04 +00:00
rubidium
5c8cf85613
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
2009-02-09 21:20:05 +00:00
rubidium
89e1afdaa0
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
2009-02-09 02:57:15 +00:00
rubidium
d45d8d23d3
(svn r15375) -Fix [FS#2605]: a tram circling around in a depot did never actually 'enter' the depot.
2009-02-06 15:52:22 +00:00
rubidium
7215e28774
(svn r15374) -Codechange: remove a magic constant.
2009-02-06 15:39:34 +00:00
frosch
f6fa77d5f9
(svn r15358) -Add [NoAI]: AIEventVehicleCrashed::GetCrashReason()
2009-02-05 17:28:37 +00:00
frosch
55728d9e18
(svn r15326) -Fix: Old-ai-ishm when refitting vehicles.
2009-02-03 20:39:06 +00:00
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
2009-01-31 20:16:06 +00:00
frosch
9a0d88176b
(svn r15286) -Fix: Refitting did not invalidate vehicle-colour-maps of road-vehicles, ships and aircraft, as well vehicle-length of road-vehicles.
2009-01-27 19:44:36 +00:00
glx
470da22ac3
(svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication.
2009-01-25 00:57:03 +00:00
glx
12c89708cb
(svn r15210) -Fix: Vehicle::GetRunningCost() was wrong for ships and aircraft
2009-01-22 21:33:08 +00:00
smatz
ca45774160
(svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
...
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
2009-01-13 22:58:03 +00:00
truebrain
c2406cd42d
(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
...
NoAI is an API (a framework) to build your own AIs in. See:
http://wiki.openttd.org/wiki/index.php/AI:Main_Page
With many thanks to:
- glx and Rubidium for their syncing, feedback and hard work
- Yexo for his feedback, patches, and AIs which tested the system very deep
- Morloth for his feedback and patches
- TJIP for hosting a challenge which kept NoAI on track
- All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
2009-01-12 17:11:45 +00:00
rubidium
28ea38ae55
(svn r14949) -Cleanup: pointer coding style
2009-01-10 00:31:47 +00:00