mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 04:59:11 +00:00
(svn r18725) -Add: [NoAI] AIWaypoint::WaypointType and AIWaypoint::HasWaypointType().
-Change: [NoAI] Constructor of AIWaypoint now takes a WaypointType to also handle buoys. -Remove: [NoAI] AIBuoyList.
This commit is contained in:
@@ -250,3 +250,11 @@ AIEngine.GetPlaneType <- function(engine_id)
|
||||
if (!AIEngine.IsBuildable(engine_id)) return -1;
|
||||
return AIEngine._GetPlaneType(engine_id);
|
||||
}
|
||||
|
||||
_AIWaypointList <- AIWaypointList;
|
||||
class AIWaypointList extends _AIWaypointList {
|
||||
constructor()
|
||||
{
|
||||
::_AIWaypointList.constructor(AIWaypoint.WAYPOINT_RAIL);
|
||||
}
|
||||
}
|
||||
|
@@ -805,13 +805,17 @@ function Regression::Marine()
|
||||
print(" IsCanalTile(): " + AIMarine.IsCanalTile(32127));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
|
||||
local list = AIBuoyList();
|
||||
local list = AIWaypointList(AIWaypoint.WAYPOINT_BUOY);
|
||||
print("");
|
||||
print("--AIBuoyList--");
|
||||
print("--AIWaypointList(BUOY)--");
|
||||
print(" Count(): " + list.Count());
|
||||
print(" Location ListDump:");
|
||||
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
|
||||
print(" " + i);
|
||||
print(" " + AIWaypoint.GetLocation(i));
|
||||
}
|
||||
print(" HasWaypointType:");
|
||||
for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
|
||||
print(" " + AIWaypoint.HasWaypointType(i, AIWaypoint.WAYPOINT_RAIL) + " " + AIWaypoint.HasWaypointType(i, AIWaypoint.WAYPOINT_BUOY) + " " + AIWaypoint.HasWaypointType(i, AIWaypoint.WAYPOINT_ANY));
|
||||
}
|
||||
print("");
|
||||
|
||||
|
@@ -7100,10 +7100,12 @@
|
||||
IsCanalTile(): true
|
||||
GetBankBalance(): 1999951154
|
||||
|
||||
--AIBuoyList--
|
||||
--AIWaypointList(BUOY)--
|
||||
Count(): 1
|
||||
Location ListDump:
|
||||
28481
|
||||
HasWaypointType:
|
||||
false true false
|
||||
|
||||
RemoveWaterDepot(): true
|
||||
RemoveDock(): true
|
||||
|
Reference in New Issue
Block a user