@jtff/miztemplate-lib 3.2.2 → 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 +160 -30
- 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)
|
|
@@ -18914,11 +18975,12 @@ self.SpawnRandomCallsign=true
|
|
|
18914
18975
|
return self
|
|
18915
18976
|
end
|
|
18916
18977
|
function SPAWN:InitCallSign(ID,Name,Minor,Major)
|
|
18978
|
+
local Name=Name or"Enfield"
|
|
18917
18979
|
self.SpawnInitCallSign=true
|
|
18918
18980
|
self.SpawnInitCallSignID=ID or 1
|
|
18919
18981
|
self.SpawnInitCallSignMinor=Minor or 1
|
|
18920
18982
|
self.SpawnInitCallSignMajor=Major or 1
|
|
18921
|
-
self.SpawnInitCallSignName=string.lower(Name)
|
|
18983
|
+
self.SpawnInitCallSignName=string.lower(Name):gsub("^%l",string.upper)
|
|
18922
18984
|
return self
|
|
18923
18985
|
end
|
|
18924
18986
|
function SPAWN:InitPositionCoordinate(Coordinate)
|
|
@@ -19116,8 +19178,6 @@ if not inZone then
|
|
|
19116
19178
|
RandomVec2=PointVec3:GetRandomVec2InRadius(self.SpawnOuterRadius,self.SpawnInnerRadius)
|
|
19117
19179
|
numTries=numTries+1
|
|
19118
19180
|
inZone=SpawnZone:IsVec2InZone(RandomVec2)
|
|
19119
|
-
self:I("Retrying "..numTries.."spawn "..SpawnTemplate.name.." in Zone "..SpawnZone:GetName().."!")
|
|
19120
|
-
self:I(SpawnZone)
|
|
19121
19181
|
end
|
|
19122
19182
|
end
|
|
19123
19183
|
if(not inZone)then
|
|
@@ -19968,14 +20028,14 @@ end
|
|
|
19968
20028
|
return nil
|
|
19969
20029
|
end
|
|
19970
20030
|
function SPAWN:GetSpawnIndexFromGroup(SpawnGroup)
|
|
19971
|
-
self:
|
|
20031
|
+
self:F3({self.SpawnTemplatePrefix,self.SpawnAliasPrefix,SpawnGroup})
|
|
19972
20032
|
local IndexString=string.match(SpawnGroup:GetName(),"#(%d*)$"):sub(2)
|
|
19973
20033
|
local Index=tonumber(IndexString)
|
|
19974
20034
|
self:T3(IndexString,Index)
|
|
19975
20035
|
return Index
|
|
19976
20036
|
end
|
|
19977
20037
|
function SPAWN:_GetLastIndex()
|
|
19978
|
-
self:
|
|
20038
|
+
self:F3({self.SpawnTemplatePrefix,self.SpawnAliasPrefix})
|
|
19979
20039
|
return self.SpawnMaxGroups
|
|
19980
20040
|
end
|
|
19981
20041
|
function SPAWN:_InitializeSpawnGroups(SpawnIndex)
|
|
@@ -20073,7 +20133,9 @@ end
|
|
|
20073
20133
|
end
|
|
20074
20134
|
if self.SpawnInitKeepUnitNames==false then
|
|
20075
20135
|
for UnitID=1,#SpawnTemplate.units do
|
|
20136
|
+
if not string.find(SpawnTemplate.units[UnitID].name,"#IFF_",1,true)then
|
|
20076
20137
|
SpawnTemplate.units[UnitID].name=string.format(SpawnTemplate.name..'-%02d',UnitID)
|
|
20138
|
+
end
|
|
20077
20139
|
SpawnTemplate.units[UnitID].unitId=nil
|
|
20078
20140
|
end
|
|
20079
20141
|
else
|
|
@@ -20085,11 +20147,9 @@ end
|
|
|
20085
20147
|
local UnitPrefix,Rest
|
|
20086
20148
|
if SpawnInitKeepUnitIFF==false then
|
|
20087
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)
|
|
20088
20151
|
self:T({UnitPrefix,Rest})
|
|
20089
|
-
else
|
|
20090
|
-
UnitPrefix=SpawnTemplate.units[UnitID].name
|
|
20091
20152
|
end
|
|
20092
|
-
SpawnTemplate.units[UnitID].name=string.format('%s#%03d-%02d',UnitPrefix,SpawnIndex,UnitID)
|
|
20093
20153
|
SpawnTemplate.units[UnitID].unitId=nil
|
|
20094
20154
|
end
|
|
20095
20155
|
end
|
|
@@ -26215,6 +26275,7 @@ end
|
|
|
26215
26275
|
end
|
|
26216
26276
|
end
|
|
26217
26277
|
local DCSGroup=Group.getByName(self.GroupName)
|
|
26278
|
+
if DCSGroup then
|
|
26218
26279
|
local DCSUnits=DCSGroup:getUnits()or{}
|
|
26219
26280
|
for _,_unit in pairs(DCSUnits)do
|
|
26220
26281
|
if Object.isExist(_unit)then
|
|
@@ -26226,6 +26287,7 @@ return coord
|
|
|
26226
26287
|
end
|
|
26227
26288
|
end
|
|
26228
26289
|
end
|
|
26290
|
+
end
|
|
26229
26291
|
BASE:E({"Cannot GetCoordinate",Group=self,Alive=self:IsAlive()})
|
|
26230
26292
|
end
|
|
26231
26293
|
function GROUP:GetRandomVec3(Radius)
|
|
@@ -28801,6 +28863,21 @@ AIRBASE.Sinai={
|
|
|
28801
28863
|
["Tel_Nof"]="Tel Nof",
|
|
28802
28864
|
["Wadi_al_Jandali"]="Wadi al Jandali",
|
|
28803
28865
|
}
|
|
28866
|
+
AIRBASE.Kola={
|
|
28867
|
+
["Banak"]="Banak",
|
|
28868
|
+
["Bas_100"]="Bas 100",
|
|
28869
|
+
["Bodo"]="Bodo",
|
|
28870
|
+
["Jokkmokk"]="Jokkmokk",
|
|
28871
|
+
["Kalixfors"]="Kalixfors",
|
|
28872
|
+
["Kemi_Tornio"]="Kemi Tornio",
|
|
28873
|
+
["Kiruna"]="Kiruna",
|
|
28874
|
+
["Monchegorsk"]="Monchegorsk",
|
|
28875
|
+
["Murmansk_International"]="Murmansk International",
|
|
28876
|
+
["Olenya"]="Olenya",
|
|
28877
|
+
["Rovaniemi"]="Rovaniemi",
|
|
28878
|
+
["Severomorsk_1"]="Severomorsk-1",
|
|
28879
|
+
["Severomorsk_3"]="Severomorsk-3",
|
|
28880
|
+
}
|
|
28804
28881
|
AIRBASE.TerminalType={
|
|
28805
28882
|
Runway=16,
|
|
28806
28883
|
HelicopterOnly=40,
|
|
@@ -51977,6 +52054,7 @@ SuppressedGroups={},
|
|
|
51977
52054
|
automode=true,
|
|
51978
52055
|
autoshorad=true,
|
|
51979
52056
|
ShoradGroupSet=nil,
|
|
52057
|
+
checkforfriendlies=false,
|
|
51980
52058
|
}
|
|
51981
52059
|
MANTIS.AdvancedState={
|
|
51982
52060
|
GREEN=0,
|
|
@@ -52065,6 +52143,7 @@ MANTIS.SamDataCH={
|
|
|
52065
52143
|
do
|
|
52066
52144
|
function MANTIS:New(name,samprefix,ewrprefix,hq,coalition,dynamic,awacs,EmOnOff,Padding,Zones)
|
|
52067
52145
|
local self=BASE:Inherit(self,FSM:New())
|
|
52146
|
+
self.name=name or"mymantis"
|
|
52068
52147
|
self.SAM_Templates_Prefix=samprefix or"Red SAM"
|
|
52069
52148
|
self.EWR_Templates_Prefix=ewrprefix or"Red EWR"
|
|
52070
52149
|
self.HQ_Template_CC=hq or nil
|
|
@@ -52165,7 +52244,7 @@ end
|
|
|
52165
52244
|
if self.HQ_Template_CC then
|
|
52166
52245
|
self.HQ_CC=GROUP:FindByName(self.HQ_Template_CC)
|
|
52167
52246
|
end
|
|
52168
|
-
self.version="0.8.
|
|
52247
|
+
self.version="0.8.18"
|
|
52169
52248
|
self:I(string.format("***** Starting MANTIS Version %s *****",self.version))
|
|
52170
52249
|
self:SetStartState("Stopped")
|
|
52171
52250
|
self:AddTransition("Stopped","Start","Running")
|
|
@@ -52502,6 +52581,10 @@ local set=dectset
|
|
|
52502
52581
|
if dlink then
|
|
52503
52582
|
set=self:_PreFilterHeight(height)
|
|
52504
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
|
|
52505
52588
|
for _,_coord in pairs(set)do
|
|
52506
52589
|
local coord=_coord
|
|
52507
52590
|
local targetdistance=samcoordinate:DistanceFromPointVec2(coord)
|
|
@@ -52523,7 +52606,14 @@ local text=string.format("Checking SAM at %s | Targetdist %d | Rad %d | Inrange
|
|
|
52523
52606
|
local m=MESSAGE:New(text,10,"Check"):ToAllIf(self.debug)
|
|
52524
52607
|
self:T(self.lid..text)
|
|
52525
52608
|
end
|
|
52526
|
-
|
|
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
|
|
52527
52617
|
return true,targetdistance
|
|
52528
52618
|
end
|
|
52529
52619
|
end
|
|
@@ -54002,6 +54092,13 @@ function AIRBOSS:SetLSOCallInterval(TimeInterval)
|
|
|
54002
54092
|
self.LSOdT=TimeInterval or 4
|
|
54003
54093
|
return self
|
|
54004
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
|
|
54005
54102
|
function AIRBOSS:SetAirbossNiceGuy(Switch)
|
|
54006
54103
|
if Switch==true or Switch==nil then
|
|
54007
54104
|
self.airbossnice=true
|
|
@@ -54466,6 +54563,9 @@ local eta=UTILS.SecondsToClock(self:_GetETAatNextWP())
|
|
|
54466
54563
|
local hdg=self:GetHeading()
|
|
54467
54564
|
local pos=self:GetCoordinate()
|
|
54468
54565
|
local speed=self.carrier:GetVelocityKNOTS()
|
|
54566
|
+
if require then
|
|
54567
|
+
self.magvar=pos:GetMagneticDeclination()
|
|
54568
|
+
end
|
|
54469
54569
|
local collision=false
|
|
54470
54570
|
local holdtime=0
|
|
54471
54571
|
if self.holdtimestamp then
|
|
@@ -55383,6 +55483,7 @@ HAWKEYE={file="PILOT-Hawkeye",suffix="ogg",loud=false,subtitle="",duration=0.63,
|
|
|
55383
55483
|
TOMCAT={file="PILOT-Tomcat",suffix="ogg",loud=false,subtitle="",duration=0.66,subduration=5},
|
|
55384
55484
|
HORNET={file="PILOT-Hornet",suffix="ogg",loud=false,subtitle="",duration=0.56,subduration=5},
|
|
55385
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},
|
|
55386
55487
|
BALL={file="PILOT-Ball",suffix="ogg",loud=false,subtitle="",duration=0.50,subduration=5},
|
|
55387
55488
|
BINGOFUEL={file="PILOT-BingoFuel",suffix="ogg",loud=false,subtitle="",duration=0.80},
|
|
55388
55489
|
GASATDIVERT={file="PILOT-GasAtDivert",suffix="ogg",loud=false,subtitle="",duration=1.80},
|
|
@@ -56010,7 +56111,7 @@ or flight.actype==AIRBOSS.AircraftCarrier.RHINOE
|
|
|
56010
56111
|
or flight.actype==AIRBOSS.AircraftCarrier.RHINOF
|
|
56011
56112
|
or flight.actype==AIRBOSS.AircraftCarrier.GROWLER then
|
|
56012
56113
|
Speed=UTILS.KnotsToKmph(200)
|
|
56013
|
-
elseif flight.actype==AIRBOSS.AircraftCarrier.E2D then
|
|
56114
|
+
elseif flight.actype==AIRBOSS.AircraftCarrier.E2D or flight.actype==AIRBOSS.AircraftCarrier.C2A then
|
|
56014
56115
|
Speed=UTILS.KnotsToKmph(150)
|
|
56015
56116
|
elseif flight.actype==AIRBOSS.AircraftCarrier.F14A_AI or flight.actype==AIRBOSS.AircraftCarrier.F14A or flight.actype==AIRBOSS.AircraftCarrier.F14B then
|
|
56016
56117
|
Speed=UTILS.KnotsToKmph(175)
|
|
@@ -58467,7 +58568,14 @@ local vpp=UTILS.VecDot(vT,zc)
|
|
|
58467
58568
|
local vabs=UTILS.VecNorm(vT)
|
|
58468
58569
|
return-vpa,vpp,vabs
|
|
58469
58570
|
end
|
|
58470
|
-
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)
|
|
58471
58579
|
local function adjustDegreesForWindSpeed(windSpeed)
|
|
58472
58580
|
local degreesAdjustment=0
|
|
58473
58581
|
if windSpeed>0 and windSpeed<3 then
|
|
@@ -58494,9 +58602,10 @@ end
|
|
|
58494
58602
|
if intowind<0 then
|
|
58495
58603
|
intowind=intowind+360
|
|
58496
58604
|
end
|
|
58497
|
-
|
|
58605
|
+
local vtot=math.max(vdeck-UTILS.MpsToKnots(vwind),4)
|
|
58606
|
+
return intowind,vtot
|
|
58498
58607
|
end
|
|
58499
|
-
function AIRBOSS:
|
|
58608
|
+
function AIRBOSS:GetHeadingIntoWind_new(vdeck,magnetic,coord)
|
|
58500
58609
|
local Offset=self.carrierparam.rwyangle or 0
|
|
58501
58610
|
local windfrom,vwind=self:GetWind(18,nil,coord)
|
|
58502
58611
|
local Vmin=4
|
|
@@ -59830,6 +59939,8 @@ elseif actype==AIRBOSS.AircraftCarrier.AV8B then
|
|
|
59830
59939
|
nickname="Harrier"
|
|
59831
59940
|
elseif actype==AIRBOSS.AircraftCarrier.E2D then
|
|
59832
59941
|
nickname="Hawkeye"
|
|
59942
|
+
elseif actype==AIRBOSS.AircraftCarrier.C2A then
|
|
59943
|
+
nickname="Greyhound"
|
|
59833
59944
|
elseif actype==AIRBOSS.AircraftCarrier.F14A_AI or actype==AIRBOSS.AircraftCarrier.F14A or actype==AIRBOSS.AircraftCarrier.F14B then
|
|
59834
59945
|
nickname="Tomcat"
|
|
59835
59946
|
elseif actype==AIRBOSS.AircraftCarrier.FA18C or actype==AIRBOSS.AircraftCarrier.HORNET then
|
|
@@ -65223,8 +65334,10 @@ CTLD.UnitTypeCapabilities={
|
|
|
65223
65334
|
["SH-60B"]={type="SH-60B",crates=true,troops=true,cratelimit=2,trooplimit=20,length=16,cargoweightlimit=3500},
|
|
65224
65335
|
["AH-64D_BLK_II"]={type="AH-64D_BLK_II",crates=false,troops=true,cratelimit=0,trooplimit=2,length=17,cargoweightlimit=200},
|
|
65225
65336
|
["Bronco-OV-10A"]={type="Bronco-OV-10A",crates=false,troops=true,cratelimit=0,trooplimit=5,length=13,cargoweightlimit=1450},
|
|
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},
|
|
65226
65339
|
}
|
|
65227
|
-
CTLD.version="1.0.
|
|
65340
|
+
CTLD.version="1.0.54"
|
|
65228
65341
|
function CTLD:New(Coalition,Prefixes,Alias)
|
|
65229
65342
|
local self=BASE:Inherit(self,FSM:New())
|
|
65230
65343
|
BASE:T({Coalition,Prefixes,Alias})
|
|
@@ -66839,7 +66952,7 @@ self:T(self.lid.." _MoveGroupToZone")
|
|
|
66839
66952
|
local groupname=Group:GetName()or"none"
|
|
66840
66953
|
local groupcoord=Group:GetCoordinate()
|
|
66841
66954
|
local outcome,name,zone,distance=self:IsUnitInZone(Group,CTLD.CargoZoneType.MOVE)
|
|
66842
|
-
if(distance<=self.movetroopsdistance)and zone then
|
|
66955
|
+
if(distance<=self.movetroopsdistance)and outcome==true and zone~=nil then
|
|
66843
66956
|
local groupname=Group:GetName()
|
|
66844
66957
|
local zonecoord=zone:GetRandomCoordinate(20,125)
|
|
66845
66958
|
local coordinate=zonecoord:GetVec2()
|
|
@@ -67470,10 +67583,9 @@ zoneradius=2000
|
|
|
67470
67583
|
zonewidth=zoneradius
|
|
67471
67584
|
end
|
|
67472
67585
|
local distance=self:_GetDistance(zonecoord,unitcoord)
|
|
67473
|
-
|
|
67586
|
+
self:T("Distance Zone: "..distance)
|
|
67587
|
+
if(zone:IsVec2InZone(unitVec2)or Zonetype==CTLD.CargoZoneType.MOVE)and active==true and maxdist>distance then
|
|
67474
67588
|
outcome=true
|
|
67475
|
-
end
|
|
67476
|
-
if maxdist>distance then
|
|
67477
67589
|
maxdist=distance
|
|
67478
67590
|
zoneret=zone
|
|
67479
67591
|
zonenameret=zonename
|
|
@@ -68955,7 +69067,9 @@ CSAR.AircraftType["UH-60L"]=10
|
|
|
68955
69067
|
CSAR.AircraftType["AH-64D_BLK_II"]=2
|
|
68956
69068
|
CSAR.AircraftType["Bronco-OV-10A"]=2
|
|
68957
69069
|
CSAR.AircraftType["MH-60R"]=10
|
|
68958
|
-
CSAR.
|
|
69070
|
+
CSAR.AircraftType["OH-6A"]=2
|
|
69071
|
+
CSAR.AircraftType["OH-58D"]=2
|
|
69072
|
+
CSAR.version="1.0.24"
|
|
68959
69073
|
function CSAR:New(Coalition,Template,Alias)
|
|
68960
69074
|
local self=BASE:Inherit(self,FSM:New())
|
|
68961
69075
|
BASE:T({Coalition,Template,Alias})
|
|
@@ -69155,7 +69269,6 @@ local _spawnedGroup=SPAWN
|
|
|
69155
69269
|
:NewWithAlias(template,alias)
|
|
69156
69270
|
:InitCoalition(coalition)
|
|
69157
69271
|
:InitCountry(country)
|
|
69158
|
-
:InitAIOnOff(pilotcacontrol)
|
|
69159
69272
|
:InitDelayOff()
|
|
69160
69273
|
:SpawnFromCoordinate(point)
|
|
69161
69274
|
return _spawnedGroup,alias
|
|
@@ -69477,10 +69590,24 @@ local _leadername=_leader:GetName()
|
|
|
69477
69590
|
if not _nomessage then
|
|
69478
69591
|
if _freq~=0 then
|
|
69479
69592
|
local _text=string.format("%s requests SAR at %s, beacon at %.2f KHz",_groupName,_coordinatesText,_freqk)
|
|
69593
|
+
if self.coordtype~=2 then
|
|
69480
69594
|
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime)
|
|
69481
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
|
|
69482
69602
|
local _text=string.format("Pickup Zone at %s.",_coordinatesText)
|
|
69603
|
+
if self.coordtype~=2 then
|
|
69483
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
|
|
69484
69611
|
end
|
|
69485
69612
|
end
|
|
69486
69613
|
for _,_heliName in pairs(self.csarUnits)do
|
|
@@ -69985,23 +70112,26 @@ self:_DisplayMessageToSAR(_heli,string.format("No Pilots within %s",dtext),self.
|
|
|
69985
70112
|
end
|
|
69986
70113
|
return self
|
|
69987
70114
|
end
|
|
69988
|
-
function CSAR:_DisplayToAllSAR(_message,_side,_messagetime)
|
|
70115
|
+
function CSAR:_DisplayToAllSAR(_message,_side,_messagetime,ToSRS,ToScreen)
|
|
69989
70116
|
self:T(self.lid.." _DisplayToAllSAR")
|
|
69990
70117
|
local messagetime=_messagetime or self.messageTime
|
|
69991
|
-
|
|
70118
|
+
self:T({_message,ToSRS=ToSRS,ToScreen=ToScreen})
|
|
70119
|
+
if self.msrs and(ToSRS==true or ToSRS==nil)then
|
|
69992
70120
|
local voice=self.CSARVoice or MSRS.Voices.Google.Standard.en_GB_Standard_F
|
|
69993
70121
|
if self.msrs:GetProvider()==MSRS.Provider.WINDOWS then
|
|
69994
70122
|
voice=self.CSARVoiceMS or MSRS.Voices.Microsoft.Hedda
|
|
69995
70123
|
end
|
|
69996
|
-
self:
|
|
70124
|
+
self:F("Voice = "..voice)
|
|
69997
70125
|
self.SRSQueue:NewTransmission(_message,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,voice,volume,label,self.coordinate)
|
|
69998
70126
|
end
|
|
70127
|
+
if ToScreen==true or ToScreen==nil then
|
|
69999
70128
|
for _,_unitName in pairs(self.csarUnits)do
|
|
70000
70129
|
local _unit=self:_GetSARHeli(_unitName)
|
|
70001
70130
|
if _unit and not self.suppressmessages then
|
|
70002
70131
|
self:_DisplayMessageToSAR(_unit,_message,_messagetime)
|
|
70003
70132
|
end
|
|
70004
70133
|
end
|
|
70134
|
+
end
|
|
70005
70135
|
return self
|
|
70006
70136
|
end
|
|
70007
70137
|
function CSAR:_Reqsmoke(_unitName)
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|