yexo
10c98f7e0e
(svn r16109) -Fix [NoAI]: Make sure AIOrder::GetDestination always returns a tile belonging to the station
16 years ago
yexo
63db874050
(svn r16108) -Fix [NoAI]: When giving an aircraft a goto-hangar order don't let it be a normal goto-station order.
...
Note to AI writers: AIOrder.AppendOrder(vehicle_id, AIStation.GetLocation(station_id)) will give a goto-hangar order for helistations (assuming the station sign is at it's default location).
16 years ago
yexo
61d883e7e5
(svn r16107) -Add [NoAI]: AIOF_STOP_IN_DEPOT to the orderflags in AIOrder to allow stop-in-depot orders
16 years ago
yexo
a664a2668c
(svn r16106) -Fix [NoAI]: AIOrder::SetOrderFlags always removed "Service if needed" from goto-depot orders.
16 years ago
frosch
90ebf211dc
(svn r16094) -Fix: AIDebug window profiled the blitters by invalidating itself unconditionally on repaint. OTOH it was not invalidated in other cases when needed.
16 years ago
yexo
a91ff2d5e8
(svn r16093) -Feature [FS#2808]: Add GetURL() as possible function to info.nut. If AIs implement it, that url is shown when the AI crashes and also in the AI selection window.
16 years ago
yexo
3e2e5b097c
(svn r16091) -Change [FS#2778]: Reverse the order of the lines in the AI debug window
16 years ago
frosch
eb7414ea9e
(svn r16062) -Fix (r16037): AIOrder::InsertOrder was broken. Default all AI orders to 'stop at far end'.
16 years ago
rubidium
bee930f9b3
(svn r16024) -Codechange: harden string copying on places where it's possible
16 years ago
yexo
57dab45e75
(svn r15910) -Fix [FS#2777]: Clarify that TILE_INVALID is part of AIMap make doxygen output some documentation for it.
16 years ago
frosch
f55be81e3c
(svn r15901) -Add: AIIndustryType::IsBuiltOnWater(), HasHeliport() and HasDock(). Just like AIIndustry.
16 years ago
alberth
9d2738b9c4
(svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback
16 years ago
yexo
50a6e589ed
(svn r15881) -Fix (r15875): add an explicit cast so some compilers stop complaining.
16 years ago
yexo
400208ee0a
(svn r15875) -Add: AIBridge::GetBridgeID() so AIs can get the type of bridge that are already build.
16 years ago
frosch
44351cdc57
(svn r15860) -Add: AIRoad::GetRoadVehicleTypeForCargo() to tell whether a certain cargo needs a bus- or a truckstop.
16 years ago
frosch
19b47c1e89
(svn r15859) -Documentation: Meaning of AICargo::CC_PASSENGERS wrt. bus- and truckstops, and meaning of AICargo::IsFreight() wrt. freight train weight multiplier.
16 years ago
yexo
809e4f398c
(svn r15852) -Codechange: New widgets for the AI windows.
16 years ago
rubidium
3e93f8adda
(svn r15844) -Codechange: allow text alignment to be forced so the console and ai debug output don't get swapped (those are untranslateable anyways)
16 years ago
yexo
84fb615344
(svn r15835) -Codechange: Prevent using the return value of DrawString as much as possible.
16 years ago
rubidium
22d4270ea8
(svn r15811) -Fix: left != right and as a result of that the ai debug window was kinda empty.
16 years ago
rubidium
ead0a6a6e5
(svn r15806) -Codechange: pass both left and right to the vehicle details drawing functions instead of only the left.
16 years ago
rubidium
d837fc4d03
(svn r15797) -Codechange: make users of the old DrawStringMultiLine use the new one.
16 years ago
frosch
d452a0a0ec
(svn r15789) -Codechange: Add DiagdirBetweenTiles() and use it.
16 years ago
rubidium
45f189fdca
(svn r15785) -Codechange: remove the *Truncated part of the old text drawing API.
16 years ago
yexo
971ed8d2a3
(svn r15781) -Fix [NoAI]: Missing "AIs" in the information the debug AI prints.
16 years ago
yexo
d2dae07595
(svn r15774) -Fix (r15708): Don't show the message about reporting an AI crash for the dummy AI.
16 years ago
frosch
6dd04a9a78
(svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere.
16 years ago
yexo
384599ef2c
(svn r15743) -Codechange: move the definitions of some fake squirrel types to their own file.
16 years ago
yexo
b078f8095a
(svn r15742) -Fix (r15736): AIs with an invalid info.nut weren't ignored anymore.
16 years ago
yexo
ce4744e1d6
(svn r15736) -Codechange: Split AIScanner/AIFileInfo to the more generic classes ScriptScanner/ScriptFileInfo.
16 years ago
rubidium
f9def73be6
(svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth)
16 years ago
rubidium
8761a5a4c4
(svn r15721) -Change: give a more useful (for 'normal' users) error message when there's no AI and they want to play with an AI
16 years ago
rubidium
b25a4f8231
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
16 years ago
yexo
86a9df82b7
(svn r15716) -Change [NoAI]: AI libraries should now be stored in ai/library/<library_name>/ instead of ai/library/<category_name>/<library_name>/. Libraries inside tar files are not affected.
16 years ago
rubidium
9d018723b7
(svn r15711) -Codechange: lots of whitespace cleanup/fixes
16 years ago
yexo
2e6e2457f1
(svn r15708) -Feature [FS#2728]: Pop up the AI Debug Window if one of the AIs crashed and show a message that the user should report the crash.
16 years ago
frosch
fa35dc10e5
(svn r15705) -Fix: Do not show passenger-/mail-capacity if the aircraft carries only cargo.
16 years ago
yexo
cef662825b
(svn r15684) -Add [NoAI]: AIOrder::SkipToOrder().
16 years ago
yexo
13fb01d07d
(svn r15668) -Fix: a few typos.
16 years ago
yexo
1ff06b3f9c
(svn r15658) -Fix [NoAI]: Rewrite AIAbstractList::Valuate to make it more readable and fix a crash if no parameters are given to that function.
16 years ago
truebrain
3ca01c64f7
(svn r15638) -Fix: there is a time in your life you should stop coding for a project. You know that time is there when you make two huge mistakes in just 10 lines of code. I wish you all the best of luck :) (ps: HUGE mistakes!)
16 years ago
yexo
3633fd9a06
(svn r15630) -Fix (r15027): Make sure OpenTTD loads the dummy AI script when no other AI is available instead of a non-existing file.
16 years ago
yexo
890c5e3ae4
(svn r15616) -Change [API CHANGE]: Rename AIOrder::ChangeOrder() to AIOrder::SetOrderFlags().
16 years ago
yexo
ffe2caf20f
(svn r15614) -Add [NoAI]: AIVehicleList_Group(group_id) and AIVehicleList_DefaultGroup(vehicle_type).
16 years ago
yexo
a41b143e58
(svn r15587) -Fix (r15345): I should really test even those simple api functions better.
16 years ago
yexo
932b1c24b2
(svn r15563) -Change [API CHANGE]: Remove AIIndustry::GetMaxIndustryID().
16 years ago
yexo
1884ba20bc
(svn r15562) -Change: Use GetName() to determine the unique AI name instead of GetInstanceName() to make branching of AIs easier.
16 years ago
yexo
cabfe35e54
(svn r15558) -Cleanup: Remove some unnecessary friend declarations.
16 years ago
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.
16 years ago
yexo
c3c549f731
(svn r15538) -Fix (r15334): The difficulty level wasn't set to custom when changing the amount of towns/industries from the newgame gui.
16 years ago
glx
ab3fc1d437
(svn r15535) -Fix (r15460, pre noai merge): use '.' as 'any' for squirrel calls typechecking as stated in squirrel docs
16 years ago
yexo
07a37af14c
(svn r15530) -Fix (r15519): The AIWaypoint classes were not exported to squirrel.
16 years ago
yexo
a54061f840
(svn r15527) -Fix (r15526): A ')' too much.
16 years ago
yexo
b3fe664d90
(svn r15526) -Add [NoAI]: Support for conditional orders.
16 years ago
yexo
3491b0fab9
(svn r15524) -Add [NoAI]: AIEngine::GetPower, AIEngine::GetWeight and AIEngine::GetMaxTractiveEffort.
16 years ago
yexo
459a855e60
(svn r15520) -Cleanup [NoAI]: Fix some typos, unify the comment style and update some documentation since a few enums have been renamed.
16 years ago
yexo
c0e7ddeb9e
(svn r15519) -Add [NoAI]: support for waypoints by adding AIRail::Build/Remove RailWaypoint, AIWaypoint and AIWaypointList.
16 years ago
yexo
a0b57c849e
(svn r15494) -Change [API CHANGE]: Split AIRoad::BuildRoadStation in BuildRoadStation and BuildDriveThroughRoadStation.
16 years ago
yexo
2b221f5afc
(svn r15492) -Change [API CHANGE]: Split AIVehicle::MoveWagon in MoveWagon and MoveWagonChain (frosch).
16 years ago
yexo
336abd66a2
(svn r15491) -Change [API CHANGE]: AIMarine::BuildWaterDepot now accepts a front tile instead of a bool is_vertical (frosch).
16 years ago
yexo
7d88077add
(svn r15490) -Change [API CHANGE]: Remove AIBridge::GetYearAvailable. AIBridge::IsValidBridge now only returns true for available bridges.
16 years ago
yexo
16954ba378
(svn r15489) -Change [API CHANGE]: Remove AIAirport::AirportAvailable. AIAirport::IsValidAirportType now only returns true for available AirportTypes.
16 years ago
yexo
bce1bcb0f2
(svn r15488) -Change [API CHANGE]: Add support for distant-join stations.
16 years ago
yexo
5a5bc8ab52
(svn r15487) -Change [API CHANGE]: Remove the never implemented function AIEventVehicleCrashed::CloneCrashedVehicle.
16 years ago
yexo
8ceb92e699
(svn r15486) -Change [API CHANGE]: Remove AITown::GetMaxTownID.
16 years ago
yexo
cea470e687
(svn r15485) -Change [API CHANGE]: Split AIIndustry::HasHeliportAndDock and GetHeliportAndDockLocation in HasHeliport/HasDock and GetHeliportLocation/GetDockLocation.
16 years ago
yexo
58359b8d6e
(svn r15484) -Change [API CHANGE]: Remove AICompany::GetCompanyName and SetCompanyName. They've been replaced with GetName and SetName.
16 years ago
yexo
7fdde2fec0
(svn r15483) -Change [API CHANGE]: Remove AIIndustry::GetProduction, use AIIndustry::GetLastMonthProduction instead.
16 years ago
yexo
92fc2e692c
(svn r15482) -Fix [NoAI]: Typos in api docs.
16 years ago
yexo
37819fc8c5
(svn r15481) -Fix [NoAI]: Make sure AIs can't call functions they shouldn't call.
16 years ago
frosch
b123756c9f
(svn r15479) -Fix: Documentation of AIIndustryType::CanBuildIndustry().
16 years ago
yexo
e84f25a2bd
(svn r15470) -Fix [NoAI]: Check the types of the parameters passed to AddSetting, AddLabels and RegisterAI.
16 years ago
yexo
8e14d77d05
(svn r15467) -Fix [NoAI]: AIs with an error in their info.nut are no longer available in-game.
16 years ago
yexo
15b9366f06
(svn r15466) -Fix (r15330): The squirrel instance object was freed twice if an info.nut failed to compile.
16 years ago
smatz
d3f018a7e3
(svn r15465) -Codechange: constify most of AIInfo/AIFileInfo methods, move definition of very simple getters to header file
16 years ago
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