summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_engine.cpp
AgeCommit message (Collapse)Author
2011-10-03(svn r22981) -Add: GroupStatistics for the ALL_GROUP.frosch
2011-01-22(svn r21888) -Codechange: remove some unneeded (for the AI header) headers ↵rubidium
from some AI headers, reducing the include tree
2010-12-21(svn r21571) -Codechange: Having a break after a return is no good.alberth
2010-08-01(svn r20281) -Codechange: unify case scope closure + break coding stylerubidium
2010-05-22(svn r19880) -Fix: [NoAI] AIEngine::IsValidEngine() and ↵frosch
AIEngine::IsBuildable() returned false positives. Especially wagons of unavailable railtypes were reported available.
2010-03-06(svn r19349) -Add: [NoAI] AIs can get the power, weight and tractive effort ↵terkhen
of a road vehicle.
2010-01-15(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, ↵rubidium
if a header require a header make it include that header
2010-01-02(svn r18687) -Add [NoAI]: AIEngine::IsBuildable to check if you can build a ↵yexo
certain engine. -Change: AIEngine::IsValidEngine will now also return true when you have at least one vehicle of that type even if you can't build it anymore.
2009-11-28(svn r18330) -Cleanup: remove some unneeded includesrubidium
2009-10-28(svn r17898) -Fix: [NoAI] Improve behaviour of ↵frosch
(AIEngine|AIEventEnginePreview)::GetCargoType() and AIEngine::CanRefitCargo() wrt. articulated vehicles.
2009-10-06(svn r17728) -Cleanup: Remove some more unneeded/unused parameters.frosch
2009-10-05(svn r17719) -Change: [NoAI] Make AIEngine:CanRefitCargo() not report ↵frosch
refittability to Mail by default for aircraft. It is not necessarily true, and the special case of carrying both passenger&mail is better handled by AIs themself than by the API.
2009-10-04(svn r17700) -Codechange: Integrate ShipVehicleInfo::refittable into ↵frosch
EngineInfo::refit_mask during initialisation.
2009-08-27(svn r17292) -Codechange: use unified ToPercent() function to convert fract ↵smatz
numbers to percents
2009-08-21(svn r17248) -Fix: add GPL license notice where appropriaterubidium
2009-07-31(svn r17014) -Add [NoAI]: AIEngine::GetDesignDateyexo
2009-06-27(svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a ↵frosch
CargoArray instead of a pointer to a static array.
2009-06-16(svn r16581) -Codechange: unify the access to Engine::lifelength.rubidium
2009-05-18(svn r16354) -Codechange: use 'new' pool accessors and methods for Engine toosmatz
2009-05-16(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)smatz
2009-03-18(svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and ↵frosch
use it everywhere, so CB 36 is also used everywhere.
2009-03-13(svn r15705) -Fix: Do not show passenger-/mail-capacity if the aircraft ↵frosch
carries only cargo.
2009-02-21(svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, ↵frosch
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-19(svn r15524) -Add [NoAI]: AIEngine::GetPower, AIEngine::GetWeight and ↵yexo
AIEngine::GetMaxTractiveEffort.
2009-02-01(svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions.frosch
2009-02-01(svn r15306) -Codechange: Deduplicate code by adding ↵frosch
Engine::GetDisplayMaxSpeed(), GetPower() and GetDisplayWeight(). (and using them)
2009-01-31(svn r15299) -Cleanup: remove many redundant includessmatz
2009-01-25(svn r15263) -Codechange: added Engine::GetCost() to remove some code ↵glx
duplication.
2009-01-24(svn r15261) -Add: added Engine::GetRunningCost() to remove some code ↵glx
duplication. Also stops AIs decrementing vehicle counter of first company
2009-01-17(svn r15123) -Fix [NoAI]: 'const char *' implies that the return value ↵truebrain
should not be free'd, which is should .. so make them 'char *'
2009-01-16(svn r15101) -Change [API CHANGE]: more consistant naming for consts:truebrain
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-13(svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEARsmatz
-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-12(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to ↵truebrain
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