Commit Graph

396 Commits

Author SHA1 Message Date
Yexo 101f55e65c (svn r15328) -Fix (r15327): Load(data, version) was called instead of Load(version, data). 2009-02-03 21:05:32 +00:00
Yexo 1892c34ac6 (svn r15327) -Fix (r15027): AIs could access the map and other data in their constructor and Load() function while the savegame was not completely loaded. 2009-02-03 20:49:08 +00:00
smatz 5ad1cd32b2 (svn r15324) -Codechange: unify the class used for comparing of strings for std::map 2009-02-03 18:08:07 +00:00
Yexo a5807f4a77 (svn r15322) -Fix (r15175): The AI list window didn't display information about the selected AI if it wasn't visible. 2009-02-02 22:57:22 +00:00
frosch de9a6fc90b (svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions. 2009-02-01 17:14:39 +00:00
frosch 317220c2e4 (svn r15307) -Fix: AIVehicle::GetCurrentSpeed() should also use km-ish/h instead of mph. (Documentation by Rubidium) 2009-02-01 16:21:18 +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
Yexo ea01534e6d (svn r15284) -Fix [FS#2582] (r15045): Parameters were popped from the squirrel stack twice. 2009-01-27 13:11:11 +00:00
smatz 659989af45 (svn r15278) -Fix [FS#2332]: test noise limit of nearest town instead of st->town 2009-01-26 21:09:17 +00:00
Yexo 7f9c91901e (svn r15277) -Fix (r15027): Building bridges in AITestMode always returned false. 2009-01-26 20:18:50 +00:00
glx 062f32a186 (svn r15270) -Change [API CHANGE]: remove AIEventTest 2009-01-25 19:06:00 +00:00
glx c1cf3934fa (svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication. 2009-01-25 00:57:03 +00:00
frosch 80ee3d3440 (svn r15262) -Fix: AIEvents were not freed, when they were not queued for any AI. 2009-01-24 21:38:30 +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
frosch 47cdbe4a20 (svn r15255) -Fix (r15027): AIVehicle::GetLength() returned only the length of the first part of articulated road vehicles. 2009-01-24 14:26:48 +00:00
frosch 7e6049ba02 (svn r15252) -Fix (r15027): AIMarine::AreWaterTilesConnected() reported aqueducts being connected with all surrounding tiles. Also add some type safety. 2009-01-24 13:05:04 +00:00
frosch d05ab5a531 (svn r15244) -Fix (r15027): The station tile of an oilrig-like industry is not neccessarily the first industry tile. 2009-01-23 22:36:17 +00:00
frosch a1d4b792e8 (svn r15241) -Fix (r15027): NoAI API was not aware of certain newindustries 'features'. 2009-01-23 22:09:31 +00:00
glx 4fe58bc303 (svn r15228) -Fix [FS#2571]: possible crash when an AI/Library doesn't have a required function 2009-01-23 15:38:13 +00:00
glx ceb60b426e (svn r15226) -Fix (r15214): broken AI content download 2009-01-23 15:10:13 +00:00
rubidium 83e1288c6a (svn r15215) -Fix: various MSVC x64 compiler warnings 2009-01-23 02:01:05 +00:00
glx 92f5c6b1da (svn r15214) -Fix [NoAI]: ignore case for ai/library main script path on windows 2009-01-23 01:29:13 +00:00
glx b44390bf39 (svn r15191) -Fix (r15188): -1 is not a bool (MSVC warning) 2009-01-21 03:47:04 +00:00
Yexo db3ee34b44 (svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map. 2009-01-21 02:31:55 +00:00
Yexo ddcaf2f4cc (svn r15188) -Feature: You can now change the number of AIs from the AI config window. 2009-01-21 01:56:42 +00:00
Yexo 2307adf8d2 (svn r15187) -Fix: assert when an AI called AIRoad::GetNeighbourRoadCount on a tile at the north edge (bug found by SmatZ). 2009-01-21 01:37:20 +00:00
Yexo e395533632 (svn r15186) -Fix: Select the currently selected AI instead of the second on in the list.
-Feature: Double clicking on a slot in the AI config window results in opening the list of AIs.
2009-01-21 00:36:22 +00:00
Yexo c3b7917da1 (svn r15185) -Fix (r15175): It was impossible to select AIs that had a different instance name then their name. 2009-01-21 00:19:21 +00:00
glx a4d3c76093 (svn r15184) -Cleanup: remove extra spaces 2009-01-21 00:18:30 +00:00
Yexo 3c757724e9 (svn r15182) -Fix: After updating an AI select the latest version for the next game. 2009-01-21 00:09:36 +00:00
Yexo 3d35b3c2cc (svn r15175) -Feature: Add the option to select the AIs to start in a new game and configure them via the gui. 2009-01-20 16:49:10 +00:00
Yexo 61ee8ca42a (svn r15171) -Fix (r15027): Buffer underflow in case there are no settings to save for an AI. 2009-01-20 15:58:40 +00:00
peter1138 481c2164d0 (svn r15149) -Codechange: GetMaskOfTownActions() is used by a Cmd handler, therefore it does not belong in _gui. 2009-01-19 12:07:01 +00:00
rubidium 67ac7124b1 (svn r15139) -Fix [NoAI]: a wrong tile got returned for hangar tiles when the station sign isn't over st->airport_tile. 2009-01-18 17:03:57 +00:00
peter1138 dba9d60d3a (svn r15133) -Fix: Crash if no NoAIs are present. 2009-01-17 22:22:53 +00:00
rubidium 3a13b75e37 (svn r15126) -Feature: downloading content from a central server (content.openttd.org) where authors can upload they NewGRFS/AI etc. This should make joining servers that use only NewGRFs that are distributed via this system easier as the players can download the NewGRFs from in the game. It should also make it easier to see whether there are updates for NewGRFs and make the necessary updates. 2009-01-17 16:53:32 +00:00
truebrain 4bc7afae41 (svn r15124) -Fix: last memory leak related to NoAI 2009-01-17 15:38:37 +00:00
truebrain 3abb8abd07 (svn r15123) -Fix [NoAI]: 'const char *' implies that the return value should not be free'd, which is should .. so make them 'char *' 2009-01-17 15:31:30 +00:00
truebrain 7e8d9a3e66 (svn r15122) -Codechange: add a security assert, to make sure something never happens 2009-01-17 15:14:13 +00:00
truebrain 27717e1b6d (svn r15121) -Fix: more mem-leak fixes (this should make SmatZ so happy ;) :p) 2009-01-17 15:07:35 +00:00
truebrain fe90077681 (svn r15120) -Fix: more mem-leak fixes 2009-01-17 14:54:24 +00:00
truebrain 7eae652302 (svn r15118) -Fix: fix a minor mem-leak 2009-01-17 14:45:44 +00:00
truebrain 8510afe233 (svn r15109) -Add [NoAI]: add AITile::LevelTiles (Yexo) 2009-01-16 15:01:54 +00:00
truebrain 7f851eaeb9 (svn r15107) -Fix [NoAI]: don't use so much explicit string copies if it is not required 2009-01-16 14:56:13 +00:00
rubidium 95fa33157f (svn r15106) -Fix [NoAI]: printf-ing of garbage. 2009-01-16 14:37:53 +00:00
truebrain b8d2049bc4 (svn r15102) -Fix (r15101): somehow makedepend fucked up (patch by Yexo) 2009-01-16 00:27:22 +00:00
truebrain 94dd36d1ec (svn r15101) -Change [API CHANGE]: more consistant naming for consts:
INVALID_TOWN_RATING        -> TOWN_RATING_INVALID
   INVALID_TRANSPORT          -> TRANSPORT_INVALID
   INVALID_ORDER              -> ORDER_INVALID
   INVALID_GROUP              -> GROUP_INVALID
   GROUP_ALL/DEFAULT          -> ALL/DEFAULT_GROUP
   VEHICLE_RAIL/ROAD/..       -> VT_RAIL/ROAD/..
   MY_COMPANY                 -> COMPANY_SELF
   FIRST/LAST/INVALID_COMPANY -> COMPANY_FIRST/LAST/INVALID
2009-01-16 00:05:26 +00:00
truebrain 5119132dda (svn r15100) -Add [NoAI]: introduce TILE_INVALID as const 2009-01-15 21:20:12 +00:00
truebrain e9437c2b2b (svn r15099) -Fix (r15078): GetTileIndex(0, -1) is perfectly fine 2009-01-15 20:59:22 +00:00
truebrain 6cfb9a24e0 (svn r15096) -Fix [NoAI]: free memory when no longer needed
-Fix [NoAI]: when there are multiple versions of one AI, never randonly pick an older one, but always the latest
2009-01-15 18:24:49 +00:00
truebrain ef62688522 (svn r15095) -Add [NoAI]: allow AI Libraries to be in .tar files (subdir required, as with AIs
-Add [NoAI]: allow multiple versions of the same AI co-exist
-Change [NoAI]: updated the whole method of AI (Library) finding and loading; it is now much more clear and transparent
-Change [NoAI]: the name of the AI is now the name used by CreateInstance()
-Change [NoAI]: make the AI finder a bit more clever, mostly related to version finding
2009-01-15 18:15:12 +00:00
truebrain 3e7c2bbacc (svn r15093) -Fix [NoAI]: check if a tile is valid before using IsTileType (bug found by Zuu, patch by Yexo) 2009-01-15 17:00:47 +00:00
truebrain 103cd2a5ed (svn r15091) -Add [NoAI] [API CHANGE]: introduce GetCategory() as a requirement for every library.nut, to indicate in which category it belongs. Currently the directory indicates the category, but this doesn't allow planned future additions 2009-01-15 15:56:10 +00:00
truebrain d62a85f2ce (svn r15090) -Add [NoAI] [API CHANGE]: info.nut/library.nut now requires a function GetShortName(), which should return a 4 (four) character string, unique throughout the world. This id is simular to a GRFid. 2009-01-15 14:37:44 +00:00
truebrain ae29148565 (svn r15086) -Fix: start AIs after 6 months on hard, 12 months on medium, and 24 months on easy. The current values were a bit .. too long waiting period ;) 2009-01-14 21:32:06 +00:00
truebrain 3cd6bf0ead (svn r15084) -Fix [NoAI] (r15027): by removing the threads for NoAIs, it is no longer possible to use DoCommand (even indirect) in AIAbstractList::Valuator(). 2009-01-14 18:25:48 +00:00
rubidium ea5457d831 (svn r15082) -Codechange: make the AI library path also a searchdir instead of manually manufacturing it into a searchdir. 2009-01-14 15:20:06 +00:00
truebrain 6fe54a2d1a (svn r15078) -Fix [NoAI]: AIMap didn't filter its input (Yexo) 2009-01-13 23:50:12 +00:00
smatz e00cf92f47 (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 cb221d9996 (svn r15076) -Fix: a start_date of 0 would never start an AI .. so don't allow it (Yexo) 2009-01-13 22:36:44 +00:00
truebrain 2d3fc8141d (svn r15074) -Fix: make Rubidium happy 2009-01-13 21:11:02 +00:00
peter1138 792d1bd883 (svn r15073) -Fix (r15067) [FS#2532]: Default copy constructors don't necessarily do what you want. Instead of creating one, we now pass a pointer around as that avoids additional allocations. 2009-01-13 20:43:53 +00:00
truebrain 2e30efb530 (svn r15068) -Add [NoAI]: introducing 'step_size' for AIConfig, for future AIGUI (Yexo) 2009-01-13 18:26:58 +00:00
peter1138 02bda12599 (svn r15067) -Fix [FS#2531]: Possible compiler bug, alleviated by using SmallVector instead of using std::set. SmallVector does everything needed anyway. 2009-01-13 18:18:53 +00:00
truebrain e1f64922c5 (svn r15066) -Change: start_date is now in days, instead of in months (Yexo) 2009-01-13 18:04:12 +00:00
truebrain 890074a03e (svn r15063) -Fix [NoAI]: starting companies now listen correctly to 'start_date' set to the AI slot (Yexo)
-Add [NoAI]: add a 'deviation' value for all settings, giving a slight deviation of the value of a setting (Yexo)
2009-01-13 16:53:03 +00:00
smatz 0a357c0ac1 (svn r15062) -Fix: further forgotten svn properties and headers 2009-01-13 16:30:24 +00:00
smatz 7cea618fcc (svn r15061) -Fix (r15027): three files were missing the Id header 2009-01-13 15:49:32 +00:00
truebrain c3249d599f (svn r15059) -Add [NoAI]: use 'start_date' from the AI configure to see when an AI should start next 2009-01-13 14:00:26 +00:00
truebrain 07f2afa635 (svn r15057) -Fix [NoAI]: clamp the values of a setting between the ones allowed by info.nut 2009-01-13 13:09:49 +00:00
truebrain 1bd2867715 (svn r15056) -Add [NoAI]: when starting a game, give a random value to the setting marked with AICONFIG_RANDOM (Yexo) 2009-01-13 12:52:09 +00:00
truebrain e6543c2776 (svn r15055) -Add [NoAI]: add the AICONFIG_RANDOM and AICONFIG_BOOLEAN consts (Yexo) 2009-01-13 12:51:46 +00:00
glx 37500a13f6 (svn r15049) -Fix (r15045): MSVC performance warning 2009-01-13 02:03:03 +00:00
truebrain 0adcb5bc2f (svn r15048) -Fix (r15047): the one time you don't compile a patch of someone, it contains a warning .. ;) 2009-01-13 01:52:32 +00:00
truebrain c9d20bfd47 (svn r15047) -Fix [NoAI]: AICONFIG_BOOLEAN (in AddSetting) doesn't require (or even allow) a min/max setting .. it is always 0/1 (Yexo) 2009-01-13 01:51:39 +00:00
truebrain e06e372529 (svn r15046) -Fix (r15045): in case CanLoadFromRevision does not exist, only allow savedata from the same version as we are now 2009-01-13 01:50:51 +00:00
truebrain bcbbf2c366 (svn r15045) -Add [NoAI API CHANGE]: in info.nut you can now have (optional) a CanLoadFromVersion(version), which should return true/false, to indicate if you can load a savegame made with your AI of version 'version'
-Add [NoAI API CHANGE]: in main.nut the Load() function now should be Load(version, data), where 'version' is the version of your AI which made the savegame
-Codechange [NoAI]: various of function renames to make things more sane
-Add [NoAI]: push the 'version' of the AI through various of layers
-Codechange [NoAI]: various of code cleanups
-Add [NoAI]: store the version of the AI in the savegame too
2009-01-13 01:46:46 +00:00
truebrain e6883c5cc7 (svn r15044) -Add [NoAI]: AIConfig::GetVersion(), to get the version of the current AI 2009-01-13 00:10:58 +00:00
truebrain 695765fde7 (svn r15042) -Fix (r15027): don't leak memory in AIInfo (Yexo) 2009-01-12 21:40:00 +00:00
truebrain c666cf5a49 (svn r15036) -Fix: use the same value for 'random' through-out the code for PlantTree 2009-01-12 18:15:18 +00:00
truebrain b7b29d96de (svn r15033) -Fix (r15027): silent a warning when compiling without network 2009-01-12 17:40:13 +00:00
truebrain a3dd7506d3 (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
frosch e8796a148f (svn r14991) -Fix: Command-flags is an uint32. 2009-01-11 14:11:06 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
rubidium cda853872a (svn r14944) -Cleanup: add spaces around some operators 2009-01-09 22:56:28 +00:00
rubidium c8c61e36bd (svn r14919) -Feature: distant joining of stations (Frostregen and PhilSophus) 2009-01-08 16:35:45 +00:00
glx c7959ce2a9 (svn r14840) -Cleanup: remove duplicate includes 2009-01-04 21:02:59 +00:00
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00
smatz afef22e3e7 (svn r14812) -Codechange: use INVALID_TILE instead of 0 to mark company without HQ 2009-01-03 17:11:52 +00:00
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 2008-12-28 14:37:19 +00:00
smatz 419f6e099f (svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo) 2008-12-26 18:01:15 +00:00
smatz 5b26afbd6b (svn r14734) -Codechange: type of bankrupt_asked is CompanyMask, not byte 2008-12-24 00:25:17 +00:00
frosch ebf51ffb6b (svn r14707) -Cleanup: Replace an 'int' by 'Trackdir'. 2008-12-20 20:26:40 +00:00
smatz a7f82bd11a (svn r14693) -Codechange: replace one check in old AI (probably typo, but the effect was the same) (Yexo) 2008-12-19 20:53:38 +00:00
michi_cc 02c99bdf66 (svn r14504) -Cleanup: Use the right variable type for tile offsets. 2008-10-20 19:35:48 +00:00
rubidium 272b2ef0e9 (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 2008-10-14 18:38:51 +00:00
smatz 1906aa2bbb (svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker) 2008-10-07 20:57:41 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium 3b798599b6 (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
frosch bffc5717bc (svn r14335) -Codechange: Remove some magic numbers. 2008-09-15 19:55:00 +00:00
belugas 08898f69be (svn r14169) -Codechange: rename location_of_house for location_of_HQ, which is more exact and less subject to interpretation 2008-08-25 16:10:34 +00:00
belugas f2f2bcf23c (svn r14105) -Fix: Some typos that are more grammatical errors, as it seems.
Provided by ln
I've added a little fix on currency.cpp too, why not :)
2008-08-20 01:38:12 +00:00
frosch 844a83ed58 (svn r14076) -Codechange: Merge the four start/stop commands into a single CMD_START_STOP_VEHICLE. 2008-08-15 13:57:43 +00:00
rubidium 08e7da71f5 (svn r14062) -Fix [FS#2226]: division by 0 in newai. 2008-08-13 05:12:36 +00:00
rubidium fe6111d6f2 (svn r13999) -Fix [FS#2190]: crash when the AI tries to find the depot of an airport that doesn't have a depot. 2008-08-04 22:31:49 +00:00
rubidium a050a78525 (svn r13809) -Fix: memory leak each time a "new ai" got (re)started. 2008-07-23 20:42:13 +00:00
rubidium 3a799389eb (svn r13731) -Codechange: make a pool of the array of players. 2008-07-18 16:40:29 +00:00
rubidium d06529ef4d (svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool. 2008-07-17 20:13:01 +00:00
rubidium 923e21129c (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
rubidium 8c9cc415e3 (svn r13255) -Codechange: move _opt to _settings. 2008-05-25 22:36:44 +00:00
rubidium 4625695653 (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
frosch 6e7a7412cd (svn r13233) -Fix: Replace some (incorrect) evaluations of TileOwner by RoadOwner.
-Fix: Before evaluating RoadOwner, check if the roadtype is present.
-Fix: Some places assumed that MP_ROAD means normal street.
2008-05-24 19:36:20 +00:00
smatz 3866effe71 (svn r13222) -Change: allow old AI building helistations and helidepots for oil rig routes 2008-05-23 16:08:58 +00:00
smatz 0b07ed0bcd (svn r13221) -Fix (r8747): old AI failed to build oil rig routes 2008-05-23 15:57:18 +00:00
smatz 2d14e889b2 (svn r13217) -Fix: old AI was building small airports in years when they were not available in original game, causing small planes and helis everywhere 2008-05-23 00:28:13 +00:00
smatz ec627dedf8 (svn r13090) -Codechange: add functions for direct conversion from DiagDirection to Track and Trackbits 2008-05-14 18:31:21 +00:00
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 2008-05-06 15:11:33 +00:00
peter1138 a00371c8db (svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist. 2008-04-29 21:31:29 +00:00
rubidium acafc26426 (svn r12762) -Fix: tabs after the first non-tab character are generally not okay (or lines starting with a space and then tabs). 2008-04-18 04:54:09 +00:00
rubidium 9d8fa486af (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 2008-04-18 04:37:06 +00:00
rubidium 02cdf01507 (svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h. 2008-04-17 19:10:30 +00:00
smatz 059e94e355 (svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used 2008-04-17 18:24:45 +00:00
smatz 9488db56d4 (svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile() 2008-04-17 00:44:20 +00:00
rubidium d74c6ffb62 (svn r12617) -Codechange: add type safety to the Order's load and unload types. 2008-04-07 20:03:46 +00:00
rubidium f1cd7ef5ee (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness. 2008-04-07 19:18:56 +00:00
rubidium fb1c4eccd8 (svn r12593) -Codechange: hide Order's flags in most of the code. 2008-04-06 15:09:45 +00:00
rubidium d6623cf654 (svn r12588) -Codechange: do not access the destination of an order directly. 2008-04-06 07:48:51 +00:00
rubidium 8cd1795fe3 (svn r12587) -Codechange: unduplicate some code in the Unpack*Order functions and move the 'normal' case Pack/Unpack to Order. 2008-04-06 07:22:26 +00:00
rubidium 5b47f81b0f (svn r12584) -Codechange: do not access the order type directly. 2008-04-05 23:36:54 +00:00
frosch 5e5e074a5d (svn r12540) -Codechange: Enumify some values in original pathfinder and remove an unused variable. 2008-04-02 13:57:25 +00:00
frosch 4329223476 (svn r12533) -Cleanup: Remove some wizardry from default ai by using existings enums and helper functions. 2008-04-01 15:03:59 +00:00
rubidium ef2be7d0fc (svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h. 2008-03-31 00:17:39 +00:00
rubidium 2edd403656 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. 2008-03-31 00:06:17 +00:00
rubidium 4a1035ab95 (svn r12488) -Codechange: split order.h into order_base.h and order_func.h. 2008-03-30 23:24:18 +00:00
rubidium 93d59fe448 (svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h. 2008-03-28 18:00:38 +00:00
peter1138 5ddb78af9f (svn r12451) -Codechange: use of FOR_ALL_ENGINES/ENGINEIDS_OF_TYPE instead of for-loops 2008-03-27 19:02:18 +00:00
smatz 767e1cc37e (svn r12200) -Fix: force AI to build rail or road instead of bridges if possible, so it doesn't build bridges everywhere 2008-02-20 17:56:36 +00:00
frosch b7993793c8 (svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus(). 2008-02-20 17:49:50 +00:00
smatz a190606f2e (svn r12197) -Fix [FS#1788](r12134): show correct last year profit when the train had negative income
-Codechange: use GetDisplayProfitThisYear() to convert vehicle profit to readable form
2008-02-20 17:06:58 +00:00
frosch f5929d413b (svn r12193) -Codechange: Rename a magic variable, give it a decent type, and remove a 'goto'. 2008-02-20 15:13:42 +00:00
smatz 578e833284 (svn r12184) -Fix: take into account possible loan when AI is deciding which bridge to build, so it won't build wooden bridges everytime 2008-02-18 22:50:58 +00:00
glx 044ca2bbf6 (svn r12155) -Fix (r12154): some warnings (always compile before commit) 2008-02-16 00:10:03 +00:00
glx 3e70ee6ed7 (svn r12154) -Codechange: removed a magic number 2008-02-15 23:57:03 +00:00
frosch 43c0f7ea8e (svn r12141) -Codechange: Introduce IsNormalRoad[Tile](), IsRoadDepot[Tile]() and HasTileRoadType(); and use them. 2008-02-14 15:59:16 +00:00
smatz a0ddc43e92 (svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
2008-02-13 19:24:40 +00:00
peter1138 1cdee354b4 (svn r12019) -Codechange: Add support for passenger engine designation for AI-use, NewGRF property 0x08 for trains. 2008-01-30 10:27:45 +00:00
frosch 6f6708e844 (svn r11983) -Codechange: Add some helper functions for slopes and use them. 2008-01-25 15:47:58 +00:00
smatz 5f9a877376 (svn r11972) -Fix: old AI shouldn't build fast planes with a small airport in orders 2008-01-24 14:22:10 +00:00
smatz 5a7c903770 (svn r11968) -Codechange: remove redundant FindLengthOfTunnel(), use GetTunnelBridgeLength() and/or GetOtherTunnelEnd() instead 2008-01-23 22:34:04 +00:00
smatz d6eaf1a11a (svn r11962) -Cleanup: OPF is no longer used to update signals 2008-01-23 17:30:28 +00:00
smatz 0b888ccc00 (svn r11960) -Cleanup: simplify some IsTunnel(Tile) / IsBridge(Tile) conditions 2008-01-23 14:51:36 +00:00
peter1138 9515328962 (svn r11959) -Codechange: Use macro to loop for specific engine types instead of using specific indexes each time.
-Codechange: Minor scope changes in said loops.
2008-01-23 13:20:51 +00:00
smatz a31ebdb2be (svn r11958) -Fix (r11204): NewAI couldn't build any road vehicles when there were any tram grfs loaded 2008-01-23 13:06:00 +00:00
frosch b99c83246b (svn r11946) -Fix: slope detection of bridge ramps.
YAPF failed for steep slopes.
  Trolly failed for a lot.
2008-01-22 16:08:17 +00:00
smatz 22a7b95c10 (svn r11917) -Fix (r3677): AI was reading wrong tile slope while building road bridge 2008-01-18 14:48:57 +00:00
rubidium f658b79e15 (svn r11887) -Fix [FS#1658]: segmentation faults/wrong frees due uninitialized memory in the AI. 2008-01-17 02:09:34 +00:00
smatz 9556623281 (svn r11871) -Fix [FS#1074]: do not update signals after each tile when building/removing a large block of track/signals/station 2008-01-16 01:18:15 +00:00
rubidium 576f8ad93e (svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*. 2008-01-15 18:44:22 +00:00
rubidium dc87b05e8c (svn r11834) -Codechange: only include settings_type.h if needed. 2008-01-13 14:37:30 +00:00
rubidium 5c4150d304 (svn r11832) -Codechange: get rid of (quite) some VARDEFs. 2008-01-13 13:36:01 +00:00
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 2008-01-13 01:21:35 +00:00
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 2008-01-12 14:10:35 +00:00
rubidium 998d7644f6 (svn r11800) -Codechange: move some functions to a more logical location + some type safety. 2008-01-09 21:05:03 +00:00
rubidium 46650c54b6 (svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114). 2008-01-09 16:55:48 +00:00
rubidium b4337eba83 (svn r11792) -Codechange: move some (virtually) globally included AI related structs to a place where they are only included a few times. 2008-01-09 16:40:02 +00:00
rubidium b0ac283aec (svn r11774) -Change: do not include variables.h in a header when it is not needed. 2008-01-07 00:57:19 +00:00
rubidium 384503e7d3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 2007-12-27 13:35:39 +00:00
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 2007-12-26 13:50:40 +00:00
rubidium 2786d789a1 (svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h). 2007-12-26 11:45:43 +00:00
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 2007-12-25 11:26:07 +00:00
rubidium bf98e25e43 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 2007-12-25 09:48:53 +00:00
rubidium 6a9e77e079 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 2007-12-21 22:50:51 +00:00
rubidium 9e9cfe6e59 (svn r11677) -Codechange: move price and command related types/functions to their respective places. 2007-12-21 21:50:46 +00:00
rubidium 5b49e75453 (svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h 2007-12-19 23:26:02 +00:00
smatz 93c3e0d6ad (svn r11652) -Codechange: add the svn $ header for several files 2007-12-17 01:35:45 +00:00
smatz 145517fb8e (svn r11649) -Codechange: some code can be simplified thanks to changes in r11642 2007-12-16 19:30:42 +00:00
smatz 3cee0abdba (svn r11644) -Codechange: merge some functions from tunnel_map.h and bridge_map.h into tunnelbridge_map.h 2007-12-16 15:38:51 +00:00
smatz 5acc147c1c (svn r11625) -Codechange: add CO_* enum at some places, add includes of order.h too 2007-12-12 14:37:35 +00:00
smatz 05fca79cf0 (svn r11565) -Revert: part of r11564 2007-12-03 22:40:18 +00:00
skidd13 82913a2134 (svn r11564) -Codechange: Increase the usage of the for_each_bit macro and rename it fitting to the naming style 2007-12-03 09:19:19 +00:00
skidd13 bdc7fd2d76 (svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
2007-11-25 15:35:25 +00:00
skidd13 bf959f926f (svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style 2007-11-24 10:38:43 +00:00
skidd13 eeaa348f8b (svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style 2007-11-20 13:35:54 +00:00
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 2007-11-19 21:02:30 +00:00
rubidium 8212088c03 (svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo. 2007-10-20 14:51:09 +00:00
rubidium 95f2181a1d (svn r11303) -Fix: EnsureNoVehicle and EnsureNoVehicleOnGround were both used to check whether there was no vehicle on the ground, except that the former didn't take care of aircraft shadows. So now we only use EnsureNoVehicleOnGround. 2007-10-19 22:46:55 +00:00
rubidium beeae81f60 (svn r11184) -Codechange: cleanup the code related to backup orders. 2007-09-28 21:15:45 +00:00
glx 5e45e73037 (svn r11176) -Revert (r9867): as it is needed for newgrf callbacks 14B and 14C 2007-09-27 21:39:13 +00:00
rubidium 9706c32ed6 (svn r11040) -Fix [FS#1179]: removing CMD_AUTO from some commands could remotely trigger an assertion. 2007-09-04 11:58:27 +00:00
rubidium cb7eaff353 (svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that. 2007-08-30 13:03:56 +00:00
rubidium a407d53d1b (svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot. 2007-08-29 21:49:08 +00:00
rubidium e56e520673 (svn r10942) -Fix [FS#1133]: make the AI not crash when it has ships as the AI does not support them. 2007-08-19 16:51:15 +00:00
rubidium 210ba54ff5 (svn r10838) -Fix [FS#1119] (r10698): double negation where only single negation was needed. Patch by frosch. 2007-08-10 13:27:07 +00:00
rubidium e4149482ec (svn r10759) -Codechange: make the industry struct use the pool item class as super class. 2007-08-02 23:21:52 +00:00
rubidium b15c0efaa9 (svn r10756) -Codechange: use vehicle->IsValid in favour of IsValidVehicle(vehicle). 2007-08-02 21:19:07 +00:00
rubidium 7fb3f54584 (svn r10733) -Codechange: change MP_STREET into MP_ROAD as we use the word "road" everywhere except in the tile type. 2007-07-29 23:42:59 +00:00
rubidium d624f66c79 (svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch. 2007-07-26 16:51:10 +00:00
rubidium 0d9a51de6d (svn r10672) -Codechange: typify some parameters/variables. 2007-07-24 13:03:24 +00:00
truelight 045a51ce62 (svn r10657) -Fix r10655: commit didn't comply with coding style (tnx glx :)) 2007-07-23 15:20:20 +00:00