yexo
b00726a5d2
(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
11c7c258dd
(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
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
alberth
580e478e4e
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
2009-06-01 11:43:36 +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
smatz
50624d5c0f
(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
6636ed7589
(svn r16354) -Codechange: use 'new' pool accessors and methods for Engine too
2009-05-18 19:32:16 +00:00
smatz
cf986c3099
(svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize()
2009-05-16 23:44:36 +00:00
smatz
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
2009-05-16 23:34:14 +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
frosch
c297a99eff
(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
f3e0fd7416
(svn r15711) -Codechange: lots of whitespace cleanup/fixes
2009-03-14 18:16:29 +00:00
frosch
959c297fb9
(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
da78726e0c
(svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part.
2009-02-27 20:40:39 +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
rubidium
02c52430c8
(svn r15521) -Codechange: add helper function to get the display tractive effort of a vehicle.
2009-02-19 09:45:44 +00:00
rubidium
5c8cf85613
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
2009-02-09 21:20:05 +00:00
peter1138
5429c5a095
(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
61a893d6fd
(svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions.
2009-02-01 17:14:39 +00:00
frosch
9c2ba4f96a
(svn r15306) -Codechange: Deduplicate code by adding Engine::GetDisplayMaxSpeed(), GetPower() and GetDisplayWeight(). (and using them)
2009-02-01 16:10:06 +00:00
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
2009-01-31 20:16:06 +00:00
glx
470da22ac3
(svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication.
2009-01-25 00:57:03 +00:00
glx
9b73303b4d
(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
smatz
f0ff90d71c
(svn r15216) -Feature: native support for Transport Tycoon (Original) savegames. Based on SVXConverter's source code and documentation by Roman Vetter
2009-01-23 02:35:17 +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
smatz
c5db2ea181
(svn r14958) -Codechange [FS#1923]: when checking for unique names, compare only with manually set names
...
There are situations that aren't solvable (because of different language files), so if the user really wants to have duplicated name, allow him to do so. It solves desyncs between server and clients using different languages. It behaves the same in SP and MP, so users won't see the different behaviour as a bug (and even checking in SP could be worked around by the user).
2009-01-10 15:54:07 +00:00
peter1138
544e04fe62
(svn r14926) -Feature: Automatically set last engine ageing year to the last 'introduction year plus half model life', to allow engines later than 2050 to appear.
2009-01-08 21:48:59 +00:00
smatz
91233ea596
(svn r14828) -Codechange: move most of save/load-specific code to separate files
2009-01-04 15:32:25 +00:00
rubidium
e83cca7d13
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
2008-12-28 14:37:19 +00:00
rubidium
bf6ec8b19f
(svn r14735) -Codechange: remove a bit of bit-waste in the map array (without changing the map array) and make the CompanyIDs contiguous.
...
-Note: 15 should be enough for now... making it any more means adding more bytes to the map array and thus wasting more bits instead of reducing the bit waste.
2008-12-24 09:53:15 +00:00
rubidium
e6ff168508
(svn r14732) -Codechange: replace some magic number with less magic constants and use the proper type for a few variables.
2008-12-23 21:03:43 +00:00
rubidium
2e916a154f
(svn r14683) -Change: only say a engine/vehicle is refittable when it can be refitted to at least two cargo type or when it has subcargos.
...
NOTE: it is still possible that a vehicle is marked refittable when there is nothing to refit to, e.g. when only one subcargo is available but that cannot be determined without a vehicle chain.
2008-12-16 22:02:12 +00:00
frosch
1fa409177c
(svn r14680) -Feature(ette) [FS#2434]: Use property 4 (model life) also for wagons.
...
Setting property 4 to 0xFF will protect the vehicle (engine or wagon) from expireing. (Necessary since early introduction dates)
Savegames will only be affected after 'resetengines'.
2008-12-16 18:09:40 +00:00
rubidium
e589c7e580
(svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
2008-09-30 20:51:04 +00:00
rubidium
f56e630e5c
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
2008-09-30 20:39:50 +00:00
smatz
e543181b12
(svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies)
2008-09-15 19:02:50 +00:00
frosch
869e90ea86
(svn r14313) -Codechange: Move functions dealing with the EngineRenew pool to their own file.
2008-09-13 15:49:29 +00:00
peter1138
2e0d735f1f
(svn r14182) -Fix: After applying NewGRF settings, all rail and road types were available as the engine availability check was performed too early.
2008-08-28 19:53:25 +00:00
rubidium
8dffbcfd26
(svn r14064) -Fix [FS#1752]: check for the length of strings (in bytes) in the command. Checking for the length in pixels is impossible because that differs per client.
2008-08-13 06:22:04 +00:00
peter1138
ba8905fd2c
(svn r13825) -Revert (r13821 partially): preview_player_rank wasn't a PlayerByte value in r12143, and still isn't a PlayerByte value.
2008-07-25 17:33:53 +00:00
rubidium
fae2695854
(svn r13821) -Codechange: replace some uint8/bytes with more specificly named typedefs and replace a few magic numbers.
2008-07-25 10:00:03 +00:00
rubidium
cde65455ac
(svn r13731) -Codechange: make a pool of the array of players.
2008-07-18 16:40:29 +00:00
peter1138
0a41936df8
(svn r13388) -Codechange: Remove "my invented flag for something that is a wagon"
2008-06-05 12:08:20 +00:00
peter1138
7f8d9148b8
(svn r13331) -Fix (r12924): Wrong include type for (sdt::)map
2008-05-29 17:54:02 +00:00
rubidium
e7a501100a
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
2008-05-29 15:13:28 +00:00
peter1138
1272c55991
(svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp
2008-05-27 12:24:23 +00:00
rubidium
d289464d69
(svn r13255) -Codechange: move _opt to _settings.
2008-05-25 22:36:44 +00:00
rubidium
dc77647ea4
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
...
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
2008-05-25 19:17:03 +00:00