Commit Graph

470 Commits (a6cbf0d419569989d54f6df37232e9e771acafa8)

Author SHA1 Message Date
yexo 9292c90360 (svn r15464) -Codechange [NoAI]: Call all info.nut functions exactly once and only during initialization. 16 years ago
yexo b9c66aa750 (svn r15463) -Change [API CHANGE]: Replace AIInfo::CanLoadFromVersion(version) with AIInfo::MinVersionToLoad() which should return a single integer, the minimum version the AI is able to load data from. 16 years ago
yexo 4c7106dad7 (svn r15462) -Change [NoAI]: Make AIController::GetTick() and AIController::GetSetting() static functions.
-Fix (r15460): ai_controller.hpp.sq was forgotten.
16 years ago
rubidium dea3490b2f (svn r15460) -Fix [NoAI]: don't require an instance to exist in the scope for static functions and limit exposure of the internal function GetClassName. 16 years ago
yexo 8d25202067 (svn r15441) -Cleanup: Use a return value instead of passing a pointer to where the result should be stored. 16 years ago
yexo 1eeb0f6748 (svn r15440) -Fix: Backup AIObject::GetAllowDoCommand and restore the old value so AIs can't work around it. 16 years ago
peter1138 ad30a3c4ca (svn r15436) -Codechange: Return index of station spec within station class as a return parameter of GetCustomStationSpecByGrf(), as the index is already known. Saves on an extra loop and an extern... 16 years ago
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
rubidium 8dae160d0f (svn r15425) -Codechange: some color->colour changes and type safety. 16 years ago
rubidium 377ce6c5bf (svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability. 16 years ago
Yexo 5bcdcdd1d1 (svn r15408) -Fix (r15027): AIs could call AIController::Sleep() at times they're not allowed to sleep. 16 years ago
rubidium e1b1fd18b5 (svn r15406) -Fix: make Valuate actually cost a few opcodes to not make it a single opcode method of doing lots of the same thing. This should resolve most of the hiccups caused by AIs. 16 years ago
smatz 9c59b711b7 (svn r15401) -Fix [FS#2619](r15027): AI::Stop changed _current_company, but didn't restore its original value 16 years ago
frosch 4e8707b93f (svn r15400) -Fix: Typos in comments. 16 years ago
rubidium 6252c74584 (svn r15368) -Fix: some typos in comments 16 years ago
Yexo cb3784d8b1 (svn r15366) -Add [NoAI]: Add AddLabels() where you can define labels for the values of the settings in info.nut 16 years ago
frosch 324e92f879 (svn r15360) -Fix: Flooding vehicles did not trigger an AI event. 16 years ago
frosch cb049e4e58 (svn r15359) -Add [NoAI]: AIEventVehicleCrashed::CRASH_RV_UFO, AIEventDisasterZeppelinerCrashed and AIEventDisasterZeppelinerCleared as aliens accepted NoAIs as competing life-form. 16 years ago
frosch 7f198507f7 (svn r15358) -Add [NoAI]: AIEventVehicleCrashed::GetCrashReason() 16 years ago
rubidium 8fb4962407 (svn r15355) -Codechange: simplify some stuff now ->FirstShared returns non-NULL again. 16 years ago
Yexo f2907d816f (svn r15346) -Add [NoAI]: Add AIAirport::GetNearestTown() so AIs can known in which town the noise level will increase. 16 years ago
Yexo 62a11eb5a9 (svn r15345) -Add [NoAI]: Add AIVehicle::HasSharedOrders() and AIVehicleList_SharedOrders. 16 years ago
Yexo b321130d9a (svn r15343) -Add [NoAI]: Add AITown::GetRoadLayout so AIs can get the road layout per town. 16 years ago
rubidium 1c30c8c801 (svn r15330) -Fix [FS#2597]: leaking of Squirrel when using circular references (by enabling the GC). 16 years ago
Yexo 101f55e65c (svn r15328) -Fix (r15327): Load(data, version) was called instead of Load(version, data). 16 years ago
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. 16 years ago
smatz 5ad1cd32b2 (svn r15324) -Codechange: unify the class used for comparing of strings for std::map 16 years ago
Yexo a5807f4a77 (svn r15322) -Fix (r15175): The AI list window didn't display information about the selected AI if it wasn't visible. 16 years ago
frosch de9a6fc90b (svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions. 16 years ago
frosch 317220c2e4 (svn r15307) -Fix: AIVehicle::GetCurrentSpeed() should also use km-ish/h instead of mph. (Documentation by Rubidium) 16 years ago
frosch c28c4c1986 (svn r15306) -Codechange: Deduplicate code by adding Engine::GetDisplayMaxSpeed(), GetPower() and GetDisplayWeight(). (and using them) 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
Yexo ea01534e6d (svn r15284) -Fix [FS#2582] (r15045): Parameters were popped from the squirrel stack twice. 16 years ago
smatz 659989af45 (svn r15278) -Fix [FS#2332]: test noise limit of nearest town instead of st->town 16 years ago
Yexo 7f9c91901e (svn r15277) -Fix (r15027): Building bridges in AITestMode always returned false. 16 years ago
glx 062f32a186 (svn r15270) -Change [API CHANGE]: remove AIEventTest 16 years ago
glx c1cf3934fa (svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication. 16 years ago
frosch 80ee3d3440 (svn r15262) -Fix: AIEvents were not freed, when they were not queued for any AI. 16 years ago
glx e8b5f49861 (svn r15261) -Add: added Engine::GetRunningCost() to remove some code duplication. Also stops AIs decrementing vehicle counter of first company 16 years ago
frosch 47cdbe4a20 (svn r15255) -Fix (r15027): AIVehicle::GetLength() returned only the length of the first part of articulated road vehicles. 16 years ago
frosch 7e6049ba02 (svn r15252) -Fix (r15027): AIMarine::AreWaterTilesConnected() reported aqueducts being connected with all surrounding tiles. Also add some type safety. 16 years ago
frosch d05ab5a531 (svn r15244) -Fix (r15027): The station tile of an oilrig-like industry is not neccessarily the first industry tile. 16 years ago
frosch a1d4b792e8 (svn r15241) -Fix (r15027): NoAI API was not aware of certain newindustries 'features'. 16 years ago
glx 4fe58bc303 (svn r15228) -Fix [FS#2571]: possible crash when an AI/Library doesn't have a required function 16 years ago
glx ceb60b426e (svn r15226) -Fix (r15214): broken AI content download 16 years ago
rubidium 83e1288c6a (svn r15215) -Fix: various MSVC x64 compiler warnings 16 years ago
glx 92f5c6b1da (svn r15214) -Fix [NoAI]: ignore case for ai/library main script path on windows 16 years ago
glx b44390bf39 (svn r15191) -Fix (r15188): -1 is not a bool (MSVC warning) 16 years ago
Yexo db3ee34b44 (svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map. 16 years ago
Yexo ddcaf2f4cc (svn r15188) -Feature: You can now change the number of AIs from the AI config window. 16 years ago
Yexo 2307adf8d2 (svn r15187) -Fix: assert when an AI called AIRoad::GetNeighbourRoadCount on a tile at the north edge (bug found by SmatZ). 16 years ago
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.
16 years ago
Yexo c3b7917da1 (svn r15185) -Fix (r15175): It was impossible to select AIs that had a different instance name then their name. 16 years ago
glx a4d3c76093 (svn r15184) -Cleanup: remove extra spaces 16 years ago
Yexo 3c757724e9 (svn r15182) -Fix: After updating an AI select the latest version for the next game. 16 years ago
Yexo 3d35b3c2cc (svn r15175) -Feature: Add the option to select the AIs to start in a new game and configure them via the gui. 16 years ago
Yexo 61ee8ca42a (svn r15171) -Fix (r15027): Buffer underflow in case there are no settings to save for an AI. 16 years ago
peter1138 481c2164d0 (svn r15149) -Codechange: GetMaskOfTownActions() is used by a Cmd handler, therefore it does not belong in _gui. 16 years ago
rubidium 67ac7124b1 (svn r15139) -Fix [NoAI]: a wrong tile got returned for hangar tiles when the station sign isn't over st->airport_tile. 16 years ago
peter1138 dba9d60d3a (svn r15133) -Fix: Crash if no NoAIs are present. 16 years ago
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. 16 years ago
truebrain 4bc7afae41 (svn r15124) -Fix: last memory leak related to NoAI 16 years ago
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 *' 16 years ago
truebrain 7e8d9a3e66 (svn r15122) -Codechange: add a security assert, to make sure something never happens 16 years ago
truebrain 27717e1b6d (svn r15121) -Fix: more mem-leak fixes (this should make SmatZ so happy ;) :p) 16 years ago
truebrain fe90077681 (svn r15120) -Fix: more mem-leak fixes 16 years ago
truebrain 7eae652302 (svn r15118) -Fix: fix a minor mem-leak 16 years ago
truebrain 8510afe233 (svn r15109) -Add [NoAI]: add AITile::LevelTiles (Yexo) 16 years ago
truebrain 7f851eaeb9 (svn r15107) -Fix [NoAI]: don't use so much explicit string copies if it is not required 16 years ago
rubidium 95fa33157f (svn r15106) -Fix [NoAI]: printf-ing of garbage. 16 years ago
truebrain b8d2049bc4 (svn r15102) -Fix (r15101): somehow makedepend fucked up (patch by Yexo) 16 years ago
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
16 years ago
truebrain 5119132dda (svn r15100) -Add [NoAI]: introduce TILE_INVALID as const 16 years ago
truebrain e9437c2b2b (svn r15099) -Fix (r15078): GetTileIndex(0, -1) is perfectly fine 16 years ago
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
16 years ago
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
16 years ago
truebrain 3e7c2bbacc (svn r15093) -Fix [NoAI]: check if a tile is valid before using IsTileType (bug found by Zuu, patch by Yexo) 16 years ago
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 16 years ago
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. 16 years ago
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 ;) 16 years ago
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(). 16 years ago
rubidium ea5457d831 (svn r15082) -Codechange: make the AI library path also a searchdir instead of manually manufacturing it into a searchdir. 16 years ago
truebrain 6fe54a2d1a (svn r15078) -Fix [NoAI]: AIMap didn't filter its input (Yexo) 16 years ago
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
16 years ago
truebrain cb221d9996 (svn r15076) -Fix: a start_date of 0 would never start an AI .. so don't allow it (Yexo) 16 years ago
truebrain 2d3fc8141d (svn r15074) -Fix: make Rubidium happy 16 years ago
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. 16 years ago
truebrain 2e30efb530 (svn r15068) -Add [NoAI]: introducing 'step_size' for AIConfig, for future AIGUI (Yexo) 16 years ago
peter1138 02bda12599 (svn r15067) -Fix [FS#2531]: Possible compiler bug, alleviated by using SmallVector instead of using std::set. SmallVector does everything needed anyway. 16 years ago
truebrain e1f64922c5 (svn r15066) -Change: start_date is now in days, instead of in months (Yexo) 16 years ago
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)
16 years ago
smatz 0a357c0ac1 (svn r15062) -Fix: further forgotten svn properties and headers 16 years ago
smatz 7cea618fcc (svn r15061) -Fix (r15027): three files were missing the Id header 16 years ago
truebrain c3249d599f (svn r15059) -Add [NoAI]: use 'start_date' from the AI configure to see when an AI should start next 16 years ago
truebrain 07f2afa635 (svn r15057) -Fix [NoAI]: clamp the values of a setting between the ones allowed by info.nut 16 years ago
truebrain 1bd2867715 (svn r15056) -Add [NoAI]: when starting a game, give a random value to the setting marked with AICONFIG_RANDOM (Yexo) 16 years ago
truebrain e6543c2776 (svn r15055) -Add [NoAI]: add the AICONFIG_RANDOM and AICONFIG_BOOLEAN consts (Yexo) 16 years ago
glx 37500a13f6 (svn r15049) -Fix (r15045): MSVC performance warning 16 years ago
truebrain 0adcb5bc2f (svn r15048) -Fix (r15047): the one time you don't compile a patch of someone, it contains a warning .. ;) 16 years ago
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) 16 years ago
truebrain e06e372529 (svn r15046) -Fix (r15045): in case CanLoadFromRevision does not exist, only allow savedata from the same version as we are now 16 years ago
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
16 years ago
truebrain e6883c5cc7 (svn r15044) -Add [NoAI]: AIConfig::GetVersion(), to get the version of the current AI 16 years ago
truebrain 695765fde7 (svn r15042) -Fix (r15027): don't leak memory in AIInfo (Yexo) 16 years ago
truebrain c666cf5a49 (svn r15036) -Fix: use the same value for 'random' through-out the code for PlantTree 16 years ago
truebrain b7b29d96de (svn r15033) -Fix (r15027): silent a warning when compiling without network 16 years ago
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
16 years ago
frosch e8796a148f (svn r14991) -Fix: Command-flags is an uint32. 16 years ago
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 16 years ago
rubidium cda853872a (svn r14944) -Cleanup: add spaces around some operators 16 years ago
rubidium c8c61e36bd (svn r14919) -Feature: distant joining of stations (Frostregen and PhilSophus) 16 years ago
glx c7959ce2a9 (svn r14840) -Cleanup: remove duplicate includes 16 years ago
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 16 years ago
smatz afef22e3e7 (svn r14812) -Codechange: use INVALID_TILE instead of 0 to mark company without HQ 16 years ago
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 16 years ago
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) 16 years ago
smatz 5b26afbd6b (svn r14734) -Codechange: type of bankrupt_asked is CompanyMask, not byte 16 years ago
frosch ebf51ffb6b (svn r14707) -Cleanup: Replace an 'int' by 'Trackdir'. 16 years ago
smatz a7f82bd11a (svn r14693) -Codechange: replace one check in old AI (probably typo, but the effect was the same) (Yexo) 16 years ago
michi_cc 02c99bdf66 (svn r14504) -Cleanup: Use the right variable type for tile offsets. 16 years ago
rubidium 272b2ef0e9 (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 16 years ago
smatz 1906aa2bbb (svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker) 16 years ago
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
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. 16 years ago
frosch bffc5717bc (svn r14335) -Codechange: Remove some magic numbers. 16 years ago
belugas 08898f69be (svn r14169) -Codechange: rename location_of_house for location_of_HQ, which is more exact and less subject to interpretation 16 years ago
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 :)
16 years ago
frosch 844a83ed58 (svn r14076) -Codechange: Merge the four start/stop commands into a single CMD_START_STOP_VEHICLE. 16 years ago
rubidium 08e7da71f5 (svn r14062) -Fix [FS#2226]: division by 0 in newai. 16 years ago
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. 16 years ago
rubidium a050a78525 (svn r13809) -Fix: memory leak each time a "new ai" got (re)started. 16 years ago
rubidium 3a799389eb (svn r13731) -Codechange: make a pool of the array of players. 16 years ago
rubidium d06529ef4d (svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool. 16 years ago
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. 16 years ago
rubidium 8c9cc415e3 (svn r13255) -Codechange: move _opt to _settings. 16 years ago
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.
16 years ago
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.
16 years ago
smatz 3866effe71 (svn r13222) -Change: allow old AI building helistations and helidepots for oil rig routes 16 years ago
smatz 0b07ed0bcd (svn r13221) -Fix (r8747): old AI failed to build oil rig routes 16 years ago
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 16 years ago
smatz ec627dedf8 (svn r13090) -Codechange: add functions for direct conversion from DiagDirection to Track and Trackbits 16 years ago
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. 16 years ago
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. 16 years ago
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). 16 years ago
rubidium 9d8fa486af (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 16 years ago
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. 16 years ago
smatz 059e94e355 (svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used 16 years ago
smatz 9488db56d4 (svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile() 16 years ago
rubidium d74c6ffb62 (svn r12617) -Codechange: add type safety to the Order's load and unload types. 16 years ago
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. 16 years ago
rubidium fb1c4eccd8 (svn r12593) -Codechange: hide Order's flags in most of the code. 16 years ago
rubidium d6623cf654 (svn r12588) -Codechange: do not access the destination of an order directly. 16 years ago
rubidium 8cd1795fe3 (svn r12587) -Codechange: unduplicate some code in the Unpack*Order functions and move the 'normal' case Pack/Unpack to Order. 16 years ago
rubidium 5b47f81b0f (svn r12584) -Codechange: do not access the order type directly. 16 years ago
frosch 5e5e074a5d (svn r12540) -Codechange: Enumify some values in original pathfinder and remove an unused variable. 16 years ago
frosch 4329223476 (svn r12533) -Cleanup: Remove some wizardry from default ai by using existings enums and helper functions. 16 years ago
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. 16 years ago
rubidium 2edd403656 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. 16 years ago
rubidium 4a1035ab95 (svn r12488) -Codechange: split order.h into order_base.h and order_func.h. 16 years ago
rubidium 93d59fe448 (svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h. 16 years ago
peter1138 5ddb78af9f (svn r12451) -Codechange: use of FOR_ALL_ENGINES/ENGINEIDS_OF_TYPE instead of for-loops 17 years ago
smatz 767e1cc37e (svn r12200) -Fix: force AI to build rail or road instead of bridges if possible, so it doesn't build bridges everywhere 17 years ago
frosch b7993793c8 (svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus(). 17 years ago
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
17 years ago
frosch f5929d413b (svn r12193) -Codechange: Rename a magic variable, give it a decent type, and remove a 'goto'. 17 years ago
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 17 years ago
glx 044ca2bbf6 (svn r12155) -Fix (r12154): some warnings (always compile before commit) 17 years ago
glx 3e70ee6ed7 (svn r12154) -Codechange: removed a magic number 17 years ago
frosch 43c0f7ea8e (svn r12141) -Codechange: Introduce IsNormalRoad[Tile](), IsRoadDepot[Tile]() and HasTileRoadType(); and use them. 17 years ago
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
17 years ago
peter1138 1cdee354b4 (svn r12019) -Codechange: Add support for passenger engine designation for AI-use, NewGRF property 0x08 for trains. 17 years ago
frosch 6f6708e844 (svn r11983) -Codechange: Add some helper functions for slopes and use them. 17 years ago
smatz 5f9a877376 (svn r11972) -Fix: old AI shouldn't build fast planes with a small airport in orders 17 years ago
smatz 5a7c903770 (svn r11968) -Codechange: remove redundant FindLengthOfTunnel(), use GetTunnelBridgeLength() and/or GetOtherTunnelEnd() instead 17 years ago
smatz d6eaf1a11a (svn r11962) -Cleanup: OPF is no longer used to update signals 17 years ago
smatz 0b888ccc00 (svn r11960) -Cleanup: simplify some IsTunnel(Tile) / IsBridge(Tile) conditions 17 years ago
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.
17 years ago
smatz a31ebdb2be (svn r11958) -Fix (r11204): NewAI couldn't build any road vehicles when there were any tram grfs loaded 17 years ago
frosch b99c83246b (svn r11946) -Fix: slope detection of bridge ramps.
YAPF failed for steep slopes.
  Trolly failed for a lot.
17 years ago
smatz 22a7b95c10 (svn r11917) -Fix (r3677): AI was reading wrong tile slope while building road bridge 17 years ago
rubidium f658b79e15 (svn r11887) -Fix [FS#1658]: segmentation faults/wrong frees due uninitialized memory in the AI. 17 years ago
smatz 9556623281 (svn r11871) -Fix [FS#1074]: do not update signals after each tile when building/removing a large block of track/signals/station 17 years ago
rubidium 576f8ad93e (svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*. 17 years ago
rubidium dc87b05e8c (svn r11834) -Codechange: only include settings_type.h if needed. 17 years ago
rubidium 5c4150d304 (svn r11832) -Codechange: get rid of (quite) some VARDEFs. 17 years ago
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 17 years ago
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 17 years ago
rubidium 998d7644f6 (svn r11800) -Codechange: move some functions to a more logical location + some type safety. 17 years ago
rubidium 46650c54b6 (svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114). 17 years ago
rubidium b4337eba83 (svn r11792) -Codechange: move some (virtually) globally included AI related structs to a place where they are only included a few times. 17 years ago
rubidium b0ac283aec (svn r11774) -Change: do not include variables.h in a header when it is not needed. 17 years ago
rubidium 384503e7d3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 17 years ago
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 17 years ago
rubidium 2786d789a1 (svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h). 17 years ago
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' 17 years ago
rubidium bf98e25e43 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 17 years ago
rubidium 6a9e77e079 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 17 years ago
rubidium 9e9cfe6e59 (svn r11677) -Codechange: move price and command related types/functions to their respective places. 17 years ago
rubidium 5b49e75453 (svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h 17 years ago
smatz 93c3e0d6ad (svn r11652) -Codechange: add the svn $ header for several files 17 years ago
smatz 145517fb8e (svn r11649) -Codechange: some code can be simplified thanks to changes in r11642 17 years ago
smatz 3cee0abdba (svn r11644) -Codechange: merge some functions from tunnel_map.h and bridge_map.h into tunnelbridge_map.h 17 years ago
smatz 5acc147c1c (svn r11625) -Codechange: add CO_* enum at some places, add includes of order.h too 17 years ago
smatz 05fca79cf0 (svn r11565) -Revert: part of r11564 17 years ago
skidd13 82913a2134 (svn r11564) -Codechange: Increase the usage of the for_each_bit macro and rename it fitting to the naming style 17 years ago
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
17 years ago
skidd13 bf959f926f (svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style 17 years ago
skidd13 eeaa348f8b (svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style 17 years ago
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 17 years ago
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. 17 years ago
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. 17 years ago
rubidium beeae81f60 (svn r11184) -Codechange: cleanup the code related to backup orders. 17 years ago
glx 5e45e73037 (svn r11176) -Revert (r9867): as it is needed for newgrf callbacks 14B and 14C 17 years ago
rubidium 9706c32ed6 (svn r11040) -Fix [FS#1179]: removing CMD_AUTO from some commands could remotely trigger an assertion. 17 years ago
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. 17 years ago
rubidium a407d53d1b (svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot. 17 years ago
rubidium e56e520673 (svn r10942) -Fix [FS#1133]: make the AI not crash when it has ships as the AI does not support them. 17 years ago
rubidium 210ba54ff5 (svn r10838) -Fix [FS#1119] (r10698): double negation where only single negation was needed. Patch by frosch. 17 years ago
rubidium e4149482ec (svn r10759) -Codechange: make the industry struct use the pool item class as super class. 17 years ago
rubidium b15c0efaa9 (svn r10756) -Codechange: use vehicle->IsValid in favour of IsValidVehicle(vehicle). 17 years ago
rubidium 7fb3f54584 (svn r10733) -Codechange: change MP_STREET into MP_ROAD as we use the word "road" everywhere except in the tile type. 17 years ago
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. 17 years ago
rubidium 0d9a51de6d (svn r10672) -Codechange: typify some parameters/variables. 17 years ago
truelight 045a51ce62 (svn r10657) -Fix r10655: commit didn't comply with coding style (tnx glx :)) 17 years ago
truelight c4e47c07c9 (svn r10655) -Fix [FS#1070]: Trolly AI didn't know about steep slopes, and used wrong tileh in some cases (frosch) 17 years ago
rubidium e5c352818d (svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it. 17 years ago
rubidium f806b46cc9 (svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch. 17 years ago
rubidium 49220cc6f1 (svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified. 17 years ago
rubidium b09431478d (svn r10200) -Codechange: add "shortcut" for !CmdFailed (CmdSucceeded). 17 years ago
rubidium 966e2738b9 (svn r10197) -Codechange: replace int32 with CommandCost where appropriate. 17 years ago
peter1138 94bd08fc17 (svn r10177) -Fix: Passengers has one A and two Es (ln) 17 years ago
rubidium 01593bdb6a (svn r10106) -Fix (r10098): there's always a compiler complaining about something... 17 years ago
rubidium cc4d18ecc4 (svn r10098) -Codechange: bilbo cared about the performance of the AI with respect to the airport placement, so he rewrote the aircraft handling of the AI; now it can actually make lots of money again :) 17 years ago
rubidium 7767e466e5 (svn r10081) -Fix [FS851]: towns/AIs didn't build bridges anymore (boekabart). 17 years ago
rubidium 8a74b2ebe1 (svn r10058) -Codechange: give some industry variable sensible names (like not telling "last_mo_production" when it is the production of the current month). 17 years ago
rubidium c4806955e5 (svn r10033) -Feature [FS#760]: skip to the selected order in the order list when clicking on the "skip" button while pressing CTRL. 17 years ago
rubidium 53380fc047 (svn r9954) -Fix [FS#811]: trolley AI crashed when trying to determine what the roadbits are. 17 years ago
rubidium 440d723d84 (svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile. 17 years ago
rubidium 3d143446ee (svn r9912) -Fix: the AIs could build any road(station)s. 17 years ago
rubidium d86b5e5e93 (svn r9892) -Codechange: lots of ground work for allowing multiple types of "road" with multiple owners on a single tile. 17 years ago
belugas 380d18fb69 (svn r9867) -Codechange: Remove data duplication. The exact same values can be found in the industry spec, so take it from there instead. 17 years ago
rubidium f24f9d5a2e (svn r9817) -Fix [FS#772]: an assertion that was triggered by the AI building when its rating for the town was not high enough. 17 years ago
rubidium 80c259f64f (svn r9672) -Cleanup: lots of coding style fixes around operands. 17 years ago
maedhros ccaaa7d33a (svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist. 17 years ago
celestar e3f1914de0 (svn r9540) -Fix (r1): Bankrupt AIs no longer buy themselves (usage of wrong variable) 18 years ago
belugas 377fbf9eb7 (svn r9530) -Codechange: Replace a direct industry type access by a behaviour 18 years ago
belugas 06d3669bb5 (svn r9400) -Codechange: Use some more representative enum names for landscape types. 18 years ago
celestar 124725d863 (svn r9251) -Fix(r6057, FS#644): Use a less CPU-intensive algorithm to find a random industry for the AI to prevent it slowing down the game. The AI now sucks a even a bit more than before (if that's even possible). 18 years ago
rubidium ce919e8c71 (svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code). 18 years ago
rubidium 24c4d5b06d (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 18 years ago