Merge pull request #1189 from FlightControl-Master/FF/Develop

Ff/develop
This commit is contained in:
Frank 2019-08-14 16:44:20 -04:00 committed by GitHub
commit db7ec60c86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 3205 additions and 3160 deletions

View File

@ -695,7 +695,7 @@ ARTY.id="ARTY | "
--- Arty script version. --- Arty script version.
-- @field #string 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 if Event.text~=nil and Event.text:lower():find("arty") then
-- Convert (wrong x-->z, z-->x) vec3 -- Convert (wrong x-->z, z-->x) vec3
-- TODO: This needs to be "fixed", once DCS gives the correct numbers for x and z. -- DONE: 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} -- Was fixed in DCS 2.5.5.34644!
local vec3={y=Event.pos.y, x=Event.pos.z, z=Event.pos.x} 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. -- Get coordinate from vec3.
local _coord=COORDINATE:NewFromVec3(vec3) local _coord=COORDINATE:NewFromVec3(vec3)

View File

@ -1749,7 +1749,7 @@ _WAREHOUSEDB = {
--- Warehouse class version. --- Warehouse class version.
-- @field #string version -- @field #string version
WAREHOUSE.version="0.9.5" WAREHOUSE.version="0.9.6"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: Warehouse todo list. -- TODO: Warehouse todo list.
@ -5029,12 +5029,7 @@ function WAREHOUSE:onafterDestroyed(From, Event, To)
for k,_ in pairs(self.stock) do for k,_ in pairs(self.stock) do
self.stock[k]=nil self.stock[k]=nil
end end
--self.queue=nil
--self.queue={}
--self.stock=nil
--self.stock={}
end end
end end
@ -5814,11 +5809,9 @@ end
-- @param Wrapper.Group#GROUP group The group that arrived. -- @param Wrapper.Group#GROUP group The group that arrived.
function WAREHOUSE:_Arrived(group) function WAREHOUSE:_Arrived(group)
self:_DebugMessage(string.format("Group %s arrived!", tostring(group:GetName()))) self:_DebugMessage(string.format("Group %s arrived!", tostring(group:GetName())))
--self:E(string.format("Group %s arrived!", tostring(group:GetName())))
if group then if group then
--Trigger "Arrived event. --Trigger "Arrived event.
--group:SmokeBlue()
self:__Arrived(1, group) self:__Arrived(1, group)
end end
@ -5830,14 +5823,10 @@ end
-- @param #number n Waypoint passed. -- @param #number n Waypoint passed.
-- @param #number N Final waypoint. -- @param #number N Final waypoint.
function WAREHOUSE:_PassingWaypoint(group,n,N) function WAREHOUSE:_PassingWaypoint(group,n,N)
self:T(string.format("Group %s passing waypoint %d of %d!", tostring(group:GetName()), n, N)) self:T(self.wid..string.format("Group %s passing waypoint %d of %d!", tostring(group:GetName()), n, N))
if group then
--group:SmokeGreen()
end
-- Final waypoint reached.
if n==N then if n==N then
--group:SmokeBlue()
self:__Arrived(1, group) self:__Arrived(1, group)
end end

File diff suppressed because it is too large Load Diff

View File

@ -418,6 +418,13 @@ function RECOVERYTANKER:New(carrierunit, tankergroupname)
-- @param #RECOVERYTANKER self -- @param #RECOVERYTANKER self
-- @param #number delay Delay in seconds. -- @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. --- Triggers the FSM event "RefuelStart" when the tanker starts refueling another aircraft.
-- @function [parent=#RECOVERYTANKER] RefuelStart -- @function [parent=#RECOVERYTANKER] RefuelStart

View File

@ -346,6 +346,12 @@ function RESCUEHELO:New(carrierunit, helogroupname)
-- @param #RESCUEHELO self -- @param #RESCUEHELO self
-- @param #number delay Delay in seconds. -- @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. --- Triggers the FSM event "Rescue" that sends the helo on a rescue mission to a specifc coordinate.
-- @function [parent=#RESCUEHELO] Rescue -- @function [parent=#RESCUEHELO] Rescue

View File

@ -361,6 +361,26 @@ function AIRBASE:FindByName( AirbaseName )
return AirbaseFound return AirbaseFound
end 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 --- Get the DCS object of an airbase
-- @param #AIRBASE self -- @param #AIRBASE self
-- @return DCS#Airbase DCS airbase object. -- @return DCS#Airbase DCS airbase object.
@ -604,7 +624,7 @@ function AIRBASE:GetParkingSpotData(TerminalID)
for _,_spot in pairs(parkingdata) do for _,_spot in pairs(parkingdata) do
local spot=_spot --#AIRBASE.ParkingSpot 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 if TerminalID==spot.TerminalID then
return spot return spot
end end

View File

@ -136,6 +136,7 @@ function STATIC:Destroy( GenerateEvent )
end end
DCSObject:destroy() DCSObject:destroy()
return true
end end
return nil return nil