@jtff/miztemplate-lib 3.2.3 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lua/lib/HoundElint.lua +7101 -7101
- package/lua/lib/Moose_.lua +145 -33
- package/package.json +1 -1
- package/resources/sounds/AICSAR/helodown.ogg +0 -0
- package/resources/sounds/AICSAR/initialnotok.ogg +0 -0
- package/resources/sounds/AICSAR/initialok.ogg +0 -0
- package/resources/sounds/AICSAR/pilotdown.ogg +0 -0
- package/resources/sounds/AICSAR/pilotinhelo.ogg +0 -0
- package/resources/sounds/AICSAR/pilotkia.ogg +0 -0
- package/resources/sounds/AICSAR/pilotrescued.ogg +0 -0
package/lua/lib/Moose_.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
env.info('*** MOOSE GITHUB Commit Hash ID: 2024-
|
|
1
|
+
env.info('*** MOOSE GITHUB Commit Hash ID: 2024-06-09T18:32:10+02:00-4668132b37147cb37b15f6a6bb522078e56b5076 ***')
|
|
2
2
|
if not MOOSE_DEVELOPMENT_FOLDER then
|
|
3
3
|
MOOSE_DEVELOPMENT_FOLDER='Scripts'
|
|
4
4
|
end
|
|
@@ -1044,7 +1044,8 @@ TheChannel="TheChannel",
|
|
|
1044
1044
|
Syria="Syria",
|
|
1045
1045
|
MarianaIslands="MarianaIslands",
|
|
1046
1046
|
Falklands="Falklands",
|
|
1047
|
-
Sinai="SinaiMap"
|
|
1047
|
+
Sinai="SinaiMap",
|
|
1048
|
+
Kola="Kola"
|
|
1048
1049
|
}
|
|
1049
1050
|
CALLSIGN={
|
|
1050
1051
|
Aircraft={
|
|
@@ -2070,6 +2071,8 @@ elseif map==DCSMAP.Falklands then
|
|
|
2070
2071
|
declination=12
|
|
2071
2072
|
elseif map==DCSMAP.Sinai then
|
|
2072
2073
|
declination=4.8
|
|
2074
|
+
elseif map==DCSMAP.Kola then
|
|
2075
|
+
declination=15
|
|
2073
2076
|
else
|
|
2074
2077
|
declination=0
|
|
2075
2078
|
end
|
|
@@ -2229,6 +2232,8 @@ elseif theatre==DCSMAP.Falklands then
|
|
|
2229
2232
|
return-3
|
|
2230
2233
|
elseif theatre==DCSMAP.Sinai then
|
|
2231
2234
|
return 2
|
|
2235
|
+
elseif theatre==DCSMAP.Kola then
|
|
2236
|
+
return 3
|
|
2232
2237
|
else
|
|
2233
2238
|
BASE:E(string.format("ERROR: Unknown Map %s in UTILS.GMTToLocal function. Returning 0",tostring(theatre)))
|
|
2234
2239
|
return 0
|
|
@@ -2413,6 +2418,10 @@ if type_name=="MH-60R"and(unit:getDrawArgumentValue(403)>0 or unit:getDrawArgume
|
|
|
2413
2418
|
BASE:T(unit_name.." cargo door is open")
|
|
2414
2419
|
return true
|
|
2415
2420
|
end
|
|
2421
|
+
if type_name==" OH-58D"and(unit:getDrawArgumentValue(35)>0 or unit:getDrawArgumentValue(421)==-1)then
|
|
2422
|
+
BASE:T(unit_name.." cargo door is open")
|
|
2423
|
+
return true
|
|
2424
|
+
end
|
|
2416
2425
|
return false
|
|
2417
2426
|
end
|
|
2418
2427
|
return nil
|
|
@@ -2688,6 +2697,9 @@ local group=_group
|
|
|
2688
2697
|
if group and group:IsAlive()then
|
|
2689
2698
|
local name=group:GetName()
|
|
2690
2699
|
local template=string.gsub(name,"-(.+)$","")
|
|
2700
|
+
if string.find(name,"AID")then
|
|
2701
|
+
template=string.gsub(name,"(.AID.%d+$","")
|
|
2702
|
+
end
|
|
2691
2703
|
if string.find(template,"#")then
|
|
2692
2704
|
template=string.gsub(name,"#(%d+)$","")
|
|
2693
2705
|
end
|
|
@@ -3498,6 +3510,44 @@ end
|
|
|
3498
3510
|
local clockPos=math.ceil((relativeAngle%360)/30)
|
|
3499
3511
|
return clockPos.." o'clock"
|
|
3500
3512
|
end
|
|
3513
|
+
function UTILS.MGRSStringToSRSFriendly(Text,Slow)
|
|
3514
|
+
local Text=string.gsub(Text,"MGRS ","")
|
|
3515
|
+
Text=string.gsub(Text,"%s+","")
|
|
3516
|
+
Text=string.gsub(Text,"([%a%d])","%1;")
|
|
3517
|
+
Text=string.gsub(Text,"A","Alpha")
|
|
3518
|
+
Text=string.gsub(Text,"B","Bravo")
|
|
3519
|
+
Text=string.gsub(Text,"C","Charlie")
|
|
3520
|
+
Text=string.gsub(Text,"D","Delta")
|
|
3521
|
+
Text=string.gsub(Text,"E","Echo")
|
|
3522
|
+
Text=string.gsub(Text,"F","Foxtrot")
|
|
3523
|
+
Text=string.gsub(Text,"G","Golf")
|
|
3524
|
+
Text=string.gsub(Text,"H","Hotel")
|
|
3525
|
+
Text=string.gsub(Text,"I","India")
|
|
3526
|
+
Text=string.gsub(Text,"J","Juliett")
|
|
3527
|
+
Text=string.gsub(Text,"K","Kilo")
|
|
3528
|
+
Text=string.gsub(Text,"L","Lima")
|
|
3529
|
+
Text=string.gsub(Text,"M","Mike")
|
|
3530
|
+
Text=string.gsub(Text,"N","November")
|
|
3531
|
+
Text=string.gsub(Text,"O","Oscar")
|
|
3532
|
+
Text=string.gsub(Text,"P","Papa")
|
|
3533
|
+
Text=string.gsub(Text,"Q","Quebec")
|
|
3534
|
+
Text=string.gsub(Text,"R","Romeo")
|
|
3535
|
+
Text=string.gsub(Text,"S","Sierra")
|
|
3536
|
+
Text=string.gsub(Text,"T","Tango")
|
|
3537
|
+
Text=string.gsub(Text,"U","Uniform")
|
|
3538
|
+
Text=string.gsub(Text,"V","Victor")
|
|
3539
|
+
Text=string.gsub(Text,"W","Whiskey")
|
|
3540
|
+
Text=string.gsub(Text,"X","Xray")
|
|
3541
|
+
Text=string.gsub(Text,"Y","Yankee")
|
|
3542
|
+
Text=string.gsub(Text,"Z","Zulu")
|
|
3543
|
+
Text=string.gsub(Text,"0","zero")
|
|
3544
|
+
Text=string.gsub(Text,"9","niner")
|
|
3545
|
+
if Slow then
|
|
3546
|
+
Text='<prosody rate="slow">'..Text..'</prosody>'
|
|
3547
|
+
end
|
|
3548
|
+
Text="MGRS;"..Text
|
|
3549
|
+
return Text
|
|
3550
|
+
end
|
|
3501
3551
|
PROFILER={
|
|
3502
3552
|
ClassName="PROFILER",
|
|
3503
3553
|
Counters={},
|
|
@@ -7099,7 +7149,7 @@ Event.TgtCategory=Event.TgtDCSUnit:getDesc().category
|
|
|
7099
7149
|
Event.TgtTypeName=Event.TgtDCSUnit:getTypeName()
|
|
7100
7150
|
elseif Event.TgtObjectCategory==Object.Category.STATIC then
|
|
7101
7151
|
Event.TgtDCSUnit=Event.target
|
|
7102
|
-
if Event.target:isExist()and Event.id~=33 then
|
|
7152
|
+
if Event.target.isExist and Event.target:isExist()and Event.id~=33 then
|
|
7103
7153
|
Event.TgtDCSUnitName=Event.TgtDCSUnit:getName()
|
|
7104
7154
|
if Event.TgtDCSUnitName and Event.TgtDCSUnitName~=""then
|
|
7105
7155
|
Event.TgtUnitName=Event.TgtDCSUnitName
|
|
@@ -8395,6 +8445,7 @@ return self
|
|
|
8395
8445
|
end
|
|
8396
8446
|
end
|
|
8397
8447
|
function MENU_GROUP_DELAYED:Set()
|
|
8448
|
+
if not self.GroupID then return end
|
|
8398
8449
|
do
|
|
8399
8450
|
if not self.MenuSet then
|
|
8400
8451
|
missionCommands.addSubMenuForGroup(self.GroupID,self.MenuText,self.MenuParentPath)
|
|
@@ -9991,10 +10042,18 @@ for _,object in pairs(layer["objects"])do
|
|
|
9991
10042
|
if object["name"]==DrawingName then
|
|
9992
10043
|
if(object["primitiveType"]=="Line"and object["closed"]==true)or(object["polygonMode"]=="free")then
|
|
9993
10044
|
for _,point in UTILS.spairs(object["points"])do
|
|
10045
|
+
local skip=false
|
|
9994
10046
|
local p={x=object["mapX"]+point["x"],
|
|
9995
10047
|
y=object["mapY"]+point["y"]}
|
|
10048
|
+
for _,pt in pairs(points)do
|
|
10049
|
+
if pt.x==p.x and pt.y==p.y then
|
|
10050
|
+
skip=true
|
|
10051
|
+
end
|
|
10052
|
+
end
|
|
10053
|
+
if not skip then
|
|
9996
10054
|
table.add(points,p)
|
|
9997
10055
|
end
|
|
10056
|
+
end
|
|
9998
10057
|
elseif object["polygonMode"]=="rect"then
|
|
9999
10058
|
local angle=object["angle"]
|
|
10000
10059
|
local half_width=object["width"]/2
|
|
@@ -12319,6 +12378,7 @@ self:HandleEvent(EVENTS.Birth,self._EventOnBirth)
|
|
|
12319
12378
|
self:HandleEvent(EVENTS.Dead,self._EventOnDeadOrCrash)
|
|
12320
12379
|
self:HandleEvent(EVENTS.Crash,self._EventOnDeadOrCrash)
|
|
12321
12380
|
self:HandleEvent(EVENTS.RemoveUnit,self._EventOnDeadOrCrash)
|
|
12381
|
+
self:HandleEvent(EVENTS.PlayerLeaveUnit,self._EventOnDeadOrCrash)
|
|
12322
12382
|
if self.Filter.Zones then
|
|
12323
12383
|
self.ZoneTimer=TIMER:New(self._ContinousZoneFilter,self)
|
|
12324
12384
|
local timing=self.ZoneTimerInterval or 30
|
|
@@ -17980,9 +18040,9 @@ _MESSAGESRS.MSRS:SetProviderOptionsGoogle(PathToCredentials)
|
|
|
17980
18040
|
_MESSAGESRS.MSRS:SetProvider(MSRS.Provider.GOOGLE)
|
|
17981
18041
|
end
|
|
17982
18042
|
_MESSAGESRS.label=Label or MSRS.Label or"MESSAGE"
|
|
17983
|
-
_MESSAGESRS.MSRS:SetLabel(
|
|
18043
|
+
_MESSAGESRS.MSRS:SetLabel(_MESSAGESRS.label)
|
|
17984
18044
|
_MESSAGESRS.port=Port or MSRS.port or 5002
|
|
17985
|
-
_MESSAGESRS.MSRS:SetPort(
|
|
18045
|
+
_MESSAGESRS.MSRS:SetPort(_MESSAGESRS.port)
|
|
17986
18046
|
_MESSAGESRS.volume=Volume or MSRS.volume or 1
|
|
17987
18047
|
_MESSAGESRS.MSRS:SetVolume(_MESSAGESRS.volume)
|
|
17988
18048
|
if Voice then _MESSAGESRS.MSRS:SetVoice(Voice)end
|
|
@@ -18682,7 +18742,8 @@ return self
|
|
|
18682
18742
|
end
|
|
18683
18743
|
function SPAWN:InitKeepUnitNames(KeepUnitNames)
|
|
18684
18744
|
self:F()
|
|
18685
|
-
self.SpawnInitKeepUnitNames=
|
|
18745
|
+
self.SpawnInitKeepUnitNames=false
|
|
18746
|
+
if KeepUnitNames==true then self.SpawnInitKeepUnitNames=true end
|
|
18686
18747
|
return self
|
|
18687
18748
|
end
|
|
18688
18749
|
function SPAWN:InitLateActivated(LateActivated)
|
|
@@ -19117,8 +19178,6 @@ if not inZone then
|
|
|
19117
19178
|
RandomVec2=PointVec3:GetRandomVec2InRadius(self.SpawnOuterRadius,self.SpawnInnerRadius)
|
|
19118
19179
|
numTries=numTries+1
|
|
19119
19180
|
inZone=SpawnZone:IsVec2InZone(RandomVec2)
|
|
19120
|
-
self:I("Retrying "..numTries.."spawn "..SpawnTemplate.name.." in Zone "..SpawnZone:GetName().."!")
|
|
19121
|
-
self:I(SpawnZone)
|
|
19122
19181
|
end
|
|
19123
19182
|
end
|
|
19124
19183
|
if(not inZone)then
|
|
@@ -19969,14 +20028,14 @@ end
|
|
|
19969
20028
|
return nil
|
|
19970
20029
|
end
|
|
19971
20030
|
function SPAWN:GetSpawnIndexFromGroup(SpawnGroup)
|
|
19972
|
-
self:
|
|
20031
|
+
self:F3({self.SpawnTemplatePrefix,self.SpawnAliasPrefix,SpawnGroup})
|
|
19973
20032
|
local IndexString=string.match(SpawnGroup:GetName(),"#(%d*)$"):sub(2)
|
|
19974
20033
|
local Index=tonumber(IndexString)
|
|
19975
20034
|
self:T3(IndexString,Index)
|
|
19976
20035
|
return Index
|
|
19977
20036
|
end
|
|
19978
20037
|
function SPAWN:_GetLastIndex()
|
|
19979
|
-
self:
|
|
20038
|
+
self:F3({self.SpawnTemplatePrefix,self.SpawnAliasPrefix})
|
|
19980
20039
|
return self.SpawnMaxGroups
|
|
19981
20040
|
end
|
|
19982
20041
|
function SPAWN:_InitializeSpawnGroups(SpawnIndex)
|
|
@@ -20074,7 +20133,9 @@ end
|
|
|
20074
20133
|
end
|
|
20075
20134
|
if self.SpawnInitKeepUnitNames==false then
|
|
20076
20135
|
for UnitID=1,#SpawnTemplate.units do
|
|
20136
|
+
if not string.find(SpawnTemplate.units[UnitID].name,"#IFF_",1,true)then
|
|
20077
20137
|
SpawnTemplate.units[UnitID].name=string.format(SpawnTemplate.name..'-%02d',UnitID)
|
|
20138
|
+
end
|
|
20078
20139
|
SpawnTemplate.units[UnitID].unitId=nil
|
|
20079
20140
|
end
|
|
20080
20141
|
else
|
|
@@ -20086,11 +20147,9 @@ end
|
|
|
20086
20147
|
local UnitPrefix,Rest
|
|
20087
20148
|
if SpawnInitKeepUnitIFF==false then
|
|
20088
20149
|
UnitPrefix,Rest=string.match(SpawnTemplate.units[UnitID].name,"^([^#]+)#?"):gsub("^%s*(.-)%s*$","%1")
|
|
20150
|
+
SpawnTemplate.units[UnitID].name=string.format('%s#%03d-%02d',UnitPrefix,SpawnIndex,UnitID)
|
|
20089
20151
|
self:T({UnitPrefix,Rest})
|
|
20090
|
-
else
|
|
20091
|
-
UnitPrefix=SpawnTemplate.units[UnitID].name
|
|
20092
20152
|
end
|
|
20093
|
-
SpawnTemplate.units[UnitID].name=string.format('%s#%03d-%02d',UnitPrefix,SpawnIndex,UnitID)
|
|
20094
20153
|
SpawnTemplate.units[UnitID].unitId=nil
|
|
20095
20154
|
end
|
|
20096
20155
|
end
|
|
@@ -26216,6 +26275,7 @@ end
|
|
|
26216
26275
|
end
|
|
26217
26276
|
end
|
|
26218
26277
|
local DCSGroup=Group.getByName(self.GroupName)
|
|
26278
|
+
if DCSGroup then
|
|
26219
26279
|
local DCSUnits=DCSGroup:getUnits()or{}
|
|
26220
26280
|
for _,_unit in pairs(DCSUnits)do
|
|
26221
26281
|
if Object.isExist(_unit)then
|
|
@@ -26227,6 +26287,7 @@ return coord
|
|
|
26227
26287
|
end
|
|
26228
26288
|
end
|
|
26229
26289
|
end
|
|
26290
|
+
end
|
|
26230
26291
|
BASE:E({"Cannot GetCoordinate",Group=self,Alive=self:IsAlive()})
|
|
26231
26292
|
end
|
|
26232
26293
|
function GROUP:GetRandomVec3(Radius)
|
|
@@ -28803,19 +28864,19 @@ AIRBASE.Sinai={
|
|
|
28803
28864
|
["Wadi_al_Jandali"]="Wadi al Jandali",
|
|
28804
28865
|
}
|
|
28805
28866
|
AIRBASE.Kola={
|
|
28867
|
+
["Banak"]="Banak",
|
|
28806
28868
|
["Bas_100"]="Bas 100",
|
|
28807
28869
|
["Bodo"]="Bodo",
|
|
28808
28870
|
["Jokkmokk"]="Jokkmokk",
|
|
28809
28871
|
["Kalixfors"]="Kalixfors",
|
|
28810
28872
|
["Kemi_Tornio"]="Kemi Tornio",
|
|
28811
28873
|
["Kiruna"]="Kiruna",
|
|
28812
|
-
["Lakselv"]="Lakselv",
|
|
28813
28874
|
["Monchegorsk"]="Monchegorsk",
|
|
28814
28875
|
["Murmansk_International"]="Murmansk International",
|
|
28815
|
-
["
|
|
28876
|
+
["Olenya"]="Olenya",
|
|
28816
28877
|
["Rovaniemi"]="Rovaniemi",
|
|
28817
|
-
["
|
|
28818
|
-
["
|
|
28878
|
+
["Severomorsk_1"]="Severomorsk-1",
|
|
28879
|
+
["Severomorsk_3"]="Severomorsk-3",
|
|
28819
28880
|
}
|
|
28820
28881
|
AIRBASE.TerminalType={
|
|
28821
28882
|
Runway=16,
|
|
@@ -51993,6 +52054,7 @@ SuppressedGroups={},
|
|
|
51993
52054
|
automode=true,
|
|
51994
52055
|
autoshorad=true,
|
|
51995
52056
|
ShoradGroupSet=nil,
|
|
52057
|
+
checkforfriendlies=false,
|
|
51996
52058
|
}
|
|
51997
52059
|
MANTIS.AdvancedState={
|
|
51998
52060
|
GREEN=0,
|
|
@@ -52081,6 +52143,7 @@ MANTIS.SamDataCH={
|
|
|
52081
52143
|
do
|
|
52082
52144
|
function MANTIS:New(name,samprefix,ewrprefix,hq,coalition,dynamic,awacs,EmOnOff,Padding,Zones)
|
|
52083
52145
|
local self=BASE:Inherit(self,FSM:New())
|
|
52146
|
+
self.name=name or"mymantis"
|
|
52084
52147
|
self.SAM_Templates_Prefix=samprefix or"Red SAM"
|
|
52085
52148
|
self.EWR_Templates_Prefix=ewrprefix or"Red EWR"
|
|
52086
52149
|
self.HQ_Template_CC=hq or nil
|
|
@@ -52181,7 +52244,7 @@ end
|
|
|
52181
52244
|
if self.HQ_Template_CC then
|
|
52182
52245
|
self.HQ_CC=GROUP:FindByName(self.HQ_Template_CC)
|
|
52183
52246
|
end
|
|
52184
|
-
self.version="0.8.
|
|
52247
|
+
self.version="0.8.18"
|
|
52185
52248
|
self:I(string.format("***** Starting MANTIS Version %s *****",self.version))
|
|
52186
52249
|
self:SetStartState("Stopped")
|
|
52187
52250
|
self:AddTransition("Stopped","Start","Running")
|
|
@@ -52518,6 +52581,10 @@ local set=dectset
|
|
|
52518
52581
|
if dlink then
|
|
52519
52582
|
set=self:_PreFilterHeight(height)
|
|
52520
52583
|
end
|
|
52584
|
+
local friendlyset
|
|
52585
|
+
if self.checkforfriendlies==true then
|
|
52586
|
+
friendlyset=SET_GROUP:New():FilterCoalitions(self.Coalition):FilterCategories({"plane","helicopter"}):FilterFunction(function(grp)if grp and grp:InAir()then return true else return false end end):FilterOnce()
|
|
52587
|
+
end
|
|
52521
52588
|
for _,_coord in pairs(set)do
|
|
52522
52589
|
local coord=_coord
|
|
52523
52590
|
local targetdistance=samcoordinate:DistanceFromPointVec2(coord)
|
|
@@ -52539,7 +52606,14 @@ local text=string.format("Checking SAM at %s | Targetdist %d | Rad %d | Inrange
|
|
|
52539
52606
|
local m=MESSAGE:New(text,10,"Check"):ToAllIf(self.debug)
|
|
52540
52607
|
self:T(self.lid..text)
|
|
52541
52608
|
end
|
|
52542
|
-
|
|
52609
|
+
local nofriendlies=true
|
|
52610
|
+
if self.checkforfriendlies==true then
|
|
52611
|
+
local closestfriend,distance=friendlyset:GetClosestGroup(samcoordinate)
|
|
52612
|
+
if closestfriend and distance and distance<rad then
|
|
52613
|
+
nofriendlies=false
|
|
52614
|
+
end
|
|
52615
|
+
end
|
|
52616
|
+
if targetdistance<=rad and zonecheck==true and nofriendlies==true then
|
|
52543
52617
|
return true,targetdistance
|
|
52544
52618
|
end
|
|
52545
52619
|
end
|
|
@@ -54018,6 +54092,13 @@ function AIRBOSS:SetLSOCallInterval(TimeInterval)
|
|
|
54018
54092
|
self.LSOdT=TimeInterval or 4
|
|
54019
54093
|
return self
|
|
54020
54094
|
end
|
|
54095
|
+
function AIRBOSS:SetIntoWindLegacy(SwitchOn)
|
|
54096
|
+
if SwitchOn==nil then
|
|
54097
|
+
SwitchOn=true
|
|
54098
|
+
end
|
|
54099
|
+
self.intowindold=SwitchOn
|
|
54100
|
+
return self
|
|
54101
|
+
end
|
|
54021
54102
|
function AIRBOSS:SetAirbossNiceGuy(Switch)
|
|
54022
54103
|
if Switch==true or Switch==nil then
|
|
54023
54104
|
self.airbossnice=true
|
|
@@ -54482,6 +54563,9 @@ local eta=UTILS.SecondsToClock(self:_GetETAatNextWP())
|
|
|
54482
54563
|
local hdg=self:GetHeading()
|
|
54483
54564
|
local pos=self:GetCoordinate()
|
|
54484
54565
|
local speed=self.carrier:GetVelocityKNOTS()
|
|
54566
|
+
if require then
|
|
54567
|
+
self.magvar=pos:GetMagneticDeclination()
|
|
54568
|
+
end
|
|
54485
54569
|
local collision=false
|
|
54486
54570
|
local holdtime=0
|
|
54487
54571
|
if self.holdtimestamp then
|
|
@@ -55399,6 +55483,7 @@ HAWKEYE={file="PILOT-Hawkeye",suffix="ogg",loud=false,subtitle="",duration=0.63,
|
|
|
55399
55483
|
TOMCAT={file="PILOT-Tomcat",suffix="ogg",loud=false,subtitle="",duration=0.66,subduration=5},
|
|
55400
55484
|
HORNET={file="PILOT-Hornet",suffix="ogg",loud=false,subtitle="",duration=0.56,subduration=5},
|
|
55401
55485
|
VIKING={file="PILOT-Viking",suffix="ogg",loud=false,subtitle="",duration=0.61,subduration=5},
|
|
55486
|
+
GREYHOUND={file="PILOT-Greyhound",suffix="ogg",loud=false,subtitle="",duration=0.61,subduration=5},
|
|
55402
55487
|
BALL={file="PILOT-Ball",suffix="ogg",loud=false,subtitle="",duration=0.50,subduration=5},
|
|
55403
55488
|
BINGOFUEL={file="PILOT-BingoFuel",suffix="ogg",loud=false,subtitle="",duration=0.80},
|
|
55404
55489
|
GASATDIVERT={file="PILOT-GasAtDivert",suffix="ogg",loud=false,subtitle="",duration=1.80},
|
|
@@ -56026,7 +56111,7 @@ or flight.actype==AIRBOSS.AircraftCarrier.RHINOE
|
|
|
56026
56111
|
or flight.actype==AIRBOSS.AircraftCarrier.RHINOF
|
|
56027
56112
|
or flight.actype==AIRBOSS.AircraftCarrier.GROWLER then
|
|
56028
56113
|
Speed=UTILS.KnotsToKmph(200)
|
|
56029
|
-
elseif flight.actype==AIRBOSS.AircraftCarrier.E2D then
|
|
56114
|
+
elseif flight.actype==AIRBOSS.AircraftCarrier.E2D or flight.actype==AIRBOSS.AircraftCarrier.C2A then
|
|
56030
56115
|
Speed=UTILS.KnotsToKmph(150)
|
|
56031
56116
|
elseif flight.actype==AIRBOSS.AircraftCarrier.F14A_AI or flight.actype==AIRBOSS.AircraftCarrier.F14A or flight.actype==AIRBOSS.AircraftCarrier.F14B then
|
|
56032
56117
|
Speed=UTILS.KnotsToKmph(175)
|
|
@@ -58483,7 +58568,14 @@ local vpp=UTILS.VecDot(vT,zc)
|
|
|
58483
58568
|
local vabs=UTILS.VecNorm(vT)
|
|
58484
58569
|
return-vpa,vpp,vabs
|
|
58485
58570
|
end
|
|
58486
|
-
function AIRBOSS:
|
|
58571
|
+
function AIRBOSS:GetHeadingIntoWind(vdeck,magnetic,coord)
|
|
58572
|
+
if self.intowindold then
|
|
58573
|
+
return self:GetHeadingIntoWind_old(vdeck,magnetic,coord)
|
|
58574
|
+
else
|
|
58575
|
+
return self:GetHeadingIntoWind_new(vdeck,magnetic,coord)
|
|
58576
|
+
end
|
|
58577
|
+
end
|
|
58578
|
+
function AIRBOSS:GetHeadingIntoWind_old(vdeck,magnetic,coord)
|
|
58487
58579
|
local function adjustDegreesForWindSpeed(windSpeed)
|
|
58488
58580
|
local degreesAdjustment=0
|
|
58489
58581
|
if windSpeed>0 and windSpeed<3 then
|
|
@@ -58510,9 +58602,10 @@ end
|
|
|
58510
58602
|
if intowind<0 then
|
|
58511
58603
|
intowind=intowind+360
|
|
58512
58604
|
end
|
|
58513
|
-
|
|
58605
|
+
local vtot=math.max(vdeck-UTILS.MpsToKnots(vwind),4)
|
|
58606
|
+
return intowind,vtot
|
|
58514
58607
|
end
|
|
58515
|
-
function AIRBOSS:
|
|
58608
|
+
function AIRBOSS:GetHeadingIntoWind_new(vdeck,magnetic,coord)
|
|
58516
58609
|
local Offset=self.carrierparam.rwyangle or 0
|
|
58517
58610
|
local windfrom,vwind=self:GetWind(18,nil,coord)
|
|
58518
58611
|
local Vmin=4
|
|
@@ -59846,6 +59939,8 @@ elseif actype==AIRBOSS.AircraftCarrier.AV8B then
|
|
|
59846
59939
|
nickname="Harrier"
|
|
59847
59940
|
elseif actype==AIRBOSS.AircraftCarrier.E2D then
|
|
59848
59941
|
nickname="Hawkeye"
|
|
59942
|
+
elseif actype==AIRBOSS.AircraftCarrier.C2A then
|
|
59943
|
+
nickname="Greyhound"
|
|
59849
59944
|
elseif actype==AIRBOSS.AircraftCarrier.F14A_AI or actype==AIRBOSS.AircraftCarrier.F14A or actype==AIRBOSS.AircraftCarrier.F14B then
|
|
59850
59945
|
nickname="Tomcat"
|
|
59851
59946
|
elseif actype==AIRBOSS.AircraftCarrier.FA18C or actype==AIRBOSS.AircraftCarrier.HORNET then
|
|
@@ -65240,8 +65335,9 @@ CTLD.UnitTypeCapabilities={
|
|
|
65240
65335
|
["AH-64D_BLK_II"]={type="AH-64D_BLK_II",crates=false,troops=true,cratelimit=0,trooplimit=2,length=17,cargoweightlimit=200},
|
|
65241
65336
|
["Bronco-OV-10A"]={type="Bronco-OV-10A",crates=false,troops=true,cratelimit=0,trooplimit=5,length=13,cargoweightlimit=1450},
|
|
65242
65337
|
["OH-6A"]={type="OH-6A",crates=false,troops=true,cratelimit=0,trooplimit=4,length=7,cargoweightlimit=550},
|
|
65338
|
+
["OH-58D"]={type="OH-58D",crates=false,troops=false,cratelimit=0,trooplimit=0,length=14,cargoweightlimit=400},
|
|
65243
65339
|
}
|
|
65244
|
-
CTLD.version="1.0.
|
|
65340
|
+
CTLD.version="1.0.54"
|
|
65245
65341
|
function CTLD:New(Coalition,Prefixes,Alias)
|
|
65246
65342
|
local self=BASE:Inherit(self,FSM:New())
|
|
65247
65343
|
BASE:T({Coalition,Prefixes,Alias})
|
|
@@ -66856,7 +66952,7 @@ self:T(self.lid.." _MoveGroupToZone")
|
|
|
66856
66952
|
local groupname=Group:GetName()or"none"
|
|
66857
66953
|
local groupcoord=Group:GetCoordinate()
|
|
66858
66954
|
local outcome,name,zone,distance=self:IsUnitInZone(Group,CTLD.CargoZoneType.MOVE)
|
|
66859
|
-
if(distance<=self.movetroopsdistance)and zone then
|
|
66955
|
+
if(distance<=self.movetroopsdistance)and outcome==true and zone~=nil then
|
|
66860
66956
|
local groupname=Group:GetName()
|
|
66861
66957
|
local zonecoord=zone:GetRandomCoordinate(20,125)
|
|
66862
66958
|
local coordinate=zonecoord:GetVec2()
|
|
@@ -67487,10 +67583,9 @@ zoneradius=2000
|
|
|
67487
67583
|
zonewidth=zoneradius
|
|
67488
67584
|
end
|
|
67489
67585
|
local distance=self:_GetDistance(zonecoord,unitcoord)
|
|
67490
|
-
|
|
67586
|
+
self:T("Distance Zone: "..distance)
|
|
67587
|
+
if(zone:IsVec2InZone(unitVec2)or Zonetype==CTLD.CargoZoneType.MOVE)and active==true and maxdist>distance then
|
|
67491
67588
|
outcome=true
|
|
67492
|
-
end
|
|
67493
|
-
if maxdist>distance then
|
|
67494
67589
|
maxdist=distance
|
|
67495
67590
|
zoneret=zone
|
|
67496
67591
|
zonenameret=zonename
|
|
@@ -68973,7 +69068,8 @@ CSAR.AircraftType["AH-64D_BLK_II"]=2
|
|
|
68973
69068
|
CSAR.AircraftType["Bronco-OV-10A"]=2
|
|
68974
69069
|
CSAR.AircraftType["MH-60R"]=10
|
|
68975
69070
|
CSAR.AircraftType["OH-6A"]=2
|
|
68976
|
-
CSAR.
|
|
69071
|
+
CSAR.AircraftType["OH-58D"]=2
|
|
69072
|
+
CSAR.version="1.0.24"
|
|
68977
69073
|
function CSAR:New(Coalition,Template,Alias)
|
|
68978
69074
|
local self=BASE:Inherit(self,FSM:New())
|
|
68979
69075
|
BASE:T({Coalition,Template,Alias})
|
|
@@ -69173,7 +69269,6 @@ local _spawnedGroup=SPAWN
|
|
|
69173
69269
|
:NewWithAlias(template,alias)
|
|
69174
69270
|
:InitCoalition(coalition)
|
|
69175
69271
|
:InitCountry(country)
|
|
69176
|
-
:InitAIOnOff(pilotcacontrol)
|
|
69177
69272
|
:InitDelayOff()
|
|
69178
69273
|
:SpawnFromCoordinate(point)
|
|
69179
69274
|
return _spawnedGroup,alias
|
|
@@ -69495,10 +69590,24 @@ local _leadername=_leader:GetName()
|
|
|
69495
69590
|
if not _nomessage then
|
|
69496
69591
|
if _freq~=0 then
|
|
69497
69592
|
local _text=string.format("%s requests SAR at %s, beacon at %.2f KHz",_groupName,_coordinatesText,_freqk)
|
|
69593
|
+
if self.coordtype~=2 then
|
|
69498
69594
|
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime)
|
|
69499
69595
|
else
|
|
69596
|
+
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime,false,true)
|
|
69597
|
+
local coordtext=UTILS.MGRSStringToSRSFriendly(_coordinatesText,true)
|
|
69598
|
+
local _text=string.format("%s requests SAR at %s, beacon at %.2f kilo hertz",_groupName,coordtext,_freqk)
|
|
69599
|
+
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime,true,false)
|
|
69600
|
+
end
|
|
69601
|
+
else
|
|
69500
69602
|
local _text=string.format("Pickup Zone at %s.",_coordinatesText)
|
|
69603
|
+
if self.coordtype~=2 then
|
|
69501
69604
|
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime)
|
|
69605
|
+
else
|
|
69606
|
+
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime,false,true)
|
|
69607
|
+
local coordtext=UTILS.MGRSStringToSRSFriendly(_coordinatesText,true)
|
|
69608
|
+
local _text=string.format("Pickup Zone at %s.",coordtext)
|
|
69609
|
+
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime,true,false)
|
|
69610
|
+
end
|
|
69502
69611
|
end
|
|
69503
69612
|
end
|
|
69504
69613
|
for _,_heliName in pairs(self.csarUnits)do
|
|
@@ -70003,23 +70112,26 @@ self:_DisplayMessageToSAR(_heli,string.format("No Pilots within %s",dtext),self.
|
|
|
70003
70112
|
end
|
|
70004
70113
|
return self
|
|
70005
70114
|
end
|
|
70006
|
-
function CSAR:_DisplayToAllSAR(_message,_side,_messagetime)
|
|
70115
|
+
function CSAR:_DisplayToAllSAR(_message,_side,_messagetime,ToSRS,ToScreen)
|
|
70007
70116
|
self:T(self.lid.." _DisplayToAllSAR")
|
|
70008
70117
|
local messagetime=_messagetime or self.messageTime
|
|
70009
|
-
|
|
70118
|
+
self:T({_message,ToSRS=ToSRS,ToScreen=ToScreen})
|
|
70119
|
+
if self.msrs and(ToSRS==true or ToSRS==nil)then
|
|
70010
70120
|
local voice=self.CSARVoice or MSRS.Voices.Google.Standard.en_GB_Standard_F
|
|
70011
70121
|
if self.msrs:GetProvider()==MSRS.Provider.WINDOWS then
|
|
70012
70122
|
voice=self.CSARVoiceMS or MSRS.Voices.Microsoft.Hedda
|
|
70013
70123
|
end
|
|
70014
|
-
self:
|
|
70124
|
+
self:F("Voice = "..voice)
|
|
70015
70125
|
self.SRSQueue:NewTransmission(_message,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,voice,volume,label,self.coordinate)
|
|
70016
70126
|
end
|
|
70127
|
+
if ToScreen==true or ToScreen==nil then
|
|
70017
70128
|
for _,_unitName in pairs(self.csarUnits)do
|
|
70018
70129
|
local _unit=self:_GetSARHeli(_unitName)
|
|
70019
70130
|
if _unit and not self.suppressmessages then
|
|
70020
70131
|
self:_DisplayMessageToSAR(_unit,_message,_messagetime)
|
|
70021
70132
|
end
|
|
70022
70133
|
end
|
|
70134
|
+
end
|
|
70023
70135
|
return self
|
|
70024
70136
|
end
|
|
70025
70137
|
function CSAR:_Reqsmoke(_unitName)
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|