mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge pull request #1189 from FlightControl-Master/FF/Develop
Ff/develop
This commit is contained in:
commit
db7ec60c86
@ -695,7 +695,7 @@ ARTY.id="ARTY | "
|
||||
|
||||
--- Arty script version.
|
||||
-- @field #string version
|
||||
ARTY.version="1.1.2"
|
||||
ARTY.version="1.1.3"
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -2474,9 +2474,10 @@ function ARTY:_OnEventMarkChange(Event)
|
||||
if Event.text~=nil and Event.text:lower():find("arty") then
|
||||
|
||||
-- Convert (wrong x-->z, z-->x) vec3
|
||||
-- TODO: This needs to be "fixed", once DCS gives the correct numbers for x and z.
|
||||
-- local vec3={y=Event.pos.y, x=Event.pos.x, z=Event.pos.z}
|
||||
local vec3={y=Event.pos.y, x=Event.pos.z, z=Event.pos.x}
|
||||
-- DONE: This needs to be "fixed", once DCS gives the correct numbers for x and z.
|
||||
-- Was fixed in DCS 2.5.5.34644!
|
||||
local vec3={y=Event.pos.y, x=Event.pos.x, z=Event.pos.z}
|
||||
--local vec3={y=Event.pos.y, x=Event.pos.z, z=Event.pos.x}
|
||||
|
||||
-- Get coordinate from vec3.
|
||||
local _coord=COORDINATE:NewFromVec3(vec3)
|
||||
|
||||
@ -1749,7 +1749,7 @@ _WAREHOUSEDB = {
|
||||
|
||||
--- Warehouse class version.
|
||||
-- @field #string version
|
||||
WAREHOUSE.version="0.9.5"
|
||||
WAREHOUSE.version="0.9.6"
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- TODO: Warehouse todo list.
|
||||
@ -5029,12 +5029,7 @@ function WAREHOUSE:onafterDestroyed(From, Event, To)
|
||||
for k,_ in pairs(self.stock) do
|
||||
self.stock[k]=nil
|
||||
end
|
||||
|
||||
--self.queue=nil
|
||||
--self.queue={}
|
||||
|
||||
--self.stock=nil
|
||||
--self.stock={}
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@ -5814,11 +5809,9 @@ end
|
||||
-- @param Wrapper.Group#GROUP group The group that arrived.
|
||||
function WAREHOUSE:_Arrived(group)
|
||||
self:_DebugMessage(string.format("Group %s arrived!", tostring(group:GetName())))
|
||||
--self:E(string.format("Group %s arrived!", tostring(group:GetName())))
|
||||
|
||||
if group then
|
||||
--Trigger "Arrived event.
|
||||
--group:SmokeBlue()
|
||||
self:__Arrived(1, group)
|
||||
end
|
||||
|
||||
@ -5830,14 +5823,10 @@ end
|
||||
-- @param #number n Waypoint passed.
|
||||
-- @param #number N Final waypoint.
|
||||
function WAREHOUSE:_PassingWaypoint(group,n,N)
|
||||
self:T(string.format("Group %s passing waypoint %d of %d!", tostring(group:GetName()), n, N))
|
||||
|
||||
if group then
|
||||
--group:SmokeGreen()
|
||||
end
|
||||
self:T(self.wid..string.format("Group %s passing waypoint %d of %d!", tostring(group:GetName()), n, N))
|
||||
|
||||
-- Final waypoint reached.
|
||||
if n==N then
|
||||
--group:SmokeBlue()
|
||||
self:__Arrived(1, group)
|
||||
end
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -418,6 +418,13 @@ function RECOVERYTANKER:New(carrierunit, tankergroupname)
|
||||
-- @param #RECOVERYTANKER self
|
||||
-- @param #number delay Delay in seconds.
|
||||
|
||||
--- On after "Start" event function. Called when FSM is started.
|
||||
-- @function [parent=#RECOVERYTANKER] OnAfterStart
|
||||
-- @param #RECOVERYTANKER self
|
||||
-- @param #string From From state.
|
||||
-- @param #string Event Event.
|
||||
-- @param #string To To state.
|
||||
|
||||
|
||||
--- Triggers the FSM event "RefuelStart" when the tanker starts refueling another aircraft.
|
||||
-- @function [parent=#RECOVERYTANKER] RefuelStart
|
||||
|
||||
@ -346,6 +346,12 @@ function RESCUEHELO:New(carrierunit, helogroupname)
|
||||
-- @param #RESCUEHELO self
|
||||
-- @param #number delay Delay in seconds.
|
||||
|
||||
--- On after "Start" event function. Called when FSM is started.
|
||||
-- @function [parent=#RESCUEHELO] OnAfterStart
|
||||
-- @param #RECOVERYTANKER self
|
||||
-- @param #string From From state.
|
||||
-- @param #string Event Event.
|
||||
-- @param #string To To state.
|
||||
|
||||
--- Triggers the FSM event "Rescue" that sends the helo on a rescue mission to a specifc coordinate.
|
||||
-- @function [parent=#RESCUEHELO] Rescue
|
||||
|
||||
@ -361,6 +361,26 @@ function AIRBASE:FindByName( AirbaseName )
|
||||
return AirbaseFound
|
||||
end
|
||||
|
||||
--- Find a AIRBASE in the _DATABASE by its ID.
|
||||
-- @param #AIRBASE self
|
||||
-- @param #number id Airbase ID.
|
||||
-- @return #AIRBASE self
|
||||
function AIRBASE:FindByID(id)
|
||||
|
||||
for name,_airbase in pairs(_DATABASE.AIRBASES) do
|
||||
local airbase=_airbase --#AIRBASE
|
||||
|
||||
local aid=tonumber(airbase:GetID())
|
||||
|
||||
if aid==id then
|
||||
return airbase
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Get the DCS object of an airbase
|
||||
-- @param #AIRBASE self
|
||||
-- @return DCS#Airbase DCS airbase object.
|
||||
@ -604,7 +624,7 @@ function AIRBASE:GetParkingSpotData(TerminalID)
|
||||
|
||||
for _,_spot in pairs(parkingdata) do
|
||||
local spot=_spot --#AIRBASE.ParkingSpot
|
||||
self:E({TerminalID=spot.TerminalID,TerminalType=spot.TerminalType})
|
||||
self:T({TerminalID=spot.TerminalID,TerminalType=spot.TerminalType})
|
||||
if TerminalID==spot.TerminalID then
|
||||
return spot
|
||||
end
|
||||
|
||||
@ -136,6 +136,7 @@ function STATIC:Destroy( GenerateEvent )
|
||||
end
|
||||
|
||||
DCSObject:destroy()
|
||||
return true
|
||||
end
|
||||
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user