Commit Graph

143 Commits

Author SHA1 Message Date
rubidium b00a5f1069 (svn r18330) -Cleanup: remove some unneeded includes 2009-11-28 20:35:25 +00:00
frosch d507136e04 (svn r18268) -Feature: [NewGRF] Make price base multipliers related to vehicles only apply to the GRF locally, if it defines engines of that type itself. 2009-11-24 13:15:58 +00:00
frosch 912bce0b8c (svn r18266) -Codechange: Add a function to compute prices from price base and cost factor and use it consistently for vehicle purchase, running cost, and refit cost. 2009-11-24 13:12:34 +00:00
rubidium c2221885f4 (svn r18027) -Codechange: make some unneededly global variables static and remove some unused variables 2009-11-09 09:59:35 +00:00
frosch 6ca8f6e380 (svn r18011) -Feature(ette): [NewGRF] CB 36 for roadvehicle property 09 'running cost factor'. 2009-11-08 13:02:05 +00:00
frosch ba1fc280e3 (svn r18005) -Codechange: Convert the Prices struct into an array and an enum. 2009-11-07 22:47:54 +00:00
frosch 67cae40ec1 (svn r17926) -Fix (r9352): Make the decision whether aircraft carry mail consistent. Now always the cargo class decides. 2009-10-31 17:48:09 +00:00
frosch 83894809d0 (svn r17897) -Fix [FS#3255]: CB15 and CB36 (capacity) were not always called when they should.
-Codechange: Move capacity calculation to a single function for all vehicle types, so the behaviour can be kept consistent easier.
2009-10-28 18:31:16 +00:00
frosch 59195a6f20 (svn r17758) -Revert (r17208): Use assert_compile() if you cannot count.
-Fix (r7326): Powernaut Helicopter got wrong 'load amount'.
-Fix (r2639): Call the Evil by its name.
2009-10-10 18:48:13 +00:00
frosch f3aacb8fe3 (svn r17725) -Codechange: Reduce usage of EngInfo and XxxVehInfo, esp. when a Engine * is already present. 2009-10-06 19:17:07 +00:00
frosch b243f6ca97 (svn r17700) -Codechange: Integrate ShipVehicleInfo::refittable into EngineInfo::refit_mask during initialisation. 2009-10-04 20:33:18 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
frosch e261d8d9a0 (svn r17616) -Codechange [FS#3222]: Enumerize properties used in callback 0x36. Based on Terkhen's work. 2009-09-22 19:28:57 +00:00
rubidium 04d5b67eb6 (svn r17567) -Fix: some doxygen warnings 2009-09-18 14:23:58 +00:00
rubidium 64bafcbe18 (svn r17534) -Codechange: unify the naming of callback masks/flags 2009-09-14 12:22:57 +00:00
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 2009-09-13 19:15:59 +00:00
alberth 1ba000be12 (svn r17327) -Codechange: Allow external use of GetEngineCategoryName(). 2009-08-30 17:54:11 +00:00
rubidium cd6da9ef01 (svn r17296) -Fix/feature [FS#3152]: allow rail wagons to be build when only el rail engines are available 2009-08-27 19:47:50 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
frosch 8bd029015e (svn r17209) -Codechange: Move cargo_type from (Rail|Road|Ship)VehicleInfo to EngineInfo. 2009-08-17 18:33:48 +00:00
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 2009-08-05 17:59:21 +00:00
rubidium 4b2592dbc0 (svn r17062) -Change: unify the naming of some 125 strings 2009-08-04 18:04:33 +00:00
frosch 20c1e42be1 (svn r16929) -Change: There is no point in not randomising engine introduction-date before 1922. Instead disable the randomisation for the first two years after game-start, so you do not have to wait for the first engine. 2009-07-23 18:45:53 +00:00
rubidium 9980af2898 (svn r16921) -Codechange: make it more clear what strings are related to road vehicles; only ROAD isn't always enough. Also unify the way of writing it. 2009-07-22 22:44:56 +00:00
smatz b6960e4e17 (svn r16814) -Codechange: make IsNormalAircraft() member of Aircraft 2009-07-13 16:37:27 +00:00
smatz 868c21cbcc (svn r16813) -Codechange: make IsEngineCountable() member of Vehicle 2009-07-13 16:35:22 +00:00
yexo 44c15e4196 (svn r16647) -Codechange: remove newgrf.h include from newgrf_engine.h to prevent unnecessary inclusion newgrf.h anyway 2009-06-24 21:33:11 +00:00
rubidium 35aabc1d4c (svn r16586) -Codechange: don't store lifelength in the savegame; it can easily be calculated, it isn't used often and now changing extend_vehicle_life in game has some effect. 2009-06-17 17:13:30 +00:00
rubidium 512b021e26 (svn r16581) -Codechange: unify the access to Engine::lifelength. 2009-06-16 13:52:18 +00:00
rubidium 4b05617c42 (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
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 2009-06-01 11:43:36 +00:00
frosch a4557c7da4 (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 2009-05-24 16:52:42 +00:00
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 2009-05-22 15:13:50 +00:00
smatz 70aab8bf04 (svn r16354) -Codechange: use 'new' pool accessors and methods for Engine too 2009-05-18 19:32:16 +00:00
smatz ed1e54bd84 (svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize() 2009-05-16 23:44:36 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
rubidium 59d45a04d6 (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
frosch 6dd04a9a78 (svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere. 2009-03-18 19:32:13 +00:00
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 2009-03-14 18:16:29 +00:00
frosch 987e72f4f2 (svn r15645) -Fix (r12924)[FS#2612]: Add an EngineOverrideManager to give the term 'compatible newgrf' again some sense and to not crash because of trivial changes. 2009-03-08 16:51:08 +00:00
frosch e01106f66b (svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part. 2009-02-27 20:40:39 +00:00
frosch d3850e101c (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
rubidium a5f30dd553 (svn r15521) -Codechange: add helper function to get the display tractive effort of a vehicle. 2009-02-19 09:45:44 +00:00
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 2009-02-09 21:20:05 +00:00
peter1138 748d4d2fb9 (svn r15412) -Fix: Clearing custom engine names could cause desyncs due to be client-side only; GUI parts of save/load of custom engine names also removed as it was never implemented. 2009-02-08 12:58:14 +00:00
frosch de9a6fc90b (svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions. 2009-02-01 17:14:39 +00:00
frosch c28c4c1986 (svn r15306) -Codechange: Deduplicate code by adding Engine::GetDisplayMaxSpeed(), GetPower() and GetDisplayWeight(). (and using them) 2009-02-01 16:10:06 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
glx c1cf3934fa (svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication. 2009-01-25 00:57:03 +00:00
glx e8b5f49861 (svn r15261) -Add: added Engine::GetRunningCost() to remove some code duplication. Also stops AIs decrementing vehicle counter of first company 2009-01-24 20:14:15 +00:00