Merge branch 'FF/Ops' into FF/OpsDev

This commit is contained in:
Frank 2021-11-07 18:24:48 +01:00
commit 3d88d16b4b
25 changed files with 191446 additions and 892 deletions

View File

@ -0,0 +1,24 @@
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
local base = _G
__Moose = {}
__Moose.Include = function( IncludeFile )
if not __Moose.Includes[ IncludeFile ] then
__Moose.Includes[IncludeFile] = IncludeFile
local f = assert( base.loadfile( IncludeFile ) )
if f == nil then
error ("Moose: Could not load Moose file " .. IncludeFile )
else
env.info( "Moose: " .. IncludeFile .. " dynamically loaded." )
return f()
end
end
end
__Moose.Includes = {}
__Moose.Include( 'Scripts/Moose/Modules.lua' )
BASE:TraceOnOff( true )
env.info( '*** MOOSE INCLUDE END *** ' )

File diff suppressed because it is too large Load Diff

View File

@ -207,7 +207,7 @@ end
do -- MENU_BASE do -- MENU_BASE
--- @type MENU_BASE --- @type MENU_BASE
-- @extends Base#BASE -- @extends Core.Base#BASE
--- Defines the main MENU class where other MENU classes are derived from. --- Defines the main MENU class where other MENU classes are derived from.
-- This is an abstract class, so don't use it. -- This is an abstract class, so don't use it.

View File

@ -336,17 +336,14 @@ do -- SET_BASE
-- @return Core.Set#SET_BASE The set of objects that are in set *B* but **not** in this set *A*. -- @return Core.Set#SET_BASE The set of objects that are in set *B* but **not** in this set *A*.
function SET_BASE:GetSetComplement(SetB) function SET_BASE:GetSetComplement(SetB)
local complement=SET_BASE:New() local complement = self:GetSetUnion(SetB)
local intersection = self:GetSetIntersection(SetB)
local union=self:GetSetUnion(SetA, SetB) for _,Object in pairs(intersection.Set) do
complement:Remove(Object.ObjectName,true)
for _,Object in pairs(union.Set) do
if SetA:IsIncludeObject(Object) and SetB:IsIncludeObject(Object) then
intersection:Add(intersection)
end
end end
return intersection return complement
end end

View File

@ -30,6 +30,7 @@
-- * Detect and lase contacts automatically -- * Detect and lase contacts automatically
-- * Targets are lased by threat priority order -- * Targets are lased by threat priority order
-- * Use FSM events to link functionality into your scripts -- * Use FSM events to link functionality into your scripts
-- * Set laser codes and smoke colors per Recce unit
-- * Easy set-up -- * Easy set-up
-- --
-- # 2 Basic usage -- # 2 Basic usage
@ -46,7 +47,7 @@
-- --
-- local autolaser = AUTOLASE:New(FoxSet,coalition.side.BLUE,"Wolfpack",Pilotset) -- local autolaser = AUTOLASE:New(FoxSet,coalition.side.BLUE,"Wolfpack",Pilotset)
-- --
-- ## 2.5 Example - Using a fixed laser code for a specific Recce unit: -- ## 2.5 Example - Using a fixed laser code and color for a specific Recce unit:
-- --
-- local recce = SPAWN:New("Reaper") -- local recce = SPAWN:New("Reaper")
-- :InitDelayOff() -- :InitDelayOff()
@ -55,6 +56,7 @@
-- local unit = group:GetUnit(1) -- local unit = group:GetUnit(1)
-- local name = unit:GetName() -- local name = unit:GetName()
-- autolaser:SetRecceLaserCode(name,1688) -- autolaser:SetRecceLaserCode(name,1688)
-- autolaser:SetRecceSmokeColor(name,SMOKECOLOR.Red)
-- end -- end
-- ) -- )
-- :InitCleanUp(60) -- :InitCleanUp(60)
@ -71,7 +73,7 @@
-- @module Functional.Autolase -- @module Functional.Autolase
-- @image Designation.JPG -- @image Designation.JPG
-- --
-- Date: Oct 2021 -- Date: 24 Oct 2021
-- --
--- Class AUTOLASE --- Class AUTOLASE
-- @type AUTOLASE -- @type AUTOLASE
@ -107,7 +109,7 @@ AUTOLASE = {
--- AUTOLASE class version. --- AUTOLASE class version.
-- @field #string version -- @field #string version
AUTOLASE.version = "0.0.8" AUTOLASE.version = "0.0.10"
------------------------------------------------------------------- -------------------------------------------------------------------
-- Begin Functional.Autolase.lua -- Begin Functional.Autolase.lua
@ -169,6 +171,7 @@ function AUTOLASE:New(RecceSet, Coalition, Alias, PilotSet)
self.UnitsByThreat = {} self.UnitsByThreat = {}
self.RecceNames = {} self.RecceNames = {}
self.RecceLaserCode = {} self.RecceLaserCode = {}
self.RecceSmokeColor = {}
self.RecceUnitNames= {} self.RecceUnitNames= {}
self.maxlasing = 4 self.maxlasing = 4
self.CurrentLasing = {} self.CurrentLasing = {}
@ -294,6 +297,7 @@ end
-- @param #AUTOLASE self -- @param #AUTOLASE self
-- @return #AUTOLASE self -- @return #AUTOLASE self
function AUTOLASE:SetPilotMenu() function AUTOLASE:SetPilotMenu()
if self.usepilotset then
local pilottable = self.pilotset:GetSetObjects() or {} local pilottable = self.pilotset:GetSetObjects() or {}
for _,_unit in pairs (pilottable) do for _,_unit in pairs (pilottable) do
local Unit = _unit -- Wrapper.Unit#UNIT local Unit = _unit -- Wrapper.Unit#UNIT
@ -303,6 +307,7 @@ function AUTOLASE:SetPilotMenu()
lasemenu:Refresh() lasemenu:Refresh()
end end
end end
end
return self return self
end end
@ -330,6 +335,20 @@ function AUTOLASE:GetLaserCode(RecceName)
return code return code
end end
--- (Internal) Function to get a smoke color by recce name
-- @param #AUTOLASE self
-- @param #string RecceName Unit(!) name of the Recce
-- @return #AUTOLASE self
function AUTOLASE:GetSmokeColor(RecceName)
local color = self.smokecolor
if self.RecceSmokeColor[RecceName] == nil then
self.RecceSmokeColor[RecceName] = color
else
color = self.RecceLaserCode[RecceName]
end
return color
end
--- (User) Function enable sending messages via SRS. --- (User) Function enable sending messages via SRS.
-- @param #AUTOLASE self -- @param #AUTOLASE self
-- @param #boolean OnOff Switch usage on and off -- @param #boolean OnOff Switch usage on and off
@ -374,6 +393,17 @@ function AUTOLASE:SetRecceLaserCode(RecceName, Code)
return self return self
end end
--- (User) Function to set a specific smoke color for a Recce.
-- @param #AUTOLASE self
-- @param #string RecceName (Unit!) Name of the Recce
-- @param #number Color The color, e.g. SMOKECOLOR.Red, SMOKECOLOR.Green etc
-- @return #AUTOLASE self
function AUTOLASE:SetRecceSmokeColor(RecceName, Color)
local color = Color or self.smokecolor
self.RecceSmokeColor[RecceName] = color
return self
end
--- (User) Function to force laser cooldown and cool down time --- (User) Function to force laser cooldown and cool down time
-- @param #AUTOLASE self -- @param #AUTOLASE self
-- @param #boolean OnOff Switch cool down on (true) or off (false) - defaults to true -- @param #boolean OnOff Switch cool down on (true) or off (false) - defaults to true
@ -812,7 +842,8 @@ function AUTOLASE:onafterMonitor(From, Event, To)
} }
if self.smoketargets then if self.smoketargets then
local coord = unit:GetCoordinate() local coord = unit:GetCoordinate()
coord:Smoke(self.smokecolor) local color = self:GetSmokeColor(reccename)
coord:Smoke(color)
end end
self.lasingindex = self.lasingindex + 1 self.lasingindex = self.lasingindex + 1
self.CurrentLasing[self.lasingindex] = laserspot self.CurrentLasing[self.lasingindex] = laserspot

View File

@ -23,7 +23,6 @@
-- @module Functional.FOX -- @module Functional.FOX
-- @image Functional_FOX.png -- @image Functional_FOX.png
--- FOX class. --- FOX class.
-- @type FOX -- @type FOX
-- @field #string ClassName Name of the class. -- @field #string ClassName Name of the class.
@ -48,7 +47,6 @@
-- @field #number dt05 Time step [sec] for missile position updates if distance to target > 5 km and < 10 km. Default 0.5 sec. -- @field #number dt05 Time step [sec] for missile position updates if distance to target > 5 km and < 10 km. Default 0.5 sec.
-- @field #number dt01 Time step [sec] for missile position updates if distance to target > 1 km and < 5 km. Default 0.1 sec. -- @field #number dt01 Time step [sec] for missile position updates if distance to target > 1 km and < 5 km. Default 0.1 sec.
-- @field #number dt00 Time step [sec] for missile position updates if distance to target < 1 km. Default 0.01 sec. -- @field #number dt00 Time step [sec] for missile position updates if distance to target < 1 km. Default 0.01 sec.
-- @field #boolean
-- @extends Core.Fsm#FSM -- @extends Core.Fsm#FSM
--- Fox 3! --- Fox 3!

View File

@ -19,7 +19,7 @@
-- --
-- @module Functional.Mantis -- @module Functional.Mantis
-- @image Functional.Mantis.jpg -- @image Functional.Mantis.jpg
--
-- Date: July 2021 -- Date: July 2021
------------------------------------------------------------------------- -------------------------------------------------------------------------

View File

@ -284,9 +284,11 @@ function SCORING:New( GameName )
-- Default fratricide penalty level (maximum penalty that can be assigned to a player before he gets kicked). -- Default fratricide penalty level (maximum penalty that can be assigned to a player before he gets kicked).
self:SetFratricide( self.ScaleDestroyPenalty * 3 ) self:SetFratricide( self.ScaleDestroyPenalty * 3 )
self.penaltyonfratricide = true
-- Default penalty when a player changes coalition. -- Default penalty when a player changes coalition.
self:SetCoalitionChangePenalty( self.ScaleDestroyPenalty ) self:SetCoalitionChangePenalty( self.ScaleDestroyPenalty )
self.penaltyoncoalitionchange = true
self:SetDisplayMessagePrefix() self:SetDisplayMessagePrefix()
@ -582,6 +584,23 @@ function SCORING:SetFratricide( Fratricide )
return self return self
end end
--- Decide if Fratricide is leading to penalties (true) or not (fals)
-- @param #SCORING self
-- @param #boolean OnOff Switch for Fratricide
-- @return #SCORING
function SCORING:SwitchFratricide( OnOff )
self.penaltyonfratricide = OnOff
return self
end
--- Decide if Coalition Changes is leading to penalties (true) or not (fals)
-- @param #SCORING self
-- @param #boolean OnOff Switch for Coalition Changes.
-- @return #SCORING
function SCORING:SwitchTreason( OnOff )
self.penaltyoncoalitionchange = OnOff
return self
end
--- When a player changes the coalition, he can receive a penalty score. --- When a player changes the coalition, he can receive a penalty score.
-- Use the method @{#SCORING.SetCoalitionChangePenalty}() to define the penalty when a player changes coalition. -- Use the method @{#SCORING.SetCoalitionChangePenalty}() to define the penalty when a player changes coalition.
@ -647,14 +666,15 @@ function SCORING:_AddPlayerFromUnit( UnitData )
if not self.Players[PlayerName].UnitCoalition then if not self.Players[PlayerName].UnitCoalition then
self.Players[PlayerName].UnitCoalition = UnitCoalition self.Players[PlayerName].UnitCoalition = UnitCoalition
else else
if self.Players[PlayerName].UnitCoalition ~= UnitCoalition then -- TODO: switch for coalition changes, make penalty alterable
self.Players[PlayerName].Penalty = self.Players[PlayerName].Penalty + 50 if self.Players[PlayerName].UnitCoalition ~= UnitCoalition and self.penaltyoncoalitionchange then
self.Players[PlayerName].Penalty = self.Players[PlayerName].Penalty + self.CoalitionChangePenalty or 50
self.Players[PlayerName].PenaltyCoalition = self.Players[PlayerName].PenaltyCoalition + 1 self.Players[PlayerName].PenaltyCoalition = self.Players[PlayerName].PenaltyCoalition + 1
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' changed coalition from " .. _SCORINGCoalition[self.Players[PlayerName].UnitCoalition] .. " to " .. _SCORINGCoalition[UnitCoalition] .. MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' changed coalition from " .. _SCORINGCoalition[self.Players[PlayerName].UnitCoalition] .. " to " .. _SCORINGCoalition[UnitCoalition] ..
"(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). 50 Penalty points added.", "(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). ".. self.CoalitionChangePenalty .."Penalty points added.",
MESSAGE.Type.Information MESSAGE.Type.Information
):ToAll() ):ToAll()
self:ScoreCSV( PlayerName, "", "COALITION_PENALTY", 1, -50, self.Players[PlayerName].UnitName, _SCORINGCoalition[self.Players[PlayerName].UnitCoalition], _SCORINGCategory[self.Players[PlayerName].UnitCategory], self.Players[PlayerName].UnitType, self:ScoreCSV( PlayerName, "", "COALITION_PENALTY", 1, -1*self.CoalitionChangePenalty, self.Players[PlayerName].UnitName, _SCORINGCoalition[self.Players[PlayerName].UnitCoalition], _SCORINGCategory[self.Players[PlayerName].UnitCategory], self.Players[PlayerName].UnitType,
UnitName, _SCORINGCoalition[UnitCoalition], _SCORINGCategory[UnitCategory], UnitData:GetTypeName() ) UnitName, _SCORINGCoalition[UnitCoalition], _SCORINGCategory[UnitCategory], UnitData:GetTypeName() )
end end
end end
@ -667,7 +687,8 @@ function SCORING:_AddPlayerFromUnit( UnitData )
self.Players[PlayerName].ThreatLevel = UnitThreatLevel self.Players[PlayerName].ThreatLevel = UnitThreatLevel
self.Players[PlayerName].ThreatType = UnitThreatType self.Players[PlayerName].ThreatType = UnitThreatType
if self.Players[PlayerName].Penalty > self.Fratricide * 0.50 then -- TODO: make fratricide switchable
if self.Players[PlayerName].Penalty > self.Fratricide * 0.50 and self.penaltyonfratricide then
if self.Players[PlayerName].PenaltyWarning < 1 then if self.Players[PlayerName].PenaltyWarning < 1 then
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than " .. self.Fratricide .. ", you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty, MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than " .. self.Fratricide .. ", you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty,
MESSAGE.Type.Information MESSAGE.Type.Information
@ -676,7 +697,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
end end
end end
if self.Players[PlayerName].Penalty > self.Fratricide then if self.Players[PlayerName].Penalty > self.Fratricide and self.penaltyonfratricide then
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!", MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!",
MESSAGE.Type.Information MESSAGE.Type.Information
):ToAll() ):ToAll()
@ -1121,9 +1142,9 @@ function SCORING:_EventOnHit( Event )
if InitCoalition then -- A coalition object was hit, probably a static. if InitCoalition then -- A coalition object was hit, probably a static.
if InitCoalition == TargetCoalition then if InitCoalition == TargetCoalition then
-- TODO: Penalty according scale -- TODO: Penalty according scale
Player.Penalty = Player.Penalty + 10 Player.Penalty = Player.Penalty + 10 --* self.ScaleDestroyPenalty
PlayerHit.Penalty = PlayerHit.Penalty + 10 PlayerHit.Penalty = PlayerHit.Penalty + 10 --* self.ScaleDestroyPenalty
PlayerHit.PenaltyHit = PlayerHit.PenaltyHit + 1 PlayerHit.PenaltyHit = PlayerHit.PenaltyHit + 1 * self.ScaleDestroyPenalty
MESSAGE MESSAGE
:NewType( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit friendly target " .. :NewType( self.DisplayMessagePrefix .. "Player '" .. Event.WeaponPlayerName .. "' hit friendly target " ..

View File

@ -41,6 +41,7 @@
-- @field #boolean UseEmOnOff Decide if we are using Emission on/off (default) or AlarmState red/green. -- @field #boolean UseEmOnOff Decide if we are using Emission on/off (default) or AlarmState red/green.
-- @extends Core.Base#BASE -- @extends Core.Base#BASE
--- *Good friends are worth defending.* Mr Tushman, Wonder (the Movie) --- *Good friends are worth defending.* Mr Tushman, Wonder (the Movie)
-- --
-- Simple Class for a more intelligent Short Range Air Defense System -- Simple Class for a more intelligent Short Range Air Defense System

View File

@ -51,7 +51,7 @@
-- --
-- At the moment, optimized parameters are available for the F/A-18C Hornet (Lot 20) and A-4E community mod as aircraft and the USS John C. Stennis as carrier. -- At the moment, optimized parameters are available for the F/A-18C Hornet (Lot 20) and A-4E community mod as aircraft and the USS John C. Stennis as carrier.
-- --
-- The AV-8B Harrier, the USS Tarawa, USS America and Juan Carlos I are WIP. The AV-8B harrier and the LHA's and LHD can only be used together, i.e. these ships are the only carriers the harrier is supposed to land on and -- The AV-8B Harrier, the USS Tarawa, USS America, HMAS Canberra and Juan Carlos I are WIP. The AV-8B harrier and the LHA's and LHD can only be used together, i.e. these ships are the only carriers the harrier is supposed to land on and
-- no other fixed wing aircraft (human or AI controlled) are supposed to land on these ships. Currently only Case I is supported. Case II/III take slightly different steps from the CVN carrier. -- no other fixed wing aircraft (human or AI controlled) are supposed to land on these ships. Currently only Case I is supported. Case II/III take slightly different steps from the CVN carrier.
-- However, the two Case II/III pattern are very similar so this is not a big drawback. -- However, the two Case II/III pattern are very similar so this is not a big drawback.
-- --
@ -108,9 +108,10 @@
-- * [DCS: F/A-18C Hornet – Episode 16: CASE III Introduction](https://www.youtube.com/watch?v=DvlMHnLjbDQ) -- * [DCS: F/A-18C Hornet – Episode 16: CASE III Introduction](https://www.youtube.com/watch?v=DvlMHnLjbDQ)
-- * [DCS: F/A-18C Hornet Case I Carrier Landing Training Lesson Recording](https://www.youtube.com/watch?v=D33uM9q4xgA) -- * [DCS: F/A-18C Hornet Case I Carrier Landing Training Lesson Recording](https://www.youtube.com/watch?v=D33uM9q4xgA)
-- --
-- ### AV-8B Harrier at USS Tarawa -- ### AV-8B Harrier and V/STOL Operations:
-- --
-- * [Harrier Ship Landing Mission with Auto LSO!](https://www.youtube.com/watch?v=lqmVvpunk2c) -- * [Harrier Ship Landing Mission with Auto LSO!](https://www.youtube.com/watch?v=lqmVvpunk2c)
-- * [Updated Airboss V/STOL Features USS Tarawa](https://youtu.be/K7I4pU6j718)
-- * [Harrier Practice pattern USS America](https://youtu.be/99NigITYmcI) -- * [Harrier Practice pattern USS America](https://youtu.be/99NigITYmcI)
-- --
-- === -- ===
@ -300,7 +301,7 @@
-- --
-- Once the aircraft reaches the Initial, the landing pattern begins. The important steps of the pattern are shown in the image above. -- Once the aircraft reaches the Initial, the landing pattern begins. The important steps of the pattern are shown in the image above.
-- The AV-8B Harrier pattern is very similar, the only differences are as there is no angled deck there is no wake check. from the ninety you wil fly a straight approach offset 26 ft to port (left) of the tram line. -- The AV-8B Harrier pattern is very similar, the only differences are as there is no angled deck there is no wake check. from the ninety you wil fly a straight approach offset 26 ft to port (left) of the tram line.
-- The aim is to arrive abeam the landing spot in a stable hover at 120 ft with forward speed matched to the boat. From there the LSO will call "cleared to land". You then level cross to the tram line at the designated landing spot at land vertcally. -- The aim is to arrive abeam the landing spot in a stable hover at 120 ft with forward speed matched to the boat. From there the LSO will call "cleared to land". You then level cross to the tram line at the designated landing spot at land vertcally. When you stabalise over the landing spot LSO will call Stabalise to indicate you are centered at the correct spot.
-- --
-- --
-- ## CASE III -- ## CASE III
@ -634,12 +635,12 @@
-- --
-- Furthermore, we have the cases: -- Furthermore, we have the cases:
-- --
-- * 2.5 Points **B**: "Bolder", when the player landed but did not catch a wire. -- * 2.5 Points **B**: "Bolter", when the player landed but did not catch a wire.
-- * 2.0 Points **WOP**: "Pattern Wave-Off", when pilot was far away from where he should be in the pattern. -- * 2.0 Points **WOP**: "Pattern Wave-Off", when pilot was far away from where he should be in the pattern.
-- * 2.0 Points **OWO**: "Own Wave-Off**, when pilot flies past the deck without touching it. -- * 2.0 Points **OWO**: "Own Wave-Off**, when pilot flies past the deck without touching it.
-- * 1.0 Points **WO**: "Technique Wave-Off": Player got waved off in the final parts of the groove. -- * 1.0 Points **WO**: "Technique Wave-Off": Player got waved off in the final parts of the groove.
-- * 1.0 Points **LIG**: "Long In the Groove", when pilot extents the downwind leg too far and screws up the timing for the following aircraft. -- * 1.0 Points **LIG**: "Long In the Groove", when pilot extents the downwind leg too far and screws up the timing for the following aircraft.
-- * 0.0 Points **CUT**: "Cut pass", when player was waved off but landed anyway. -- * 0.0 Points **CUT**: "Cut pass", when player was waved off but landed anyway. In addition if a V/STOL lands without having been Cleared to Land.
-- --
-- ## Foul Deck Waveoff -- ## Foul Deck Waveoff
-- --
@ -1298,9 +1299,10 @@ AIRBOSS.AircraftCarrier={
-- @field #string TRUMAN USS Harry S. Truman (CVN-75) [Super Carrier Module] -- @field #string TRUMAN USS Harry S. Truman (CVN-75) [Super Carrier Module]
-- @field #string FORRESTAL USS Forrestal (CV-59) [Heatblur Carrier Module] -- @field #string FORRESTAL USS Forrestal (CV-59) [Heatblur Carrier Module]
-- @field #string VINSON USS Carl Vinson (CVN-70) [Obsolete] -- @field #string VINSON USS Carl Vinson (CVN-70) [Obsolete]
-- @field #string TARAWA USS Tarawa (LHA-1) -- @field #string TARAWA USS Tarawa (LHA-1) [V/STOL Carrier]
-- @field #string AMERICA USS America (LHA-6) -- @field #string AMERICA USS America (LHA-6) [V/STOL Carrier]
-- @field #string JCARLOS Juan Carlos I (L61) -- @field #string JCARLOS Juan Carlos I (L61) [V/STOL Carrier]
-- @field #string HMAS Canberra (L02) [V/STOL Carrier]
-- @field #string KUZNETSOV Admiral Kuznetsov (CV 1143.5) -- @field #string KUZNETSOV Admiral Kuznetsov (CV 1143.5)
AIRBOSS.CarrierType={ AIRBOSS.CarrierType={
ROOSEVELT="CVN_71", ROOSEVELT="CVN_71",
@ -1313,6 +1315,7 @@ AIRBOSS.CarrierType={
TARAWA="LHA_Tarawa", TARAWA="LHA_Tarawa",
AMERICA="USS America LHA-6", AMERICA="USS America LHA-6",
JCARLOS="L61", JCARLOS="L61",
CANBERRA="L02",
KUZNETSOV="KUZNECOW", KUZNETSOV="KUZNECOW",
} }
@ -1726,7 +1729,7 @@ AIRBOSS.MenuF10Root=nil
--- Airboss class version. --- Airboss class version.
-- @field #string version -- @field #string version
AIRBOSS.version="1.2.0" AIRBOSS.version="1.2.1"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list -- TODO list
@ -1991,6 +1994,9 @@ function AIRBOSS:New(carriername, alias)
elseif self.carriertype==AIRBOSS.CarrierType.JCARLOS then elseif self.carriertype==AIRBOSS.CarrierType.JCARLOS then
-- Use Juan Carlos parameters. -- Use Juan Carlos parameters.
self:_InitJcarlos() self:_InitJcarlos()
elseif self.carriertype==AIRBOSS.CarrierType.CANBERRA then
-- Use Juan Carlos parameters at this stage --TODO Check primary Landing spot.
self:_InitJcarlos()
elseif self.carriertype==AIRBOSS.CarrierType.KUZNETSOV then elseif self.carriertype==AIRBOSS.CarrierType.KUZNETSOV then
-- Kusnetsov parameters - maybe... -- Kusnetsov parameters - maybe...
self:_InitStennis() self:_InitStennis()
@ -2082,7 +2088,7 @@ function AIRBOSS:New(carriername, alias)
-- Carrier specific. -- Carrier specific.
if self.carrier:GetTypeName()~=AIRBOSS.CarrierType.TARAWA or self.carrier:GetTypeName()~=AIRBOSS.CarrierType.AMERICA or self.carrier:GetTypeName()~=AIRBOSS.CarrierType.JCARLOS then if self.carrier:GetTypeName()~=AIRBOSS.CarrierType.TARAWA or self.carrier:GetTypeName()~=AIRBOSS.CarrierType.AMERICA or self.carrier:GetTypeName()~=AIRBOSS.CarrierType.JCARLOS or self.carrier:GetTypeName()~=AIRBOSS.CarrierType.CANBERRA then
-- Flare wires. -- Flare wires.
local w1=stern:Translate(self.carrierparam.wire1, FB, true) local w1=stern:Translate(self.carrierparam.wire1, FB, true)
@ -4407,10 +4413,10 @@ function AIRBOSS:_InitForrestal()
self.carrierparam.rwywidth = 25 self.carrierparam.rwywidth = 25
-- Wires. -- Wires.
self.carrierparam.wire1 = 42 -- Distance from stern to first wire. self.carrierparam.wire1 = 44 -- Distance from stern to first wire. Original from Frank - 42
self.carrierparam.wire2 = 51.5 self.carrierparam.wire2 = 54 --51.5
self.carrierparam.wire3 = 62 self.carrierparam.wire3 = 64 --62
self.carrierparam.wire4 = 72.5 self.carrierparam.wire4 = 74 --72.5
end end
@ -6891,7 +6897,7 @@ function AIRBOSS:_GetMarshalAltitude(stack, case)
p2=Carrier:Translate(UTILS.NMToMeters(1.5), hdg) p2=Carrier:Translate(UTILS.NMToMeters(1.5), hdg)
-- Tarawa,LHA,LHD Delta patterns. -- Tarawa,LHA,LHD Delta patterns.
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
-- Pattern is directly overhead the carrier. -- Pattern is directly overhead the carrier.
p1=Carrier:Translate(UTILS.NMToMeters(1.0), hdg+90) p1=Carrier:Translate(UTILS.NMToMeters(1.0), hdg+90)
@ -7719,6 +7725,8 @@ function AIRBOSS:_InitPlayer(playerData, step)
playerData.wofd=false playerData.wofd=false
playerData.owo=false playerData.owo=false
playerData.boltered=false playerData.boltered=false
playerData.hover=false
playerData.stable=false
playerData.landed=false playerData.landed=false
playerData.Tlso=timer.getTime() playerData.Tlso=timer.getTime()
playerData.Tgroove=nil playerData.Tgroove=nil
@ -8736,7 +8744,7 @@ function AIRBOSS:OnEventLand(EventData)
self:T(self.lid..text) self:T(self.lid..text)
-- Check carrier type. -- Check carrier type.
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
-- Power "Idle". -- Power "Idle".
self:RadioTransmission(self.LSORadio, self.LSOCall.IDLE, false, 1, nil, true) self:RadioTransmission(self.LSORadio, self.LSOCall.IDLE, false, 1, nil, true)
@ -8771,7 +8779,7 @@ function AIRBOSS:OnEventLand(EventData)
-- AI unit landed -- -- AI unit landed --
-------------------- --------------------
if self.carriertype~=AIRBOSS.CarrierType.TARAWA or self.carriertype~=AIRBOSS.CarrierType.AMERICA or self.carriertype~=AIRBOSS.CarrierType.JCARLOS then if self.carriertype~=AIRBOSS.CarrierType.TARAWA or self.carriertype~=AIRBOSS.CarrierType.AMERICA or self.carriertype~=AIRBOSS.CarrierType.JCARLOS or self.carriertype~=AIRBOSS.CarrierType.CANBERRA then
-- Coordinate at landing event -- Coordinate at landing event
local coord=EventData.IniUnit:GetCoordinate() local coord=EventData.IniUnit:GetCoordinate()
@ -9681,6 +9689,8 @@ function AIRBOSS:_Bullseye(playerData)
-- LSO expect spot 5 or 7.5 call -- LSO expect spot 5 or 7.5 call
if playerData.actype==AIRBOSS.AircraftCarrier.AV8B and self.carriertype==AIRBOSS.CarrierType.JCARLOS then if playerData.actype==AIRBOSS.AircraftCarrier.AV8B and self.carriertype==AIRBOSS.CarrierType.JCARLOS then
self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT5, nil, nil, nil, true) self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT5, nil, nil, nil, true)
elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B and self.carriertype==AIRBOSS.CarrierType.CANBERRA then
self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT5, nil, nil, nil, true)
elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B then elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT75, nil, nil, nil, true) self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT75, nil, nil, nil, true)
end end
@ -9818,7 +9828,7 @@ function AIRBOSS:_CheckForLongDownwind(playerData)
local limit=UTILS.NMToMeters(-1.6) local limit=UTILS.NMToMeters(-1.6)
-- For the tarawa, other LHA and LHD we give a bit more space. -- For the tarawa, other LHA and LHD we give a bit more space.
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
limit=UTILS.NMToMeters(-2.0) limit=UTILS.NMToMeters(-2.0)
end end
@ -9866,6 +9876,8 @@ function AIRBOSS:_Abeam(playerData)
-- LSO expect spot 5 or 7.5 call -- LSO expect spot 5 or 7.5 call
if playerData.actype==AIRBOSS.AircraftCarrier.AV8B and self.carriertype==AIRBOSS.CarrierType.JCARLOS then if playerData.actype==AIRBOSS.AircraftCarrier.AV8B and self.carriertype==AIRBOSS.CarrierType.JCARLOS then
self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT5, false, 5, nil, true) self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT5, false, 5, nil, true)
elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B and self.carriertype==AIRBOSS.CarrierType.CANBERRA then
self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT5, false, 5, nil, true)
elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B then elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT75, false, 5, nil, true) self:RadioTransmission(self.LSORadio, self.LSOCall.EXPECTSPOT75, false, 5, nil, true)
end end
@ -9903,7 +9915,7 @@ function AIRBOSS:_Ninety(playerData)
self:_PlayerHint(playerData) self:_PlayerHint(playerData)
-- Next step: wake. -- Next step: wake.
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
-- Harrier has no wake stop. It stays port of the boat. -- Harrier has no wake stop. It stays port of the boat.
self:_SetPlayerStep(playerData, AIRBOSS.PatternStep.FINAL) self:_SetPlayerStep(playerData, AIRBOSS.PatternStep.FINAL)
else else
@ -10160,8 +10172,8 @@ function AIRBOSS:_Groove(playerData)
-- Speed difference. -- Speed difference.
local dv=math.abs(vplayer-vcarrier) local dv=math.abs(vplayer-vcarrier)
-- Stable when speed difference < 10 km/h. -- Stable when speed difference < 20 km/h.
local stable=dv<10 local stable=dv<20
-- Check if player is inside the zone. -- Check if player is inside the zone.
if playerData.unit:IsInZone(ZoneALS) and stable then if playerData.unit:IsInZone(ZoneALS) and stable then
@ -10171,6 +10183,9 @@ function AIRBOSS:_Groove(playerData)
-- Next step: Level cross. -- Next step: Level cross.
self:_SetPlayerStep(playerData, AIRBOSS.PatternStep.GROOVE_LC) self:_SetPlayerStep(playerData, AIRBOSS.PatternStep.GROOVE_LC)
-- Set Stable Hover
playerData.stable=true
playerData.hover=true
end end
elseif rho<=RAR and playerData.step==AIRBOSS.PatternStep.GROOVE_LC then elseif rho<=RAR and playerData.step==AIRBOSS.PatternStep.GROOVE_LC then
@ -10190,12 +10205,13 @@ function AIRBOSS:_Groove(playerData)
-- Speed difference. -- Speed difference.
local dv=math.abs(vplayer-vcarrier) local dv=math.abs(vplayer-vcarrier)
-- Stable when v<7.5 km/h. -- Stable when v<10 km/h.
local stable=dv<7.5 local stable=dv<10
-- Radio Transmission "Cleared to land" once the aircraft is inside the zone. -- Radio Transmission "Stabilized" once the aircraft has been cleared to cross and is over the Landing Spot and stable.
if playerData.unit:IsInZone(ZoneLS) and stable and playerData.warning==false then if playerData.unit:IsInZone(ZoneLS) and stable and playerData.stable==true then
self:RadioTransmission(self.LSORadio, self.LSOCall.STABILIZED, nil, nil, nil, true) self:RadioTransmission(self.LSORadio, self.LSOCall.STABILIZED, nil, nil, nil, false)
playerData.stable=false
playerData.warning=true playerData.warning=true
end end
@ -10229,9 +10245,26 @@ function AIRBOSS:_Groove(playerData)
-- Nothing else necessary. -- Nothing else necessary.
return return
end end
end end
-- Long V/STOL groove time Wave Off over 75 seconds to IC - TOPGUN level Only. --pene testing (WIP)
--if rho>=RAR and rho<=RIC and not playerData.waveoff and playerData.difficulty==AIRBOSS.Difficulty.HARD and playerData.actype== AIRBOSS.AircraftCarrier.AV8B then
-- Get groove time
--local vSlow=groovedata.time
-- If too slow wave off.
--if vSlow >75 then
-- LSO Wave off!
--self:RadioTransmission(self.LSORadio, self.LSOCall.WAVEOFF, nil, nil, nil, true)
--playerData.Tlso=timer.getTime()
-- Player was waved Off
--playerData.waveoff=true
--return
--end
--end
-- Groovedata step. -- Groovedata step.
groovedata.Step=playerData.step groovedata.Step=playerData.step
@ -10400,11 +10433,10 @@ function AIRBOSS:_CheckWaveOff(glideslopeError, lineupError, AoA, playerData)
-- For the harrier, we allow a bit more room. -- For the harrier, we allow a bit more room.
if playerData.actype==AIRBOSS.AircraftCarrier.AV8B then if playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
glMax= 4.0 glMax= 2.6
glMin=-3.0 glMin=-2.0
luAbs= 5.0 luAbs= 4.1 -- Testing Pene (WIP) needs feedback to tighten up tolerences.
-- No waveoff for harrier pilots at the moment.
return false
end end
-- Too high or too low? -- Too high or too low?
@ -10429,8 +10461,9 @@ function AIRBOSS:_CheckWaveOff(glideslopeError, lineupError, AoA, playerData)
end end
-- Too slow or too fast? Only for pros. -- Too slow or too fast? Only for pros.
if playerData.difficulty==AIRBOSS.Difficulty.HARD then
-- Get aircraft specific AoA values if playerData.difficulty==AIRBOSS.Difficulty.HARD and playerData.actype~=AIRBOSS.AircraftCarrier.AV8B then
-- Get aircraft specific AoA values. Not for AV-8B due to transition to Stable Hover.
local aoaac=self:_GetAircraftAoA(playerData) local aoaac=self:_GetAircraftAoA(playerData)
-- Check too slow or too fast. -- Check too slow or too fast.
if AoA<aoaac.FAST then if AoA<aoaac.FAST then
@ -10443,6 +10476,7 @@ function AIRBOSS:_CheckWaveOff(glideslopeError, lineupError, AoA, playerData)
self:T(self.lid..string.format("%s: %s", playerData.name, text)) self:T(self.lid..string.format("%s: %s", playerData.name, text))
self:_AddToDebrief(playerData, text) self:_AddToDebrief(playerData, text)
waveoff=true waveoff=true
end end
end end
@ -10577,7 +10611,7 @@ function AIRBOSS:_GetSternCoord()
--local stern=self:GetCoordinate() --local stern=self:GetCoordinate()
-- Stern coordinate (sterndist<0). -- Stern coordinate (sterndist<0).
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
-- Tarawa: Translate 8 meters port. -- Tarawa: Translate 8 meters port.
self.sterncoord:Translate(self.carrierparam.sterndist, hdg, true, true):Translate(8, FB-90, true, true) self.sterncoord:Translate(self.carrierparam.sterndist, hdg, true, true):Translate(8, FB-90, true, true)
elseif self.carriertype==AIRBOSS.CarrierType.STENNIS then elseif self.carriertype==AIRBOSS.CarrierType.STENNIS then
@ -11218,7 +11252,8 @@ function AIRBOSS:_GetZoneRunwayBox()
end end
--- Get zone of primary abeam landing position of USS Tarawa. Box length and width 30 meters. --- Get zone of primary abeam landing position of USS Tarawa, USS America and Juan Carlos. Box length 50 meters and width 30 meters.
--- Allow for Clear to land call from LSO approaching abeam the landing spot if stable as per NATOPS 00-80T
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @return Core.Zone#ZONE_POLYGON Zone surrounding landing runway. -- @return Core.Zone#ZONE_POLYGON Zone surrounding landing runway.
function AIRBOSS:_GetZoneAbeamLandingSpot() function AIRBOSS:_GetZoneAbeamLandingSpot()
@ -11234,8 +11269,8 @@ function AIRBOSS:_GetZoneAbeamLandingSpot()
-- Points. -- Points.
p[1]=S:Translate( 15, FB):Translate(15, FB+90) -- Top-Right p[1]=S:Translate( 15, FB):Translate(15, FB+90) -- Top-Right
p[2]=S:Translate(-15, FB):Translate(15, FB+90) -- Bottom-Right p[2]=S:Translate(-45, FB):Translate(15, FB+90) -- Bottom-Right
p[3]=S:Translate(-15, FB):Translate(15, FB-90) -- Bottom-Left p[3]=S:Translate(-45, FB):Translate(15, FB-90) -- Bottom-Left
p[4]=S:Translate( 15, FB):Translate(15, FB-90) -- Top-Left p[4]=S:Translate( 15, FB):Translate(15, FB-90) -- Top-Left
-- Convert to vec2. -- Convert to vec2.
@ -11323,7 +11358,7 @@ function AIRBOSS:_GetZoneHolding(case, stack)
self.zoneHolding=ZONE_RADIUS:New("CASE I Holding Zone", Post:GetVec2(), self.marshalradius) self.zoneHolding=ZONE_RADIUS:New("CASE I Holding Zone", Post:GetVec2(), self.marshalradius)
-- Delta pattern. -- Delta pattern.
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
self.zoneHolding=ZONE_RADIUS:New("CASE I Holding Zone", self.carrier:GetVec2(), UTILS.NMToMeters(5)) self.zoneHolding=ZONE_RADIUS:New("CASE I Holding Zone", self.carrier:GetVec2(), UTILS.NMToMeters(5))
end end
@ -11376,7 +11411,7 @@ function AIRBOSS:_GetZoneCommence(case, stack)
-- Three position -- Three position
local Three=self:GetCoordinate():Translate(D, hdg+275) local Three=self:GetCoordinate():Translate(D, hdg+275)
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
local Dx=UTILS.NMToMeters(2.25) local Dx=UTILS.NMToMeters(2.25)
@ -11701,8 +11736,17 @@ function AIRBOSS:_GetOptLandingCoordinate()
elseif self.carriertype==AIRBOSS.CarrierType.JCARLOS then elseif self.carriertype==AIRBOSS.CarrierType.JCARLOS then
-- Landing 100 ft abeam, 120 ft alt. -- Landing 100 ft abeam, 120 ft alt.
self.landingcoord:UpdateFromCoordinate(self:_GetLandingSpotCoordinate()):Translate(35, FB-100, true, true) self.landingcoord:UpdateFromCoordinate(self:_GetLandingSpotCoordinate()):Translate(35, FB-90, true, true)
--stern=self:_GetLandingSpotCoordinate():Translate(35, FB-100) --stern=self:_GetLandingSpotCoordinate():Translate(35, FB-90)
-- Alitude 120 ft.
self.landingcoord:SetAltitude(UTILS.FeetToMeters(120))
elseif self.carriertype==AIRBOSS.CarrierType.CANBERRA then
-- Landing 100 ft abeam, 120 ft alt.
self.landingcoord:UpdateFromCoordinate(self:_GetLandingSpotCoordinate()):Translate(35, FB-90, true, true)
--stern=self:_GetLandingSpotCoordinate():Translate(35, FB-90)
-- Alitude 120 ft. -- Alitude 120 ft.
self.landingcoord:SetAltitude(UTILS.FeetToMeters(120)) self.landingcoord:SetAltitude(UTILS.FeetToMeters(120))
@ -11754,9 +11798,16 @@ function AIRBOSS:_GetLandingSpotCoordinate()
-- Landing 100 ft abeam, 120 alt. -- Landing 100 ft abeam, 120 alt.
local hdg=self:GetHeading() local hdg=self:GetHeading()
-- Primary landing spot 5.0 -- TODO voice for different landing Spots. -- Primary landing spot 5.0 -- Done voice for different landing Spots.
self.landingspotcoord:Translate(89, hdg, true, true):SetAltitude(self.carrierparam.deckheight) self.landingspotcoord:Translate(89, hdg, true, true):SetAltitude(self.carrierparam.deckheight)
elseif self.carriertype==AIRBOSS.CarrierType.CANBERRA then
-- Landing 100 ft abeam, 120 alt.
local hdg=self:GetHeading()
-- Primary landing spot 5.0 -- Done voice for different landing Spots.
self.landingspotcoord:Translate(89, hdg, true, true):SetAltitude(self.carrierparam.deckheight)
end end
return self.landingspotcoord return self.landingspotcoord
@ -12249,10 +12300,14 @@ end
-- --
-- If you manage to be between 16.4 and and 16.6 seconds, you will even get and okay underline "\_OK\_". -- If you manage to be between 16.4 and and 16.6 seconds, you will even get and okay underline "\_OK\_".
-- No groove time for Harrier on LHA, LHD set to Tgroove Unicorn as starting point to allow possible _OK_ 5.0. -- No groove time for Harrier on LHA, LHD set to Tgroove Unicorn as starting point to allow possible _OK_ 5.0.
--
-- If time in the AV-8B -- If time in the AV-8B
-- --
-- * < 90 seconds: OK V/STOL -- * < 55 seconds: Fast V/STOL
-- * > 91 Seconds: SLOW V/STOL (Early hover stop selection) -- * < 75 seconds: OK V/STOL
-- * > 76 Seconds: SLOW V/STOL (Early hover stop selection)
--
-- If you manage to be between 60.0 and 65.0 seconds in the AV-8B, you will even get and okay underline "\_OK\_"
-- --
-- @param #AIRBOSS self -- @param #AIRBOSS self
-- @param #AIRBOSS.PlayerData playerData Player data table. -- @param #AIRBOSS.PlayerData playerData Player data table.
@ -12274,9 +12329,9 @@ function AIRBOSS:_EvalGrooveTime(playerData)
-- Time in groove for AV-8B -- Time in groove for AV-8B
elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B and t<55 then -- VSTOL Late Hover stop selection too fast to Abeam LDG Spot AV-8B. elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B and t<55 then -- VSTOL Late Hover stop selection too fast to Abeam LDG Spot AV-8B.
grade="FAST V/STOL Groove" grade="FAST V/STOL Groove"
elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B and t<90 then -- VSTOL Operations with AV-8B. elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B and t<75 then -- VSTOL Operations with AV-8B.
grade="OK V/STOL Groove" grade="OK V/STOL Groove"
elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B and t>=91 then -- VSTOL Early Hover stop selection slow to Abeam LDG Spot AV-8B. elseif playerData.actype==AIRBOSS.AircraftCarrier.AV8B and t>=76 then -- VSTOL Early Hover stop selection slow to Abeam LDG Spot AV-8B.
grade="SLOW V/STOL Groove" grade="SLOW V/STOL Groove"
else else
grade="LIG" grade="LIG"
@ -12288,7 +12343,7 @@ function AIRBOSS:_EvalGrooveTime(playerData)
end end
-- V/STOL Unicorn! -- V/STOL Unicorn!
if playerData.actype==AIRBOSS.AircraftCarrier.AV8B and (t>=65.0 and t<=75.0) then if playerData.actype==AIRBOSS.AircraftCarrier.AV8B and (t>=60.0 and t<=65.0) then
grade="_OK_ V/STOL" grade="_OK_ V/STOL"
end end
@ -12317,7 +12372,7 @@ function AIRBOSS:_LSOgrade(playerData)
-- Put everything together. -- Put everything together.
local G=GXX.." "..GIM.." ".." "..GIC.." "..GAR local G=GXX.." "..GIM.." ".." "..GIC.." "..GAR
-- Count number of minor, normal and major deviations. TODO - work on Harrier counts due slower approach speed. -- Count number of minor, normal and major deviations.
local N=nXX+nIM+nIC+nAR local N=nXX+nIM+nIC+nAR
local nL=count(G, '_')/2 local nL=count(G, '_')/2
local nS=count(G, '%(') local nS=count(G, '%(')
@ -12326,7 +12381,7 @@ function AIRBOSS:_LSOgrade(playerData)
-- Groove time 15-18.99 sec for a unicorn. Or 65-70 for V/STOL unicorn. -- Groove time 15-18.99 sec for a unicorn. Or 65-70 for V/STOL unicorn.
local Tgroove=playerData.Tgroove local Tgroove=playerData.Tgroove
local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false
local TgrooveVstolUnicorn=Tgroove and (Tgroove>=65.0 and Tgroove<=70.0)and playerData.actype==AIRBOSS.AircraftCarrier.AV8B or false local TgrooveVstolUnicorn=Tgroove and (Tgroove>=60.0 and Tgroove<=65.0)and playerData.actype==AIRBOSS.AircraftCarrier.AV8B or false
local grade local grade
local points local points
@ -12432,8 +12487,18 @@ end
-- Bolter -- Bolter
grade="-- (BOLTER)" grade="-- (BOLTER)"
points=2.5 points=2.5
elseif not playerData.hover and playerData.actype==AIRBOSS.AircraftCarrier.AV8B then
-------------------------------
-- AV-8B not cleared to land -- -- Landing clearence is carrier from LC to Landing
-------------------------------
if playerData.landed then
-- AIRBOSS wants your balls!
grade="CUT"
points=0.0
end end
end
return grade, points, G return grade, points, G
end end
@ -12657,7 +12722,7 @@ function AIRBOSS:_GS(step, n)
if n==-1 then if n==-1 then
gp=AIRBOSS.GroovePos.IC gp=AIRBOSS.GroovePos.IC
elseif n==1 then elseif n==1 then
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
gp=AIRBOSS.GroovePos.AL gp=AIRBOSS.GroovePos.AL
else else
gp=AIRBOSS.GroovePos.IW gp=AIRBOSS.GroovePos.IW
@ -14549,7 +14614,7 @@ function AIRBOSS:_IsCarrierAircraft(unit)
-- Special case for Harrier which can only land on Tarawa, LHA and LHD. -- Special case for Harrier which can only land on Tarawa, LHA and LHD.
if aircrafttype==AIRBOSS.AircraftCarrier.AV8B then if aircrafttype==AIRBOSS.AircraftCarrier.AV8B then
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
return true return true
else else
return false return false
@ -14557,7 +14622,7 @@ function AIRBOSS:_IsCarrierAircraft(unit)
end end
-- Also only Harriers can land on the Tarawa, LHA and LHD. -- Also only Harriers can land on the Tarawa, LHA and LHD.
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
if aircrafttype~=AIRBOSS.AircraftCarrier.AV8B then if aircrafttype~=AIRBOSS.AircraftCarrier.AV8B then
return false return false
end end
@ -17927,7 +17992,7 @@ function AIRBOSS:_MarkCaseZones(_unitName, flare)
end end
-- Tarawa, LHA and LHD landing spots. -- Tarawa, LHA and LHD landing spots.
if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS then if self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==AIRBOSS.CarrierType.JCARLOS or self.carriertype==AIRBOSS.CarrierType.CANBERRA then
text=text.."\n* abeam landing stop with RED flares" text=text.."\n* abeam landing stop with RED flares"
-- Abeam landing spot zone. -- Abeam landing spot zone.
local ALSPT=self:_GetZoneAbeamLandingSpot() local ALSPT=self:_GetZoneAbeamLandingSpot()

View File

@ -45,6 +45,7 @@
-- * Object oriented refactoring of Ciribob\'s fantastic CSAR script. -- * Object oriented refactoring of Ciribob\'s fantastic CSAR script.
-- * No need for extra MIST loading. -- * No need for extra MIST loading.
-- * Additional events to tailor your mission. -- * Additional events to tailor your mission.
-- * Optional SpawnCASEVAC to create casualties without beacon (e.g. handling dead ground vehicles and create CASVAC requests).
-- --
-- ## 0. Prerequisites -- ## 0. Prerequisites
-- --
@ -115,6 +116,8 @@
-- self.SRSPath = "E:\\Progra~1\\DCS-SimpleRadio-Standalone\\" -- adjust your own path in your SRS installation -- server(!) -- self.SRSPath = "E:\\Progra~1\\DCS-SimpleRadio-Standalone\\" -- adjust your own path in your SRS installation -- server(!)
-- self.SRSchannel = 300 -- radio channel -- self.SRSchannel = 300 -- radio channel
-- self.SRSModulation = radio.modulation.AM -- modulation -- self.SRSModulation = radio.modulation.AM -- modulation
-- --
-- self.csarUsePara = false -- If set to true, will use the LandingAfterEjection Event instead of Ejection --shagrat
-- --
-- ## 3. Results -- ## 3. Results
-- --
@ -175,6 +178,8 @@
-- -- Create downed "Pilot Wagner" in #ZONE "CSAR_Start_1" at a random point for the blue coalition -- -- Create downed "Pilot Wagner" in #ZONE "CSAR_Start_1" at a random point for the blue coalition
-- my_csar:SpawnCSARAtZone( "CSAR_Start_1", coalition.side.BLUE, "Pilot Wagner", true ) -- my_csar:SpawnCSARAtZone( "CSAR_Start_1", coalition.side.BLUE, "Pilot Wagner", true )
-- --
-- --Create a casualty and CASEVAC request from a "Point" (VEC2) for the blue coalition --shagrat
-- my_csar:SpawnCASEVAC(Point, coalition.side.BLUE)
-- --
-- @field #CSAR -- @field #CSAR
CSAR = { CSAR = {
@ -238,10 +243,11 @@ CSAR.AircraftType["Mi-8MTV2"] = 12
CSAR.AircraftType["Mi-8MT"] = 12 CSAR.AircraftType["Mi-8MT"] = 12
CSAR.AircraftType["Mi-24P"] = 8 CSAR.AircraftType["Mi-24P"] = 8
CSAR.AircraftType["Mi-24V"] = 8 CSAR.AircraftType["Mi-24V"] = 8
CSAR.AircraftType["Bell-47"] = 2
--- CSAR class version. --- CSAR class version.
-- @field #string version -- @field #string version
CSAR.version="0.1.11r1" CSAR.version="0.1.12r2"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list -- ToDo list
@ -249,7 +255,7 @@ CSAR.version="0.1.11r1"
-- DONE: SRS Integration (to be tested) -- DONE: SRS Integration (to be tested)
-- TODO: Maybe - add option to smoke/flare closest MASH -- TODO: Maybe - add option to smoke/flare closest MASH
-- TODO: shagrat Add cargoWeight to helicopter when pilot boarded
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor -- Constructor
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -380,6 +386,9 @@ function CSAR:New(Coalition, Template, Alias)
self.countryred = country.id.RUSSIA self.countryred = country.id.RUSSIA
self.countryneutral = country.id.UN_PEACEKEEPERS self.countryneutral = country.id.UN_PEACEKEEPERS
-- added 0.1.3
self.csarUsePara = true -- shagrat set to true, will use the LandingAfterEjection Event instead of Ejection
-- WARNING - here\'ll be dragons -- WARNING - here\'ll be dragons
-- for this to work you need to de-sanitize your mission environment in <DCS root>\Scripts\MissionScripting.lua -- for this to work you need to de-sanitize your mission environment in <DCS root>\Scripts\MissionScripting.lua
-- needs SRS => 1.9.6 to work (works on the *server* side) -- needs SRS => 1.9.6 to work (works on the *server* side)
@ -644,10 +653,14 @@ function CSAR:_AddCsar(_coalition , _country, _point, _typeName, _unitName, _pla
local _typeName = _typeName or "Pilot" local _typeName = _typeName or "Pilot"
if not noMessage then if not noMessage then
if _freq ~= 0 then --shagrat different CASEVAC msg
self:_DisplayToAllSAR("MAYDAY MAYDAY! " .. _typeName .. " is down. ", self.coalition, self.messageTime) self:_DisplayToAllSAR("MAYDAY MAYDAY! " .. _typeName .. " is down. ", self.coalition, self.messageTime)
else
self:_DisplayToAllSAR("Troops In Contact. " .. _typeName .. " requests CASEVAC. ", self.coalition, self.messageTime)
end
end end
if _freq then if (_freq and _freq ~= 0) then --shagrat only add beacon if _freq is NOT 0
self:_AddBeaconToGroup(_spawnedGroup, _freq) self:_AddBeaconToGroup(_spawnedGroup, _freq)
end end
@ -656,9 +669,17 @@ function CSAR:_AddCsar(_coalition , _country, _point, _typeName, _unitName, _pla
local _text = _description local _text = _description
if not forcedesc then if not forcedesc then
if _playerName ~= nil then if _playerName ~= nil then
if _freq ~= 0 then --shagrat
_text = "Pilot " .. _playerName _text = "Pilot " .. _playerName
else
_text = "TIC - " .. _playerName
end
elseif _unitName ~= nil then elseif _unitName ~= nil then
if _freq ~= 0 then --shagrat
_text = "AI Pilot of " .. _unitName _text = "AI Pilot of " .. _unitName
else
_text = "TIC - " .. _unitName
end
end end
end end
self:T({_spawnedGroup, _alias}) self:T({_spawnedGroup, _alias})
@ -667,7 +688,7 @@ function CSAR:_AddCsar(_coalition , _country, _point, _typeName, _unitName, _pla
self:_CreateDownedPilotTrack(_spawnedGroup,_GroupName,_coalition,_unitName,_text,_typeName,_freq,_playerName) self:_CreateDownedPilotTrack(_spawnedGroup,_GroupName,_coalition,_unitName,_text,_typeName,_freq,_playerName)
self:_InitSARForPilot(_spawnedGroup, _GroupName, _freq, noMessage) self:_InitSARForPilot(_spawnedGroup, _unitName, _freq, noMessage) --shagrat use unitName to have the aircraft callsign / descriptive "name" etc.
return self return self
end end
@ -736,6 +757,58 @@ function CSAR:SpawnCSARAtZone(Zone, Coalition, Description, RandomPoint, Nomessa
return self return self
end end
--- (Internal) Function to add a CSAR object into the scene at a Point coordinate (VEC_2). For mission designers wanting to add e.g. casualties to the scene, that don't use beacons.
-- @param #CSAR self
-- @param #string _Point a POINT_VEC2.
-- @param #number _coalition Coalition.
-- @param #string _description (optional) Description.
-- @param #boolean _nomessage (optional) If true, don\'t send a message to SAR.
-- @param #string unitname (optional) Name of the lost unit.
-- @param #string typename (optional) Type of plane.
-- @param #boolean forcedesc (optional) Force to use the description passed only for the pilot track entry. Use to have fully custom names.
function CSAR:_SpawnCASEVAC( _Point, _coalition, _description, _nomessage, unitname, typename, forcedesc) --shagrat added internal Function _SpawnCASEVAC
self:T(self.lid .. " _SpawnCASEVAC")
local _description = _description or "CASEVAC"
local unitname = unitname or "CASEVAC"
local typename = typename or "Ground Commander"
local pos = {}
pos = _Point
local _country = 0
if _coalition == coalition.side.BLUE then
_country = self.countryblue
elseif _coalition == coalition.side.RED then
_country = self.countryred
else
_country = self.countryneutral
end
--shagrat set frequency to 0 as "flag" for no beacon
self:_AddCsar(_coalition, _country, pos, typename, unitname, _description, 0, _nomessage, _description, forcedesc)
return self
end
--- Function to add a CSAR object into the scene at a zone coordinate. For mission designers wanting to add e.g. PoWs to the scene.
-- @param #CSAR self
-- @param #string Point a POINT_VEC2.
-- @param #number Coalition Coalition.
-- @param #string Description (optional) Description.
-- @param #boolean addBeacon (optional) yes or no.
-- @param #boolean Nomessage (optional) If true, don\'t send a message to SAR.
-- @param #string Unitname (optional) Name of the lost unit.
-- @param #string Typename (optional) Type of plane.
-- @param #boolean Forcedesc (optional) Force to use the **description passed only** for the pilot track entry. Use to have fully custom names.
-- @usage If missions designers want to spawn downed pilots into the field, e.g. at mission begin, to give the helicopter guys work, they can do this like so:
--
-- -- Create casualty "CASEVAC" at Point #POINT_VEC2 for the blue coalition.
-- my_csar:SpawnCASEVAC( POINT_VEC2, coalition.side.BLUE )
function CSAR:SpawnCASEVAC(Point, Coalition, Description, Nomessage, Unitname, Typename, Forcedesc)
self:_SpawnCASEVAC(Point, Coalition, Description, Nomessage, Unitname, Typename, Forcedesc)
return self
end --shagrat end added CASEVAC
--- (Internal) Event handler. --- (Internal) Event handler.
-- @param #CSAR self -- @param #CSAR self
function CSAR:_EventHandler(EventData) function CSAR:_EventHandler(EventData)
@ -852,8 +925,24 @@ function CSAR:_EventHandler(EventData)
end end
-- all checks passed, get going. -- all checks passed, get going.
if self.csarUsePara == false then --shagrat check parameter LandingAfterEjection, if true don't spawn a Pilot from EJECTION event, wait for the Chute to land
local _freq = self:_GenerateADFFrequency() local _freq = self:_GenerateADFFrequency()
self:_AddCsar(_coalition, _unit:GetCountry(), _unit:GetCoordinate() , _unit:GetTypeName(), _unit:GetName(), _event.IniPlayerName, _freq, false, "none") self:_AddCsar(_coalition, _unit:GetCountry(), _unit:GetCoordinate() , _unit:GetTypeName(), _unit:GetName(), _event.IniPlayerName, _freq, false, "none")
return true
end
---- shagrat on event LANDING_AFTER_EJECTION spawn pilot at parachute location
elseif (_event.id == EVENTS.LandingAfterEjection and self.csarUsePara == true) then
self:I({EVENT=_event})
local _LandingPos = COORDINATE:NewFromVec3(_event.initiator:getPosition().p)
local _unitname = "Aircraft" --_event.initiator:getName() or "Aircraft" --shagrat Optional use of Object name which is unfortunately 'f15_Pilot_Parachute'
local _typename = "Ejected Pilot" --_event.Initiator.getTypeName() or "Ejected Pilot"
local _country = _event.initiator:getCountry()
local _coalition = coalition.getCountryCoalition( _country )
local _freq = self:_GenerateADFFrequency()
self:I({coalition=_coalition,country= _country, coord=_LandingPos, name=_unitname, player=_event.IniPlayerName, freq=_freq})
self:_AddCsar(_coalition, _country, _LandingPos, nil, _unitname, _event.IniPlayerName, _freq, false, "none")--shagrat add CSAR at Parachute location.
Unit.destroy(_event.initiator) -- shagrat remove static Pilot model
return true return true
@ -920,8 +1009,13 @@ function CSAR:_InitSARForPilot(_downedGroup, _GroupName, _freq, _nomessage)
local _leadername = _leader:GetName() local _leadername = _leader:GetName()
if not _nomessage then if not _nomessage then
local _text = string.format("%s requests SAR at %s, beacon at %.2f KHz", _leadername, _coordinatesText, _freqk) if _freq ~= 0 then --shagrat
local _text = string.format("%s requests SAR at %s, beacon at %.2f KHz", _groupName, _coordinatesText, _freqk)--shagrat _groupName to prevent 'f15_Pilot_Parachute'
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime) self:_DisplayToAllSAR(_text,self.coalition,self.messageTime)
else --shagrat CASEVAC msg
local _text = string.format("Pickup Zone at %s.", _coordinatesText )
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime)
end
end end
for _,_heliName in pairs(self.csarUnits) do for _,_heliName in pairs(self.csarUnits) do
@ -1059,7 +1153,7 @@ function CSAR:_PopSmokeForGroup(_woundedGroupName, _woundedLeader)
if _lastSmoke == nil or timer.getTime() > _lastSmoke then if _lastSmoke == nil or timer.getTime() > _lastSmoke then
local _smokecolor = self.smokecolor local _smokecolor = self.smokecolor
local _smokecoord = _woundedLeader:GetCoordinate() local _smokecoord = _woundedLeader:GetCoordinate():Translate( 6, math.random( 1, 360) ) --shagrat place smoke at a random 6 m distance, so smoke does not obscure the pilot
_smokecoord:Smoke(_smokecolor) _smokecoord:Smoke(_smokecolor)
self.smokeMarkers[_woundedGroupName] = timer.getTime() + 300 -- next smoke time self.smokeMarkers[_woundedGroupName] = timer.getTime() + 300 -- next smoke time
end end
@ -1434,9 +1528,13 @@ function CSAR:_DisplayActiveSAR(_unitName)
else else
distancetext = string.format("%.1fkm", _distance/1000.0) distancetext = string.format("%.1fkm", _distance/1000.0)
end end
if _value.frequency == 0 then--shagrat insert CASEVAC without Frequency
table.insert(_csarList, { dist = _distance, msg = string.format("%s at %s - %s ", _value.desc, _coordinatesText, distancetext) })
else
table.insert(_csarList, { dist = _distance, msg = string.format("%s at %s - %.2f KHz ADF - %s ", _value.desc, _coordinatesText, _value.frequency / 1000, distancetext) }) table.insert(_csarList, { dist = _distance, msg = string.format("%s at %s - %.2f KHz ADF - %s ", _value.desc, _coordinatesText, _value.frequency / 1000, distancetext) })
end end
end end
end
local function sortDistance(a, b) local function sortDistance(a, b)
return a.dist < b.dist return a.dist < b.dist
@ -1875,6 +1973,7 @@ function CSAR:onafterStart(From, Event, To)
self:HandleEvent(EVENTS.Takeoff, self._EventHandler) self:HandleEvent(EVENTS.Takeoff, self._EventHandler)
self:HandleEvent(EVENTS.Land, self._EventHandler) self:HandleEvent(EVENTS.Land, self._EventHandler)
self:HandleEvent(EVENTS.Ejection, self._EventHandler) self:HandleEvent(EVENTS.Ejection, self._EventHandler)
self:HandleEvent(EVENTS.LandingAfterEjection, self._EventHandler) --shagrat
self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler) self:HandleEvent(EVENTS.PlayerEnterAircraft, self._EventHandler)
self:HandleEvent(EVENTS.PlayerEnterUnit, self._EventHandler) self:HandleEvent(EVENTS.PlayerEnterUnit, self._EventHandler)
self:HandleEvent(EVENTS.PilotDead, self._EventHandler) self:HandleEvent(EVENTS.PilotDead, self._EventHandler)
@ -1985,6 +2084,7 @@ function CSAR:onafterStop(From, Event, To)
self:UnHandleEvent(EVENTS.Takeoff) self:UnHandleEvent(EVENTS.Takeoff)
self:UnHandleEvent(EVENTS.Land) self:UnHandleEvent(EVENTS.Land)
self:UnHandleEvent(EVENTS.Ejection) self:UnHandleEvent(EVENTS.Ejection)
self:UnHandleEvent(EVENTS.LandingAfterEjection) -- shagrat
self:UnHandleEvent(EVENTS.PlayerEnterUnit) self:UnHandleEvent(EVENTS.PlayerEnterUnit)
self:UnHandleEvent(EVENTS.PlayerEnterAircraft) self:UnHandleEvent(EVENTS.PlayerEnterAircraft)
self:UnHandleEvent(EVENTS.PilotDead) self:UnHandleEvent(EVENTS.PilotDead)

View File

@ -2145,21 +2145,36 @@ function CTLD:_LoadCratesNearby(Group, Unit)
self.Loaded_Cargo[unitname] = loaded self.Loaded_Cargo[unitname] = loaded
self:_UpdateUnitCargoMass(Unit) self:_UpdateUnitCargoMass(Unit)
-- clean up real world crates -- clean up real world crates
self:_CleanupTrackedCrates(crateidsloaded)
end
end
return self
end
--- (Internal) Function to clean up tracked cargo crates
function CTLD:_CleanupTrackedCrates(crateIdsToRemove)
local existingcrates = self.Spawned_Cargo -- #table local existingcrates = self.Spawned_Cargo -- #table
local newexcrates = {} local newexcrates = {}
for _,_crate in pairs(existingcrates) do for _,_crate in pairs(existingcrates) do
local excrate = _crate -- #CTLD_CARGO local excrate = _crate -- #CTLD_CARGO
local ID = excrate:GetID() local ID = excrate:GetID()
for _,_ID in pairs(crateidsloaded) do local keep = true
if ID ~= _ID then for _,_ID in pairs(crateIdsToRemove) do
table.insert(newexcrates,_crate) if ID == _ID then
keep = false
end end
end end
-- remove destroyed crates here too
local static = _crate:GetPositionable() -- Wrapper.Static#STATIC -- crates
if not static or not static:IsAlive() then
keep = false
end
if keep then
table.insert(newexcrates,_crate)
end
end end
self.Spawned_Cargo = nil self.Spawned_Cargo = nil
self.Spawned_Cargo = newexcrates self.Spawned_Cargo = newexcrates
end
end
return self return self
end end
@ -2849,19 +2864,7 @@ function CTLD:_CleanUpCrates(Crates,Build,Number)
if found == numberdest then break end -- got enough if found == numberdest then break end -- got enough
end end
-- loop and remove from real world representation -- loop and remove from real world representation
for _,_crate in pairs(existingcrates) do self:_CleanupTrackedCrates(destIDs)
local excrate = _crate -- #CTLD_CARGO
local ID = excrate:GetID()
for _,_ID in pairs(destIDs) do
if ID ~= _ID then
table.insert(newexcrates,_crate)
end
end
end
-- reset Spawned_Cargo
self.Spawned_Cargo = nil
self.Spawned_Cargo = newexcrates
return self return self
end end

View File

@ -4602,7 +4602,8 @@ function OPSGROUP:RouteToMission(mission, delay)
formation=mission.optionFormation formation=mission.optionFormation
end end
--waypointcoord:MarkToAll(string.format("Mission %s alt=%d m", mission:GetName(), waypointcoord.y)) -- UID of this waypoint.
local uid=self:GetWaypointCurrent().uid
-- Add waypoint. -- Add waypoint.
local waypoint=self:AddWaypoint(waypointcoord, SpeedToMission, uid, formation, false) ; waypoint.missionUID=mission.auftragsnummer local waypoint=self:AddWaypoint(waypointcoord, SpeedToMission, uid, formation, false) ; waypoint.missionUID=mission.auftragsnummer

View File

@ -88,10 +88,19 @@
-- --
-- Use a specific "culture" with the @{#MSRS.SetCulture} function, e.g. `:SetCulture("en-US")` or `:SetCulture("de-DE")`. -- Use a specific "culture" with the @{#MSRS.SetCulture} function, e.g. `:SetCulture("en-US")` or `:SetCulture("de-DE")`.
-- --
-- ## Set Google
--
-- Use Google's text-to-speech engine with the @{#MSRS.SetGoogle} function, e.g. ':SetGoogle()'.
-- By enabling this it also allows you to utilize SSML in your text for added flexibilty.
-- For more information on setting up a cloud account, visit: https://cloud.google.com/text-to-speech
-- Google's supported SSML reference: https://cloud.google.com/text-to-speech/docs/ssml
--
-- ## Set Voice -- ## Set Voice
-- --
-- Use a specifc voice with the @{#MSRS.SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`. -- Use a specifc voice with the @{#MSRS.SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`.
-- Note that this must be installed on your windows system. -- Note that this must be installed on your windows system.
-- If enabling SetGoogle(), you can use voices provided by Google
-- Google's supported voices: https://cloud.google.com/text-to-speech/docs/voices
-- --
-- ## Set Coordinate -- ## Set Coordinate
-- --
@ -678,7 +687,7 @@ function MSRS:_GetCommand(freqs, modus, coal, gender, voice, culture, volume, sp
-- Set google. -- Set google.
if self.google then if self.google then
command=command..string.format(' -G "%s"', self.google) command=command..string.format(' --ssml -G "%s"', self.google)
end end
-- Debug output. -- Debug output.

View File

@ -216,7 +216,7 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName )
local MenuReporting = MENU_GROUP:New( EventGroup, "Missions Reports", CommandCenterMenu ) local MenuReporting = MENU_GROUP:New( EventGroup, "Missions Reports", CommandCenterMenu )
local MenuMissionsSummary = MENU_GROUP_COMMAND:New( EventGroup, "Missions Status Report", MenuReporting, self.ReportSummary, self, EventGroup ) local MenuMissionsSummary = MENU_GROUP_COMMAND:New( EventGroup, "Missions Status Report", MenuReporting, self.ReportSummary, self, EventGroup )
local MenuMissionsDetails = MENU_GROUP_COMMAND:New( EventGroup, "Missions Players Report", MenuReporting, self.ReportMissionsPlayers, self, EventGroup ) local MenuMissionsDetails = MENU_GROUP_COMMAND:New( EventGroup, "Missions Players Report", MenuReporting, self.ReportMissionsPlayers, self, EventGroup )
self:ReportSummary( EventGroup ) --self:ReportSummary( EventGroup )
local PlayerUnit = EventData.IniUnit local PlayerUnit = EventData.IniUnit
for MissionID, Mission in pairs( self:GetMissions() ) do for MissionID, Mission in pairs( self:GetMissions() ) do
local Mission = Mission -- Tasking.Mission#MISSION local Mission = Mission -- Tasking.Mission#MISSION

View File

@ -710,7 +710,7 @@ do -- TASK_CARGO_DISPATCHER
self.TransportCount = self.TransportCount + 1 self.TransportCount = self.TransportCount + 1
local verbose = Silent and true local verbose = Silent or false
local TaskName = string.format( ( TaskPrefix or "Transport" ) .. ".%03d", self.TransportCount ) local TaskName = string.format( ( TaskPrefix or "Transport" ) .. ".%03d", self.TransportCount )

View File

@ -2,7 +2,7 @@
-- --
-- **Specific features:** -- **Specific features:**
-- --
-- * Creates a task to transport @{Cargo.Cargo} to and between deployment zones. -- * Creates a task to transport #Cargo.Cargo to and between deployment zones.
-- * Derived from the TASK_CARGO class, which is derived from the TASK class. -- * Derived from the TASK_CARGO class, which is derived from the TASK class.
-- * Orchestrate the task flow, so go from Planned to Assigned to Success, Failed or Cancelled. -- * Orchestrate the task flow, so go from Planned to Assigned to Success, Failed or Cancelled.
-- * Co-operation tasking, so a player joins a group of players executing the same task. -- * Co-operation tasking, so a player joins a group of players executing the same task.
@ -44,7 +44,7 @@
-- --
-- === -- ===
-- --
-- Please read through the @{Tasking.Task_Cargo} process to understand the mechanisms of tasking and cargo tasking and handling. -- Please read through the #Tasking.Task_Cargo process to understand the mechanisms of tasking and cargo tasking and handling.
-- --
-- Enjoy! -- Enjoy!
-- FC -- FC
@ -57,7 +57,7 @@
do -- TASK_CARGO_TRANSPORT do -- TASK_CARGO_TRANSPORT
--- @type TASK_CARGO_TRANSPORT -- @type TASK_CARGO_TRANSPORT
-- @extends Tasking.Task_CARGO#TASK_CARGO -- @extends Tasking.Task_CARGO#TASK_CARGO
--- Orchestrates the task for players to transport cargo to or between deployment zones. --- Orchestrates the task for players to transport cargo to or between deployment zones.
@ -76,7 +76,7 @@ do -- TASK_CARGO_TRANSPORT
-- --
-- ## 1.1) Create a command center. -- ## 1.1) Create a command center.
-- --
-- First you need to create a command center using the @{Tasking.CommandCenter#COMMANDCENTER.New}() constructor. -- First you need to create a command center using the Tasking.CommandCenter#COMMANDCENTER.New constructor.
-- --
-- local CommandCenter = COMMANDCENTER -- local CommandCenter = COMMANDCENTER
-- :New( HQ, "Lima" ) -- Create the CommandCenter. -- :New( HQ, "Lima" ) -- Create the CommandCenter.
@ -85,7 +85,7 @@ do -- TASK_CARGO_TRANSPORT
-- --
-- Tasks work in a mission, which groups these tasks to achieve a joint mission goal. -- Tasks work in a mission, which groups these tasks to achieve a joint mission goal.
-- A command center can govern multiple missions. -- A command center can govern multiple missions.
-- Create a new mission, using the @{Tasking.Mission#MISSION.New}() constructor. -- Create a new mission, using the Tasking.Mission#MISSION.New constructor.
-- --
-- -- Declare the Mission for the Command Center. -- -- Declare the Mission for the Command Center.
-- local Mission = MISSION -- local Mission = MISSION
@ -99,7 +99,7 @@ do -- TASK_CARGO_TRANSPORT
-- ## 1.3) Create the transport cargo task. -- ## 1.3) Create the transport cargo task.
-- --
-- So, now that we have a command center and a mission, we now create the transport task. -- So, now that we have a command center and a mission, we now create the transport task.
-- We create the transport task using the @{#TASK_CARGO_TRANSPORT.New}() constructor. -- We create the transport task using the #TASK_CARGO_TRANSPORT.New constructor.
-- --
-- Because a transport task will not generate the cargo itself, you'll need to create it first. -- Because a transport task will not generate the cargo itself, you'll need to create it first.
-- The cargo in this case will be the downed pilot! -- The cargo in this case will be the downed pilot!
@ -118,7 +118,7 @@ do -- TASK_CARGO_TRANSPORT
-- -- The cargoset "CargoSet" will embed all defined cargo of type "Pilots" (prefix) into its set. -- -- The cargoset "CargoSet" will embed all defined cargo of type "Pilots" (prefix) into its set.
-- local CargoGroup = CARGO_GROUP:New( PilotGroup, "Cargo", "Engineer Team 1", 500 ) -- local CargoGroup = CARGO_GROUP:New( PilotGroup, "Cargo", "Engineer Team 1", 500 )
-- --
-- What is also needed, is to have a set of @{Core.Group}s defined that contains the clients of the players. -- What is also needed, is to have a set of Core.Groups defined that contains the clients of the players.
-- --
-- -- Allocate the Transport, which are the helicopter to retrieve the pilot, that can be manned by players. -- -- Allocate the Transport, which are the helicopter to retrieve the pilot, that can be manned by players.
-- local GroupSet = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() -- local GroupSet = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart()
@ -139,10 +139,10 @@ do -- TASK_CARGO_TRANSPORT
-- By doing this, cargo transport tasking will become a dynamic experience. -- By doing this, cargo transport tasking will become a dynamic experience.
-- --
-- --
-- # 2) Create a task using the @{Tasking.Task_Cargo_Dispatcher} module. -- # 2) Create a task using the Tasking.Task_Cargo_Dispatcher module.
-- --
-- Actually, it is better to **GENERATE** these tasks using the @{Tasking.Task_Cargo_Dispatcher} module. -- Actually, it is better to **GENERATE** these tasks using the Tasking.Task_Cargo_Dispatcher module.
-- Using the dispatcher module, transport tasks can be created much more easy. -- Using the dispatcher module, transport tasks can be created easier.
-- --
-- Find below an example how to use the TASK_CARGO_DISPATCHER class: -- Find below an example how to use the TASK_CARGO_DISPATCHER class:
-- --
@ -189,7 +189,7 @@ do -- TASK_CARGO_TRANSPORT
-- In order to properly capture the events and avoid mistakes using the documentation, it is advised that you execute the following actions: -- In order to properly capture the events and avoid mistakes using the documentation, it is advised that you execute the following actions:
-- --
-- * **Copy / Paste** the code section into your script. -- * **Copy / Paste** the code section into your script.
-- * **Change** the CLASS literal to the task object name you have in your script. -- * **Change** the "myclass" literal to the task object name you have in your script.
-- * Within the function, you can now **write your own code**! -- * Within the function, you can now **write your own code**!
-- * **IntelliSense** will recognize the type of the variables provided by the function. Note: the From, Event and To variables can be safely ignored, -- * **IntelliSense** will recognize the type of the variables provided by the function. Note: the From, Event and To variables can be safely ignored,
-- but you need to declare them as they are automatically provided by the event handling system of MOOSE. -- but you need to declare them as they are automatically provided by the event handling system of MOOSE.
@ -210,14 +210,13 @@ do -- TASK_CARGO_TRANSPORT
-- If you want to code your own event handler, use this code fragment to tailor the event when a player carrier has picked up a cargo object in the CarrierGroup. -- If you want to code your own event handler, use this code fragment to tailor the event when a player carrier has picked up a cargo object in the CarrierGroup.
-- You can use this event handler to post messages to players, or provide status updates etc. -- You can use this event handler to post messages to players, or provide status updates etc.
-- --
-- --- CargoPickedUp event handler OnAfter for CLASS. -- --- CargoPickedUp event handler OnAfter for "myclass".
-- -- @param #CLASS self
-- -- @param #string From A string that contains the "*from state name*" when the event was triggered. -- -- @param #string From A string that contains the "*from state name*" when the event was triggered.
-- -- @param #string Event A string that contains the "*event name*" when the event was triggered. -- -- @param #string Event A string that contains the "*event name*" when the event was triggered.
-- -- @param #string To A string that contains the "*to state name*" when the event was triggered. -- -- @param #string To A string that contains the "*to state name*" when the event was triggered.
-- -- @param Wrapper.Unit#UNIT TaskUnit The unit (client) of the player that has picked up the cargo. -- -- @param Wrapper.Unit#UNIT TaskUnit The unit (client) of the player that has picked up the cargo.
-- -- @param Cargo.Cargo#CARGO Cargo The cargo object that has been picked up. Note that this can be a CARGO_GROUP, CARGO_CRATE or CARGO_SLINGLOAD object! -- -- @param Cargo.Cargo#CARGO Cargo The cargo object that has been picked up. Note that this can be a CARGO_GROUP, CARGO_CRATE or CARGO_SLINGLOAD object!
-- function CLASS:OnAfterCargoPickedUp( From, Event, To, TaskUnit, Cargo ) -- function myclass:OnAfterCargoPickedUp( From, Event, To, TaskUnit, Cargo )
-- --
-- -- Write here your own code. -- -- Write here your own code.
-- --
@ -240,15 +239,14 @@ do -- TASK_CARGO_TRANSPORT
-- You can use this event handler to post messages to players, or provide status updates etc. -- You can use this event handler to post messages to players, or provide status updates etc.
-- --
-- --
-- --- CargoDeployed event handler OnAfter for CLASS. -- --- CargoDeployed event handler OnAfter foR "myclass".
-- -- @param #CLASS self
-- -- @param #string From A string that contains the "*from state name*" when the event was triggered. -- -- @param #string From A string that contains the "*from state name*" when the event was triggered.
-- -- @param #string Event A string that contains the "*event name*" when the event was triggered. -- -- @param #string Event A string that contains the "*event name*" when the event was triggered.
-- -- @param #string To A string that contains the "*to state name*" when the event was triggered. -- -- @param #string To A string that contains the "*to state name*" when the event was triggered.
-- -- @param Wrapper.Unit#UNIT TaskUnit The unit (client) of the player that has deployed the cargo. -- -- @param Wrapper.Unit#UNIT TaskUnit The unit (client) of the player that has deployed the cargo.
-- -- @param Cargo.Cargo#CARGO Cargo The cargo object that has been deployed. Note that this can be a CARGO_GROUP, CARGO_CRATE or CARGO_SLINGLOAD object! -- -- @param Cargo.Cargo#CARGO Cargo The cargo object that has been deployed. Note that this can be a CARGO_GROUP, CARGO_CRATE or CARGO_SLINGLOAD object!
-- -- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -- -- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE.
-- function CLASS:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) -- function myclass:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone )
-- --
-- -- Write here your own code. -- -- Write here your own code.
-- --

View File

@ -1675,6 +1675,11 @@ function UTILS.IsLoadingDoorOpen( unit_name )
ret_val = true ret_val = true
end end
if string.find(type_name, "Bell-47") then -- bell aint got no doors so always ready to load injured soldiers
BASE:T(unit_name .. " door is open")
ret_val = true
end
if ret_val == false then if ret_val == false then
BASE:T(unit_name .. " all doors are closed") BASE:T(unit_name .. " all doors are closed")
end end

View File

@ -563,12 +563,12 @@ function GROUP:GetSpeedMax()
local Units=self:GetUnits() local Units=self:GetUnits()
local speedmax=nil local speedmax=0
for _,unit in pairs(Units) do for _,unit in pairs(Units) do
local unit=unit --Wrapper.Unit#UNIT local unit=unit --Wrapper.Unit#UNIT
local speed=unit:GetSpeedMax() local speed=unit:GetSpeedMax()
if speedmax==nil then if speedmax==0 then
speedmax=speed speedmax=speed
elseif speed<speedmax then elseif speed<speedmax then
speedmax=speed speedmax=speed

View File

@ -442,7 +442,7 @@ function UNIT:GetSpeedMax()
return SpeedMax*3.6 return SpeedMax*3.6
end end
return nil return 0
end end
--- Returns the unit's max range in meters derived from the DCS descriptors. --- Returns the unit's max range in meters derived from the DCS descriptors.

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"> <launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="C:\ProgramData\chocolatey\lib\lua51\tools\lua5.1.exe"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/Moose_Framework/lua54/lua54.exe}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="&quot;Moose Setup\Moose_Create.lua&quot; &quot;D&quot; &quot;LOCAL&quot; &quot;${resource_loc:/MOOSE/Moose Development/Moose}&quot; &quot;${resource_loc:/MOOSE/Moose Setup}&quot;&#13;&#10;${resource_loc:/MOOSE_INCLUDE/Moose_Include_Dynamic}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="&quot;Moose Setup/Moose_Create.lua&quot; &quot;D&quot; &quot;LOCAL&quot; &quot;${workspace_loc:/Moose_Framework/Moose Development/Moose}&quot; &quot;${workspace_loc:/Moose_Framework/Moose Setup}&quot;&#13;&#10;&quot;${workspace_loc:/Moose_Framework/MOOSE_INCLUDE\Moose_Include_Dynamic}&quot; 1"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/MOOSE}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Moose_Framework}"/>
</launchConfiguration> </launchConfiguration>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"> <launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="C:\ProgramData\chocolatey\lib\lua51\tools\lua5.1.exe"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/Moose_Framework/lua54/lua54.exe}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="&quot;Moose Setup\Moose_Create.lua&quot; &quot;S&quot; &quot;LOCAL&quot; &quot;${resource_loc:/MOOSE/Moose Development/Moose}&quot; &quot;${resource_loc:/MOOSE/Moose Setup}&quot;&#13;&#10;${resource_loc:/MOOSE_INCLUDE/Moose_Include_Static}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="&quot;Moose Setup\Moose_Create.lua&quot; &quot;S&quot; &quot;LOCAL&quot; &quot;${workspace_loc:/Moose_Framework/Moose Development/Moose}&quot; &quot;${workspace_loc:/Moose_Framework/Moose Setup}&quot;&#13;&#10;&quot;${workspace_loc:/Moose_Framework/MOOSE_INCLUDE\Moose_Include_Static}&quot; 1"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/MOOSE}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/Moose_Framework}"/>
</launchConfiguration> </launchConfiguration>

View File

@ -5,19 +5,32 @@ local MooseCommitHash = arg[2]
local MooseDevelopmentPath = arg[3] local MooseDevelopmentPath = arg[3]
local MooseSetupPath = arg[4] local MooseSetupPath = arg[4]
local MooseTargetPath = arg[5] local MooseTargetPath = arg[5]
local isWindows = arg[6]
if not isWindows then
isWindows = 0
end
print( "Moose (D)ynamic (S)tatic : " .. MooseDynamicStatic ) print( "Moose (D)ynamic (S)tatic : " .. MooseDynamicStatic )
print( "Commit Hash ID : " .. MooseCommitHash ) print( "Commit Hash ID : " .. MooseCommitHash )
print( "Moose development path : " .. MooseDevelopmentPath ) print( "Moose development path : " .. MooseDevelopmentPath )
print( "Moose setup path : " .. MooseSetupPath ) print( "Moose setup path : " .. MooseSetupPath )
print( "Moose target path : " .. MooseTargetPath ) print( "Moose target path : " .. MooseTargetPath )
print( "isWindows : " .. isWindows)
function PathConvert(splatnixPath)
if isWindows == 0 then
return splatnixPath
end
return splatnixPath:gsub("/", "\\")
end
local MooseModulesFilePath = MooseDevelopmentPath .. "/Modules.lua" local MooseModulesFilePath = MooseDevelopmentPath .. "/Modules.lua"
local LoaderFilePath = MooseTargetPath .. "/Moose.lua" local LoaderFilePath = MooseTargetPath .. "/Moose.lua"
print( "Reading Moose source list : " .. MooseModulesFilePath ) print( "Reading Moose source list : " .. MooseModulesFilePath )
print("Opening Loaderfile " .. PathConvert(LoaderFilePath))
local LoaderFile = io.open( LoaderFilePath, "w" ) local LoaderFile = assert(io.open( PathConvert(LoaderFilePath), "w+" ))
if MooseDynamicStatic == "S" then if MooseDynamicStatic == "S" then
LoaderFile:write( "env.info( '*** MOOSE GITHUB Commit Hash ID: " .. MooseCommitHash .. " ***' )\n" ) LoaderFile:write( "env.info( '*** MOOSE GITHUB Commit Hash ID: " .. MooseCommitHash .. " ***' )\n" )
@ -31,13 +44,14 @@ if MooseDynamicStatic == "S" then
MooseLoaderPath = MooseSetupPath .. "/Moose Templates/Moose_Static_Loader.lua" MooseLoaderPath = MooseSetupPath .. "/Moose Templates/Moose_Static_Loader.lua"
end end
local MooseLoader = io.open( MooseLoaderPath, "r" )
local MooseLoader = assert(io.open( PathConvert(MooseLoaderPath), "r" ))
local MooseLoaderText = MooseLoader:read( "*a" ) local MooseLoaderText = MooseLoader:read( "*a" )
MooseLoader:close() MooseLoader:close()
LoaderFile:write( MooseLoaderText ) LoaderFile:write( MooseLoaderText )
local MooseSourcesFile = io.open( MooseModulesFilePath, "r" ) local MooseSourcesFile = assert(io.open( PathConvert(MooseModulesFilePath), "r" ))
local MooseSource = MooseSourcesFile:read("*l") local MooseSource = MooseSourcesFile:read("*l")
while( MooseSource ) do while( MooseSource ) do
@ -50,7 +64,7 @@ while( MooseSource ) do
end end
if MooseDynamicStatic == "S" then if MooseDynamicStatic == "S" then
print( "Load static: " .. MooseFilePath ) print( "Load static: " .. MooseFilePath )
local MooseSourceFile = io.open( MooseFilePath, "r" ) local MooseSourceFile = assert(io.open( PathConvert(MooseFilePath), "r" ))
local MooseSourceFileText = MooseSourceFile:read( "*a" ) local MooseSourceFileText = MooseSourceFile:read( "*a" )
MooseSourceFile:close() MooseSourceFile:close()
@ -72,3 +86,8 @@ LoaderFile:write( "env.info( '*** MOOSE INCLUDE END *** ' )\n" )
MooseSourcesFile:close() MooseSourcesFile:close()
LoaderFile:close() LoaderFile:close()
print("Moose include generation complete.")
if MooseDynamicStatic == "D" then
print("To enable dynamic moose loading, add a soft or hard link from \"<YOUR_DCS_INSTALL_DIRECTORY>\\Scripts\\Moose\" to the \"Moose Development\\Moose\" subdirectory of the Moose_Framework repository.")
end

BIN
lua54/lua54.dll Normal file

Binary file not shown.

BIN
lua54/lua54.exe Normal file

Binary file not shown.