@jtff/miztemplate-lib 3.5.5 → 3.5.6
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/Moose_.lua +249 -145
- package/package.json +1 -1
- package/resources/sounds/CTLD CSAR/beacon.ogg +0 -0
package/lua/lib/Moose_.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
env.info('*** MOOSE GITHUB Commit Hash ID: 2024-12-
|
|
1
|
+
env.info('*** MOOSE GITHUB Commit Hash ID: 2024-12-18T22:04:38+01:00-43ab4d5f386b782242c67aee74e198381ee9f16c ***')
|
|
2
2
|
if not MOOSE_DEVELOPMENT_FOLDER then
|
|
3
3
|
MOOSE_DEVELOPMENT_FOLDER='Scripts'
|
|
4
4
|
end
|
|
@@ -1103,6 +1103,7 @@ Falklands="Falklands",
|
|
|
1103
1103
|
Sinai="SinaiMap",
|
|
1104
1104
|
Kola="Kola",
|
|
1105
1105
|
Afghanistan="Afghanistan",
|
|
1106
|
+
Iraq="Iraq"
|
|
1106
1107
|
}
|
|
1107
1108
|
CALLSIGN={
|
|
1108
1109
|
Aircraft={
|
|
@@ -2175,6 +2176,8 @@ elseif map==DCSMAP.Kola then
|
|
|
2175
2176
|
declination=15
|
|
2176
2177
|
elseif map==DCSMAP.Afghanistan then
|
|
2177
2178
|
declination=3
|
|
2179
|
+
elseif map==DCSMAP.Iraq then
|
|
2180
|
+
declination=4.4
|
|
2178
2181
|
else
|
|
2179
2182
|
declination=0
|
|
2180
2183
|
end
|
|
@@ -5102,10 +5105,6 @@ BASE.__={}
|
|
|
5102
5105
|
BASE._={
|
|
5103
5106
|
Schedules={},
|
|
5104
5107
|
}
|
|
5105
|
-
FORMATION={
|
|
5106
|
-
Cone="Cone",
|
|
5107
|
-
Vee="Vee",
|
|
5108
|
-
}
|
|
5109
5108
|
function BASE:New()
|
|
5110
5109
|
local self=UTILS.DeepCopy(self)
|
|
5111
5110
|
_ClassID=_ClassID+1
|
|
@@ -7564,14 +7563,15 @@ end
|
|
|
7564
7563
|
end
|
|
7565
7564
|
elseif Event.TgtObjectCategory==Object.Category.SCENERY then
|
|
7566
7565
|
Event.TgtDCSUnit=Event.target
|
|
7567
|
-
Event.TgtDCSUnitName=Event.TgtDCSUnit
|
|
7568
|
-
if Event.TgtDCSUnitName
|
|
7566
|
+
Event.TgtDCSUnitName=Event.TgtDCSUnit.getName and Event.TgtDCSUnit.getName()or nil
|
|
7567
|
+
if Event.TgtDCSUnitName~=nil then
|
|
7569
7568
|
Event.TgtUnitName=Event.TgtDCSUnitName
|
|
7570
7569
|
Event.TgtUnit=SCENERY:Register(Event.TgtDCSUnitName,Event.target)
|
|
7571
7570
|
Event.TgtCategory=Event.TgtDCSUnit:getDesc().category
|
|
7572
7571
|
Event.TgtTypeName=Event.TgtDCSUnit:getTypeName()
|
|
7573
7572
|
end
|
|
7574
7573
|
end
|
|
7574
|
+
end
|
|
7575
7575
|
if Event.weapon and type(Event.weapon)=="table"and Event.weapon.isExist and Event.weapon:isExist()then
|
|
7576
7576
|
Event.Weapon=Event.weapon
|
|
7577
7577
|
Event.WeaponName=Event.weapon:isExist()and Event.weapon:getTypeName()or"Unknown Weapon"
|
|
@@ -11108,9 +11108,8 @@ end
|
|
|
11108
11108
|
function DATABASE:AddStatic(DCSStaticName)
|
|
11109
11109
|
if not self.STATICS[DCSStaticName]then
|
|
11110
11110
|
self.STATICS[DCSStaticName]=STATIC:Register(DCSStaticName)
|
|
11111
|
-
return self.STATICS[DCSStaticName]
|
|
11112
11111
|
end
|
|
11113
|
-
return
|
|
11112
|
+
return self.STATICS[DCSStaticName]
|
|
11114
11113
|
end
|
|
11115
11114
|
function DATABASE:DeleteStatic(DCSStaticName)
|
|
11116
11115
|
self.STATICS[DCSStaticName]=nil
|
|
@@ -11122,9 +11121,8 @@ end
|
|
|
11122
11121
|
function DATABASE:AddDynamicCargo(Name)
|
|
11123
11122
|
if not self.DYNAMICCARGO[Name]then
|
|
11124
11123
|
self.DYNAMICCARGO[Name]=DYNAMICCARGO:Register(Name)
|
|
11125
|
-
return self.DYNAMICCARGO[Name]
|
|
11126
11124
|
end
|
|
11127
|
-
return
|
|
11125
|
+
return self.DYNAMICCARGO[Name]
|
|
11128
11126
|
end
|
|
11129
11127
|
function DATABASE:FindDynamicCargo(DynamicCargoName)
|
|
11130
11128
|
local StaticFound=self.DYNAMICCARGO[DynamicCargoName]
|
|
@@ -16016,9 +16014,15 @@ end
|
|
|
16016
16014
|
function SET_OPSGROUP:_EventOnBirth(Event)
|
|
16017
16015
|
if Event.IniDCSUnit and Event.IniDCSGroup then
|
|
16018
16016
|
local DCSgroup=Event.IniDCSGroup
|
|
16017
|
+
local CountAliveActive=0
|
|
16018
|
+
for index,data in pairs(DCSgroup:getUnits())do
|
|
16019
|
+
if data:isExist()and data:isActive()then
|
|
16020
|
+
CountAliveActive=CountAliveActive+1
|
|
16021
|
+
end
|
|
16022
|
+
end
|
|
16019
16023
|
if DCSgroup:getInitialSize()==DCSgroup:getSize()then
|
|
16020
16024
|
local groupname,group=self:AddInDatabase(Event)
|
|
16021
|
-
if group and
|
|
16025
|
+
if group and CountAliveActive==DCSgroup:getInitialSize()then
|
|
16022
16026
|
if group and self:IsIncludeObject(group)then
|
|
16023
16027
|
self:Add(groupname,group)
|
|
16024
16028
|
end
|
|
@@ -21336,8 +21340,6 @@ Template.unitId=nil
|
|
|
21336
21340
|
end
|
|
21337
21341
|
self.SpawnIndex=self.SpawnIndex+1
|
|
21338
21342
|
Template.name=self.InitStaticName or string.format("%s#%05d",self.SpawnTemplatePrefix,self.SpawnIndex)
|
|
21339
|
-
local mystatic=_DATABASE:AddStatic(Template.name)
|
|
21340
|
-
self:T(Template)
|
|
21341
21343
|
local Static=nil
|
|
21342
21344
|
if self.InitFarp then
|
|
21343
21345
|
local TemplateGroup={}
|
|
@@ -21362,7 +21364,13 @@ else
|
|
|
21362
21364
|
self:T("Spawning Static")
|
|
21363
21365
|
self:T2({Template=Template})
|
|
21364
21366
|
Static=coalition.addStaticObject(CountryID,Template)
|
|
21367
|
+
if Static then
|
|
21368
|
+
self:T(string.format("Succesfully spawned static object \"%s\" ID=%d",Static:getName(),Static:getID()))
|
|
21369
|
+
else
|
|
21370
|
+
self:E(string.format("ERROR: DCS static object \"%s\" is nil!",tostring(Template.name)))
|
|
21371
|
+
end
|
|
21365
21372
|
end
|
|
21373
|
+
local mystatic=_DATABASE:AddStatic(Template.name)
|
|
21366
21374
|
if self.SpawnFunctionHook then
|
|
21367
21375
|
self:ScheduleOnce(0.3,self.SpawnFunctionHook,mystatic,unpack(self.SpawnFunctionArguments))
|
|
21368
21376
|
end
|
|
@@ -27328,12 +27336,23 @@ h=-math.rad(360-course)
|
|
|
27328
27336
|
end
|
|
27329
27337
|
return h
|
|
27330
27338
|
end
|
|
27339
|
+
local function TransFormRoute(Template,OldPos,NewPos)
|
|
27340
|
+
if Template.route and Template.route.points then
|
|
27341
|
+
for _,_point in ipairs(Template.route.points)do
|
|
27342
|
+
_point.x=_point.x-OldPos.x+NewPos.x
|
|
27343
|
+
_point.y=_point.y-OldPos.y+NewPos.y
|
|
27344
|
+
end
|
|
27345
|
+
end
|
|
27346
|
+
return Template
|
|
27347
|
+
end
|
|
27331
27348
|
if self:IsAlive()then
|
|
27349
|
+
local OldPos=self:GetVec2()
|
|
27332
27350
|
local Zone=self.InitRespawnZone
|
|
27333
27351
|
local Vec3=Zone and Zone:GetVec3()or self:GetVec3()
|
|
27334
27352
|
local From={x=Template.x,y=Template.y}
|
|
27335
27353
|
Template.x=Vec3.x
|
|
27336
27354
|
Template.y=Vec3.z
|
|
27355
|
+
local NewPos={x=Vec3.x,y=Vec3.z}
|
|
27337
27356
|
if Reset==true then
|
|
27338
27357
|
for UnitID,UnitData in pairs(self:GetUnits())do
|
|
27339
27358
|
local GroupUnit=UnitData
|
|
@@ -27365,6 +27384,7 @@ Template.units[UnitID].heading=_Heading(self.InitRespawnHeading and self.InitRes
|
|
|
27365
27384
|
Template.units[UnitID].psi=-Template.units[UnitID].heading
|
|
27366
27385
|
end
|
|
27367
27386
|
end
|
|
27387
|
+
Template=TransFormRoute(Template,OldPos,NewPos)
|
|
27368
27388
|
elseif Reset==false then
|
|
27369
27389
|
for UnitID,TemplateUnitData in pairs(Template.units)do
|
|
27370
27390
|
local GroupUnitVec3={x=TemplateUnitData.x,y=TemplateUnitData.alt,z=TemplateUnitData.y}
|
|
@@ -27387,6 +27407,7 @@ Template.units[UnitID].x=(Template.units[UnitID].x-From.x)+GroupUnitVec3.x
|
|
|
27387
27407
|
Template.units[UnitID].y=(Template.units[UnitID].y-From.y)+GroupUnitVec3.z
|
|
27388
27408
|
Template.units[UnitID].heading=self.InitRespawnHeading and self.InitRespawnHeading or TemplateUnitData.heading
|
|
27389
27409
|
end
|
|
27410
|
+
Template=TransFormRoute(Template,OldPos,NewPos)
|
|
27390
27411
|
else
|
|
27391
27412
|
local units=self:GetUnits()
|
|
27392
27413
|
for UnitID,Unit in pairs(Template.units)do
|
|
@@ -27420,10 +27441,14 @@ if self.InitRespawnModu then
|
|
|
27420
27441
|
Template.modulation=self.InitRespawnModu
|
|
27421
27442
|
end
|
|
27422
27443
|
self:Destroy(false)
|
|
27423
|
-
_DATABASE
|
|
27444
|
+
self:ScheduleOnce(0.1,_DATABASE.Spawn,_DATABASE,Template)
|
|
27424
27445
|
self:ResetEvents()
|
|
27425
27446
|
return self
|
|
27426
27447
|
end
|
|
27448
|
+
function GROUP:Teleport(Coordinate)
|
|
27449
|
+
self:InitZone(Coordinate)
|
|
27450
|
+
return self:Respawn(nil,false)
|
|
27451
|
+
end
|
|
27427
27452
|
function GROUP:RespawnAtCurrentAirbase(SpawnTemplate,Takeoff,Uncontrolled)
|
|
27428
27453
|
if self and self:IsAlive()then
|
|
27429
27454
|
local airbase=self:GetCoordinate():GetClosestAirbase()
|
|
@@ -29051,6 +29076,8 @@ local DCSStatic=StaticObject.getByName(self.StaticName)
|
|
|
29051
29076
|
if DCSStatic then
|
|
29052
29077
|
local Life0=DCSStatic:getLife()or 1
|
|
29053
29078
|
self.Life0=Life0
|
|
29079
|
+
else
|
|
29080
|
+
self:E(string.format("Static object %s does not exist!",tostring(self.StaticName)))
|
|
29054
29081
|
end
|
|
29055
29082
|
return self
|
|
29056
29083
|
end
|
|
@@ -29562,6 +29589,21 @@ AIRBASE.Afghanistan={
|
|
|
29562
29589
|
["Shindand_Heliport"]="Shindand Heliport",
|
|
29563
29590
|
["Tarinkot"]="Tarinkot",
|
|
29564
29591
|
}
|
|
29592
|
+
AIRBASE.Iraq={
|
|
29593
|
+
["Baghdad_International_Airport"]="Baghdad International Airport",
|
|
29594
|
+
["Sulaimaniyah_International_Airport"]="Sulaimaniyah International Airport",
|
|
29595
|
+
["Al_Sahra_Airport"]="Al-Sahra Airport",
|
|
29596
|
+
["Erbil_International_Airport"]="Erbil International Airport",
|
|
29597
|
+
["Al_Taji_Airport"]="Al-Taji Airport",
|
|
29598
|
+
["Al_Asad_Airbase"]="Al-Asad Airbase",
|
|
29599
|
+
["Al_Salam_Airbase"]="Al-Salam Airbase",
|
|
29600
|
+
["Balad_Airbase"]="Balad Airbase",
|
|
29601
|
+
["Kirkuk_International_Airport"]="Kirkuk International Airport",
|
|
29602
|
+
["Bashur_Airport"]="Bashur Airport",
|
|
29603
|
+
["Al_Taquddum_Airport"]="Al-Taquddum Airport",
|
|
29604
|
+
["Qayyarah_Airfield_West"]="Qayyarah Airfield West",
|
|
29605
|
+
["K1_Base"]="K1 Base",
|
|
29606
|
+
}
|
|
29565
29607
|
AIRBASE.TerminalType={
|
|
29566
29608
|
Runway=16,
|
|
29567
29609
|
HelicopterOnly=40,
|
|
@@ -29586,7 +29628,7 @@ self.descriptors=self:GetDesc()
|
|
|
29586
29628
|
self.category=self.descriptors and self.descriptors.category or Airbase.Category.AIRDROME
|
|
29587
29629
|
if self.category==Airbase.Category.AIRDROME then
|
|
29588
29630
|
self.isAirdrome=true
|
|
29589
|
-
elseif self.category==Airbase.Category.HELIPAD then
|
|
29631
|
+
elseif self.category==Airbase.Category.HELIPAD or self.descriptors.typeName=="FARP_SINGLE_01"then
|
|
29590
29632
|
self.isHelipad=true
|
|
29591
29633
|
elseif self.category==Airbase.Category.SHIP then
|
|
29592
29634
|
self.isShip=true
|
|
@@ -30990,7 +31032,8 @@ local object=self.weapon:getTarget()
|
|
|
30990
31032
|
if object then
|
|
30991
31033
|
local category=Object.getCategory(object)
|
|
30992
31034
|
local name=object:getName()
|
|
30993
|
-
|
|
31035
|
+
if name then
|
|
31036
|
+
self:T(self.lid..string.format("Got Target Object %s, category=%d",name,category))
|
|
30994
31037
|
if category==Object.Category.UNIT then
|
|
30995
31038
|
target=UNIT:FindByName(name)
|
|
30996
31039
|
elseif category==Object.Category.STATIC then
|
|
@@ -31002,6 +31045,7 @@ self:E(self.lid..string.format("ERROR: Object category=%d is not implemented yet
|
|
|
31002
31045
|
end
|
|
31003
31046
|
end
|
|
31004
31047
|
end
|
|
31048
|
+
end
|
|
31005
31049
|
return target
|
|
31006
31050
|
end
|
|
31007
31051
|
function WEAPON:GetTargetDistance(ConversionFunction)
|
|
@@ -43803,7 +43847,7 @@ local ca2g=coord:ToStringA2G(_unit,_settings)
|
|
|
43803
43847
|
_text=_text..string.format("\n- %s:\n%s @ %s",bombtarget.name or"unknown",ca2g,eltxt)
|
|
43804
43848
|
end
|
|
43805
43849
|
end
|
|
43806
|
-
self:_DisplayMessageToGroup(_unit,_text,
|
|
43850
|
+
self:_DisplayMessageToGroup(_unit,_text,150,true,true,_multiplayer)
|
|
43807
43851
|
end
|
|
43808
43852
|
end
|
|
43809
43853
|
function RANGE:_DisplayStrafePits(_unitname)
|
|
@@ -44063,10 +44107,10 @@ end
|
|
|
44063
44107
|
_rootMenu=RANGE.MenuF10[_gid]or MENU_GROUP:New(group,"On the Range")
|
|
44064
44108
|
end
|
|
44065
44109
|
local _rangePath=MENU_GROUP:New(group,self.rangename,_rootMenu)
|
|
44066
|
-
local
|
|
44110
|
+
local _infoPath=MENU_GROUP:New(group,"Range Info",_rangePath)
|
|
44067
44111
|
local _markPath=MENU_GROUP:New(group,"Mark Targets",_rangePath)
|
|
44112
|
+
local _statsPath=MENU_GROUP:New(group,"Statistics",_rangePath)
|
|
44068
44113
|
local _settingsPath=MENU_GROUP:New(group,"My Settings",_rangePath)
|
|
44069
|
-
local _infoPath=MENU_GROUP:New(group,"Range Info",_rangePath)
|
|
44070
44114
|
local _mysmokePath=MENU_GROUP:New(group,"Smoke Color",_settingsPath)
|
|
44071
44115
|
local _myflarePath=MENU_GROUP:New(group,"Flare Color",_settingsPath)
|
|
44072
44116
|
local _MoMap=MENU_GROUP_COMMAND:New(group,"Mark On Map",_markPath,self._MarkTargetsOnMap,self,_unitName)
|
|
@@ -51866,7 +51910,6 @@ end
|
|
|
51866
51910
|
end
|
|
51867
51911
|
end
|
|
51868
51912
|
function WAREHOUSE:_DeleteQueueItem(qitem,queue)
|
|
51869
|
-
self:F({qitem=qitem,queue=queue})
|
|
51870
51913
|
for i=1,#queue do
|
|
51871
51914
|
local _item=queue[i]
|
|
51872
51915
|
if _item.uid==qitem.uid then
|
|
@@ -53176,24 +53219,47 @@ MANTIS.SamDataSMA={
|
|
|
53176
53219
|
["Lvkv9040M SMA"]={Range=4,Blindspot=0,Height=2.5,Type="Short",Radar="LvKv9040"},
|
|
53177
53220
|
}
|
|
53178
53221
|
MANTIS.SamDataCH={
|
|
53179
|
-
["2S38
|
|
53180
|
-
["PantsirS1
|
|
53181
|
-
["PantsirS2
|
|
53182
|
-
["PGL-625
|
|
53183
|
-
["HQ-17A
|
|
53184
|
-
["M903PAC2
|
|
53185
|
-
["M903PAC3
|
|
53186
|
-
["TorM2
|
|
53187
|
-
["TorM2K
|
|
53188
|
-
["TorM2M
|
|
53189
|
-
["NASAMS3-AMRAAMER
|
|
53190
|
-
["NASAMS3-AIM9X2
|
|
53191
|
-
["C-RAM
|
|
53192
|
-
["PGZ-09
|
|
53193
|
-
["S350-9M100
|
|
53194
|
-
["S350-9M96D
|
|
53195
|
-
["LAV-AD
|
|
53196
|
-
["HQ-22
|
|
53222
|
+
["2S38 CHM"]={Range=8,Blindspot=0.5,Height=6,Type="Short",Radar="2S38"},
|
|
53223
|
+
["PantsirS1 CHM"]={Range=20,Blindspot=1.2,Height=15,Type="Short",Radar="PantsirS1"},
|
|
53224
|
+
["PantsirS2 CHM"]={Range=30,Blindspot=1.2,Height=18,Type="Medium",Radar="PantsirS2"},
|
|
53225
|
+
["PGL-625 CHM"]={Range=10,Blindspot=0.5,Height=5,Type="Short",Radar="PGL_625"},
|
|
53226
|
+
["HQ-17A CHM"]={Range=20,Blindspot=1.5,Height=10,Type="Short",Radar="HQ17A"},
|
|
53227
|
+
["M903PAC2 CHM"]={Range=160,Blindspot=3,Height=24.5,Type="Long",Radar="MIM104_M903_PAC2"},
|
|
53228
|
+
["M903PAC3 CHM"]={Range=120,Blindspot=1,Height=40,Type="Long",Radar="MIM104_M903_PAC3"},
|
|
53229
|
+
["TorM2 CHM"]={Range=12,Blindspot=1,Height=10,Type="Short",Radar="TorM2"},
|
|
53230
|
+
["TorM2K CHM"]={Range=12,Blindspot=1,Height=10,Type="Short",Radar="TorM2K"},
|
|
53231
|
+
["TorM2M CHM"]={Range=16,Blindspot=1,Height=10,Type="Short",Radar="TorM2M"},
|
|
53232
|
+
["NASAMS3-AMRAAMER CHM"]={Range=50,Blindspot=2,Height=35.7,Type="Medium",Radar="CH_NASAMS3_LN_AMRAAM_ER"},
|
|
53233
|
+
["NASAMS3-AIM9X2 CHM"]={Range=20,Blindspot=0.2,Height=18,Type="Short",Radar="CH_NASAMS3_LN_AIM9X2"},
|
|
53234
|
+
["C-RAM CHM"]={Range=2,Blindspot=0,Height=2,Type="Short",Radar="CH_Centurion_C_RAM"},
|
|
53235
|
+
["PGZ-09 CHM"]={Range=4,Blindspot=0,Height=3,Type="Short",Radar="CH_PGZ09"},
|
|
53236
|
+
["S350-9M100 CHM"]={Range=15,Blindspot=1.5,Height=8,Type="Short",Radar="CH_S350_50P6_9M100"},
|
|
53237
|
+
["S350-9M96D CHM"]={Range=150,Blindspot=2.5,Height=30,Type="Long",Radar="CH_S350_50P6_9M96D"},
|
|
53238
|
+
["LAV-AD CHM"]={Range=8,Blindspot=0.2,Height=4.8,Type="Short",Radar="CH_LAVAD"},
|
|
53239
|
+
["HQ-22 CHM"]={Range=170,Blindspot=5,Height=27,Type="Long",Radar="CH_HQ22_LN"},
|
|
53240
|
+
["PGZ-95 CHM"]={Range=2,Blindspot=0,Height=2,Type="Short",Radar="CH_PGZ95"},
|
|
53241
|
+
["LD-3000 CHM"]={Range=3,Blindspot=0,Height=3,Type="Short",Radar="CH_LD3000_stationary"},
|
|
53242
|
+
["LD-3000M CHM"]={Range=3,Blindspot=0,Height=3,Type="Short",Radar="CH_LD3000"},
|
|
53243
|
+
["FlaRakRad CHM"]={Range=8,Blindspot=1.5,Height=6,Type="Short",Radar="HQ17A"},
|
|
53244
|
+
["IRIS-T SLM CHM"]={Range=40,Blindspot=0.5,Height=20,Type="Medium",Radar="CH_IRIST_SLM"},
|
|
53245
|
+
["M903PAC2KAT1 CHM"]={Range=160,Blindspot=3,Height=24.5,Type="Long",Radar="CH_MIM104_M903_PAC2_KAT1"},
|
|
53246
|
+
["Skynex CHM"]={Range=3.5,Blindspot=0,Height=3.5,Type="Short",Radar="CH_SkynexHX"},
|
|
53247
|
+
["Skyshield CHM"]={Range=3.5,Blindspot=0,Height=3.5,Type="Short",Radar="CH_Skyshield_Gun"},
|
|
53248
|
+
["WieselOzelot CHM"]={Range=8,Blindspot=0.2,Height=4.8,Type="Short",Radar="CH_Wiesel2Ozelot"},
|
|
53249
|
+
["BukM3-9M317M CHM"]={Range=70,Blindspot=0.25,Height=35,Type="Medium",Radar="CH_BukM3_9A317M"},
|
|
53250
|
+
["BukM3-9M317MA CHM"]={Range=70,Blindspot=0.25,Height=35,Type="Medium",Radar="CH_BukM3_9A317MA"},
|
|
53251
|
+
["SkySabre CHM"]={Range=30,Blindspot=0.5,Height=10,Type="Medium",Radar="CH_SkySabreLN"},
|
|
53252
|
+
["Stormer CHM"]={Range=7.5,Blindspot=0.3,Height=7,Type="Short",Radar="CH_StormerHVM"},
|
|
53253
|
+
["THAAD CHM"]={Range=200,Blindspot=40,Height=150,Type="Long",Radar="CH_THAAD_M1120"},
|
|
53254
|
+
["USInfantryFIM92K CHM"]={Range=8,Blindspot=0.2,Height=4.8,Type="Short",Radar="CH_USInfantry_FIM92"},
|
|
53255
|
+
["RBS98M CHM"]={Range=20,Blindspot=0,Height=8,Type="Short",Radar="RBS-98"},
|
|
53256
|
+
["RBS70 CHM"]={Range=8,Blindspot=0,Height=5.5,Type="Short",Radar="RBS-70"},
|
|
53257
|
+
["RBS90 CHM"]={Range=8,Blindspot=0,Height=5.5,Type="Short",Radar="RBS-90"},
|
|
53258
|
+
["RBS103A CHM"]={Range=150,Blindspot=3,Height=24.5,Type="Long",Radar="LvS-103_Lavett103_Rb103A"},
|
|
53259
|
+
["RBS103B CHM"]={Range=35,Blindspot=0,Height=36,Type="Medium",Radar="LvS-103_Lavett103_Rb103B"},
|
|
53260
|
+
["RBS103AM CHM"]={Range=150,Blindspot=3,Height=24.5,Type="Long",Radar="LvS-103_Lavett103_HX_Rb103A"},
|
|
53261
|
+
["RBS103BM CHM"]={Range=35,Blindspot=0,Height=36,Type="Medium",Radar="LvS-103_Lavett103_HX_Rb103B"},
|
|
53262
|
+
["Lvkv9040M CHM"]={Range=4,Blindspot=0,Height=2.5,Type="Short",Radar="LvKv9040"},
|
|
53197
53263
|
}
|
|
53198
53264
|
do
|
|
53199
53265
|
function MANTIS:New(name,samprefix,ewrprefix,hq,coalition,dynamic,awacs,EmOnOff,Padding,Zones)
|
|
@@ -53299,7 +53365,7 @@ end
|
|
|
53299
53365
|
if self.HQ_Template_CC then
|
|
53300
53366
|
self.HQ_CC=GROUP:FindByName(self.HQ_Template_CC)
|
|
53301
53367
|
end
|
|
53302
|
-
self.version="0.8.
|
|
53368
|
+
self.version="0.8.20"
|
|
53303
53369
|
self:I(string.format("***** Starting MANTIS Version %s *****",self.version))
|
|
53304
53370
|
self:SetStartState("Stopped")
|
|
53305
53371
|
self:AddTransition("Stopped","Start","Running")
|
|
@@ -53792,6 +53858,9 @@ range,height,type=self:_GetSAMDataFromUnits(grpname,HDSmod,SMAMod,CHMod)
|
|
|
53792
53858
|
elseif not found then
|
|
53793
53859
|
self:E(self.lid..string.format("*****Could not match radar data for %s! Will default to midrange values!",grpname))
|
|
53794
53860
|
end
|
|
53861
|
+
if string.find(grpname,"SHORAD",1,true)then
|
|
53862
|
+
type=MANTIS.SamType.SHORT
|
|
53863
|
+
end
|
|
53795
53864
|
return range,height,type,blind
|
|
53796
53865
|
end
|
|
53797
53866
|
function MANTIS:SetSAMStartState()
|
|
@@ -53909,6 +53978,10 @@ end
|
|
|
53909
53978
|
function MANTIS:_CheckLoop(samset,detset,dlink,limit)
|
|
53910
53979
|
self:T(self.lid.."CheckLoop "..#detset.." Coordinates")
|
|
53911
53980
|
local switchedon=0
|
|
53981
|
+
local statusreport=REPORT:New("\nMANTIS Status")
|
|
53982
|
+
local instatusred=0
|
|
53983
|
+
local instatusgreen=0
|
|
53984
|
+
local SEADactive=0
|
|
53912
53985
|
for _,_data in pairs(samset)do
|
|
53913
53986
|
local samcoordinate=_data[2]
|
|
53914
53987
|
local name=_data[1]
|
|
@@ -53944,7 +54017,6 @@ self:__ShoradActivated(1,name,radius,ontime)
|
|
|
53944
54017
|
end
|
|
53945
54018
|
if(self.debug or self.verbose)and switch then
|
|
53946
54019
|
local text=string.format("SAM %s in alarm state RED!",name)
|
|
53947
|
-
local m=MESSAGE:New(text,10,"MANTIS"):ToAllIf(self.debug)
|
|
53948
54020
|
if self.verbose then self:I(self.lid..text)end
|
|
53949
54021
|
end
|
|
53950
54022
|
end
|
|
@@ -53961,12 +54033,25 @@ self.SamStateTracker[name]="GREEN"
|
|
|
53961
54033
|
end
|
|
53962
54034
|
if self.debug or self.verbose then
|
|
53963
54035
|
local text=string.format("SAM %s in alarm state GREEN!",name)
|
|
53964
|
-
local m=MESSAGE:New(text,10,"MANTIS"):ToAllIf(self.debug)
|
|
53965
54036
|
if self.verbose then self:I(self.lid..text)end
|
|
53966
54037
|
end
|
|
53967
54038
|
end
|
|
53968
54039
|
end
|
|
53969
54040
|
end
|
|
54041
|
+
if self.debug then
|
|
54042
|
+
for _,_status in pairs(self.SamStateTracker)do
|
|
54043
|
+
if _status=="GREEN"then
|
|
54044
|
+
instatusgreen=instatusgreen+1
|
|
54045
|
+
elseif _status=="RED"then
|
|
54046
|
+
instatusred=instatusred+1
|
|
54047
|
+
end
|
|
54048
|
+
end
|
|
54049
|
+
statusreport:Add("+-----------------------------+")
|
|
54050
|
+
statusreport:Add(string.format("+ SAM in RED State: %2d",instatusred))
|
|
54051
|
+
statusreport:Add(string.format("+ SAM in GREEN State: %2d",instatusgreen))
|
|
54052
|
+
statusreport:Add("+-----------------------------+")
|
|
54053
|
+
MESSAGE:New(statusreport:Text(),10,nil,true):ToAll():ToLog()
|
|
54054
|
+
end
|
|
53970
54055
|
return self
|
|
53971
54056
|
end
|
|
53972
54057
|
function MANTIS:_Check(detection,dlink)
|
|
@@ -54041,7 +54126,7 @@ else
|
|
|
54041
54126
|
self.Detection=self:StartIntelDetection()
|
|
54042
54127
|
end
|
|
54043
54128
|
if self.autoshorad then
|
|
54044
|
-
self.Shorad=SHORAD:New(self.name.."-SHORAD",
|
|
54129
|
+
self.Shorad=SHORAD:New(self.name.."-SHORAD","SHORAD",self.SAM_Group,self.ShoradActDistance,self.ShoradTime,self.coalition,self.UseEmOnOff)
|
|
54045
54130
|
self.Shorad:SetDefenseLimits(80,95)
|
|
54046
54131
|
self.ShoradLink=true
|
|
54047
54132
|
self.Shorad.Groupset=self.ShoradGroupSet
|
|
@@ -64824,6 +64909,9 @@ Syria=5,
|
|
|
64824
64909
|
MarianaIslands=2,
|
|
64825
64910
|
Falklands=12,
|
|
64826
64911
|
SinaiMap=5,
|
|
64912
|
+
Kola=15,
|
|
64913
|
+
Afghanistan=3,
|
|
64914
|
+
Iraq=4.4
|
|
64827
64915
|
}
|
|
64828
64916
|
ATIS.ICAOPhraseology={
|
|
64829
64917
|
Caucasus=true,
|
|
@@ -64835,85 +64923,88 @@ Syria=true,
|
|
|
64835
64923
|
MarianaIslands=true,
|
|
64836
64924
|
Falklands=true,
|
|
64837
64925
|
SinaiMap=true,
|
|
64926
|
+
Kola=true,
|
|
64927
|
+
Afghanistan=true,
|
|
64928
|
+
Iraq=true,
|
|
64838
64929
|
}
|
|
64839
64930
|
ATIS.Sound={
|
|
64840
|
-
ActiveRunway={filename="ActiveRunway.ogg",duration=0.
|
|
64841
|
-
ActiveRunwayDeparture={filename="ActiveRunwayDeparture.ogg",duration=
|
|
64842
|
-
ActiveRunwayArrival={filename="ActiveRunwayArrival.ogg",duration=
|
|
64843
|
-
AdviceOnInitial={filename="AdviceOnInitial.ogg",duration=
|
|
64844
|
-
Airport={filename="Airport.ogg",duration=0.
|
|
64845
|
-
Altimeter={filename="Altimeter.ogg",duration=0.
|
|
64846
|
-
At={filename="At.ogg",duration=0.
|
|
64847
|
-
CloudBase={filename="CloudBase.ogg",duration=0.
|
|
64848
|
-
CloudCeiling={filename="CloudCeiling.ogg",duration=0.
|
|
64849
|
-
CloudsBroken={filename="CloudsBroken.ogg",duration=
|
|
64850
|
-
CloudsFew={filename="CloudsFew.ogg",duration=0.
|
|
64851
|
-
CloudsNo={filename="CloudsNo.ogg",duration=
|
|
64852
|
-
CloudsNotAvailable={filename="CloudsNotAvailable.ogg",duration=2.
|
|
64853
|
-
CloudsOvercast={filename="CloudsOvercast.ogg",duration=0.
|
|
64854
|
-
CloudsScattered={filename="CloudsScattered.ogg",duration=
|
|
64855
|
-
Decimal={filename="Decimal.ogg",duration=0.
|
|
64856
|
-
DegreesCelsius={filename="DegreesCelsius.ogg",duration=1.
|
|
64857
|
-
DegreesFahrenheit={filename="DegreesFahrenheit.ogg",duration=1.
|
|
64858
|
-
DewPoint={filename="DewPoint.ogg",duration=0.
|
|
64859
|
-
Dust={filename="Dust.ogg",duration=0.
|
|
64860
|
-
Elevation={filename="Elevation.ogg",duration=0.
|
|
64861
|
-
EndOfInformation={filename="EndOfInformation.ogg",duration=1.
|
|
64862
|
-
Feet={filename="Feet.ogg",duration=0.
|
|
64863
|
-
Fog={filename="Fog.ogg",duration=0.
|
|
64864
|
-
Gusting={filename="Gusting.ogg",duration=0.
|
|
64865
|
-
HectoPascal={filename="HectoPascal.ogg",duration=
|
|
64866
|
-
Hundred={filename="Hundred.ogg",duration=0.
|
|
64867
|
-
InchesOfMercury={filename="InchesOfMercury.ogg",duration=1.16},
|
|
64868
|
-
Information={filename="Information.ogg",duration=0.85},
|
|
64869
|
-
Kilometers={filename="Kilometers.ogg",duration=0.78},
|
|
64870
|
-
Knots={filename="Knots.ogg",duration=0.59},
|
|
64871
|
-
Left={filename="Left.ogg",duration=0.54},
|
|
64872
|
-
MegaHertz={filename="MegaHertz.ogg",duration=0.87},
|
|
64873
|
-
Meters={filename="Meters.ogg",duration=0.59},
|
|
64874
|
-
MetersPerSecond={filename="MetersPerSecond.ogg",duration=1.14},
|
|
64875
|
-
Miles={filename="Miles.ogg",duration=0.60},
|
|
64876
|
-
MillimetersOfMercury={filename="MillimetersOfMercury.ogg",duration=1.53},
|
|
64877
|
-
Minus={filename="Minus.ogg",duration=0.64},
|
|
64878
|
-
N0={filename="N-0.ogg",duration=0.55},
|
|
64879
|
-
N1={filename="N-1.ogg",duration=0.41},
|
|
64880
|
-
N2={filename="N-2.ogg",duration=0.37},
|
|
64881
|
-
N3={filename="N-3.ogg",duration=0.41},
|
|
64882
|
-
N4={filename="N-4.ogg",duration=0.37},
|
|
64883
|
-
N5={filename="N-5.ogg",duration=0.43},
|
|
64884
|
-
N6={filename="N-6.ogg",duration=0.55},
|
|
64885
|
-
N7={filename="N-7.ogg",duration=0.43},
|
|
64886
|
-
N8={filename="N-8.ogg",duration=0.38},
|
|
64887
|
-
N9={filename="N-9.ogg",duration=0.55},
|
|
64888
|
-
NauticalMiles={filename="NauticalMiles.ogg",duration=1.04},
|
|
64889
|
-
None={filename="None.ogg",duration=0.43},
|
|
64890
|
-
QFE={filename="QFE.ogg",duration=0.63},
|
|
64891
|
-
QNH={filename="QNH.ogg",duration=0.71},
|
|
64892
|
-
Rain={filename="Rain.ogg",duration=0.41},
|
|
64893
|
-
Right={filename="Right.ogg",duration=0.44},
|
|
64894
|
-
Snow={filename="Snow.ogg",duration=0.48},
|
|
64895
|
-
SnowStorm={filename="SnowStorm.ogg",duration=0.82},
|
|
64896
|
-
StatuteMiles={filename="StatuteMiles.ogg",duration=1.15},
|
|
64897
|
-
SunriseAt={filename="SunriseAt.ogg",duration=0.92},
|
|
64898
|
-
SunsetAt={filename="SunsetAt.ogg",duration=0.95},
|
|
64899
|
-
Temperature={filename="Temperature.ogg",duration=0.64},
|
|
64900
|
-
Thousand={filename="Thousand.ogg",duration=0.55},
|
|
64901
|
-
ThunderStorm={filename="ThunderStorm.ogg",duration=0.81},
|
|
64902
|
-
TimeLocal={filename="TimeLocal.ogg",duration=0.90},
|
|
64903
|
-
TimeZulu={filename="TimeZulu.ogg",duration=0.86},
|
|
64904
|
-
TowerFrequency={filename="TowerFrequency.ogg",duration=1.19},
|
|
64905
|
-
Visibilty={filename="Visibility.ogg",duration=0.79},
|
|
64906
|
-
WeatherPhenomena={filename="WeatherPhenomena.ogg",duration=1.07},
|
|
64907
|
-
WindFrom={filename="WindFrom.ogg",duration=0.60},
|
|
64931
|
+
ActiveRunway={filename="ActiveRunway.ogg",duration=0.85},
|
|
64932
|
+
ActiveRunwayDeparture={filename="ActiveRunwayDeparture.ogg",duration=1.50},
|
|
64933
|
+
ActiveRunwayArrival={filename="ActiveRunwayArrival.ogg",duration=1.38},
|
|
64934
|
+
AdviceOnInitial={filename="AdviceOnInitial.ogg",duration=2.98},
|
|
64935
|
+
Airport={filename="Airport.ogg",duration=0.55},
|
|
64936
|
+
Altimeter={filename="Altimeter.ogg",duration=0.91},
|
|
64937
|
+
At={filename="At.ogg",duration=0.32},
|
|
64938
|
+
CloudBase={filename="CloudBase.ogg",duration=0.69},
|
|
64939
|
+
CloudCeiling={filename="CloudCeiling.ogg",duration=0.53},
|
|
64940
|
+
CloudsBroken={filename="CloudsBroken.ogg",duration=0.81},
|
|
64941
|
+
CloudsFew={filename="CloudsFew.ogg",duration=0.74},
|
|
64942
|
+
CloudsNo={filename="CloudsNo.ogg",duration=0.69},
|
|
64943
|
+
CloudsNotAvailable={filename="CloudsNotAvailable.ogg",duration=2.64},
|
|
64944
|
+
CloudsOvercast={filename="CloudsOvercast.ogg",duration=0.82},
|
|
64945
|
+
CloudsScattered={filename="CloudsScattered.ogg",duration=0.89},
|
|
64946
|
+
Decimal={filename="Decimal.ogg",duration=0.71},
|
|
64947
|
+
DegreesCelsius={filename="DegreesCelsius.ogg",duration=1.08},
|
|
64948
|
+
DegreesFahrenheit={filename="DegreesFahrenheit.ogg",duration=1.07},
|
|
64949
|
+
DewPoint={filename="DewPoint.ogg",duration=0.59},
|
|
64950
|
+
Dust={filename="Dust.ogg",duration=0.37},
|
|
64951
|
+
Elevation={filename="Elevation.ogg",duration=0.92},
|
|
64952
|
+
EndOfInformation={filename="EndOfInformation.ogg",duration=1.24},
|
|
64953
|
+
Feet={filename="Feet.ogg",duration=0.34},
|
|
64954
|
+
Fog={filename="Fog.ogg",duration=0.41},
|
|
64955
|
+
Gusting={filename="Gusting.ogg",duration=0.58},
|
|
64956
|
+
HectoPascal={filename="HectoPascal.ogg",duration=0.92},
|
|
64957
|
+
Hundred={filename="Hundred.ogg",duration=0.53},
|
|
64908
64958
|
ILSFrequency={filename="ILSFrequency.ogg",duration=1.30},
|
|
64909
|
-
|
|
64910
|
-
|
|
64911
|
-
|
|
64912
|
-
|
|
64913
|
-
|
|
64914
|
-
|
|
64915
|
-
|
|
64916
|
-
|
|
64959
|
+
InchesOfMercury={filename="InchesOfMercury.ogg",duration=1.26},
|
|
64960
|
+
Information={filename="Information.ogg",duration=0.99},
|
|
64961
|
+
InnerNDBFrequency={filename="InnerNDBFrequency.ogg",duration=1.69},
|
|
64962
|
+
Kilometers={filename="Kilometers.ogg",duration=0.93},
|
|
64963
|
+
Knots={filename="Knots.ogg",duration=0.46},
|
|
64964
|
+
Left={filename="Left.ogg",duration=0.41},
|
|
64965
|
+
MegaHertz={filename="MegaHertz.ogg",duration=0.83},
|
|
64966
|
+
Meters={filename="Meters.ogg",duration=0.55},
|
|
64967
|
+
MetersPerSecond={filename="MetersPerSecond.ogg",duration=1.03},
|
|
64968
|
+
Miles={filename="Miles.ogg",duration=0.44},
|
|
64969
|
+
MillimetersOfMercury={filename="MillimetersOfMercury.ogg",duration=1.59},
|
|
64970
|
+
Minus={filename="Minus.ogg",duration=0.55},
|
|
64971
|
+
N0={filename="N-0.ogg",duration=0.52},
|
|
64972
|
+
N1={filename="N-1.ogg",duration=0.35},
|
|
64973
|
+
N2={filename="N-2.ogg",duration=0.41},
|
|
64974
|
+
N3={filename="N-3.ogg",duration=0.34},
|
|
64975
|
+
N4={filename="N-4.ogg",duration=0.37},
|
|
64976
|
+
N5={filename="N-5.ogg",duration=0.40},
|
|
64977
|
+
N6={filename="N-6.ogg",duration=0.46},
|
|
64978
|
+
N7={filename="N-7.ogg",duration=0.52},
|
|
64979
|
+
N8={filename="N-8.ogg",duration=0.36},
|
|
64980
|
+
N9={filename="N-9.ogg",duration=0.51},
|
|
64981
|
+
NauticalMiles={filename="NauticalMiles.ogg",duration=0.93},
|
|
64982
|
+
None={filename="None.ogg",duration=0.33},
|
|
64983
|
+
OuterNDBFrequency={filename="OuterNDBFrequency.ogg",duration=1.70},
|
|
64984
|
+
PRMGChannel={filename="PRMGChannel.ogg",duration=1.27},
|
|
64985
|
+
QFE={filename="QFE.ogg",duration=0.90},
|
|
64986
|
+
QNH={filename="QNH.ogg",duration=0.94},
|
|
64987
|
+
Rain={filename="Rain.ogg",duration=0.35},
|
|
64988
|
+
Right={filename="Right.ogg",duration=0.31},
|
|
64989
|
+
RSBNChannel={filename="RSBNChannel.ogg",duration=1.26},
|
|
64990
|
+
RunwayLength={filename="RunwayLength.ogg",duration=0.81},
|
|
64991
|
+
Snow={filename="Snow.ogg",duration=0.40},
|
|
64992
|
+
SnowStorm={filename="SnowStorm.ogg",duration=0.73},
|
|
64993
|
+
StatuteMiles={filename="StatuteMiles.ogg",duration=0.90},
|
|
64994
|
+
SunriseAt={filename="SunriseAt.ogg",duration=0.82},
|
|
64995
|
+
SunsetAt={filename="SunsetAt.ogg",duration=0.87},
|
|
64996
|
+
TACANChannel={filename="TACANChannel.ogg",duration=0.81},
|
|
64997
|
+
Temperature={filename="Temperature.ogg",duration=0.70},
|
|
64998
|
+
Thousand={filename="Thousand.ogg",duration=0.58},
|
|
64999
|
+
ThunderStorm={filename="ThunderStorm.ogg",duration=0.79},
|
|
65000
|
+
TimeLocal={filename="TimeLocal.ogg",duration=0.83},
|
|
65001
|
+
TimeZulu={filename="TimeZulu.ogg",duration=0.83},
|
|
65002
|
+
TowerFrequency={filename="TowerFrequency.ogg",duration=1.05},
|
|
65003
|
+
Visibilty={filename="Visibility.ogg",duration=1.16},
|
|
65004
|
+
VORFrequency={filename="VORFrequency.ogg",duration=1.28},
|
|
65005
|
+
WeatherPhenomena={filename="WeatherPhenomena.ogg",duration=1.09},
|
|
65006
|
+
WindFrom={filename="WindFrom.ogg",duration=0.63},
|
|
65007
|
+
Zulu={filename="Zulu.ogg",duration=0.51},
|
|
64917
65008
|
}
|
|
64918
65009
|
ATIS.Messages={
|
|
64919
65010
|
EN=
|
|
@@ -65158,7 +65249,7 @@ DELIMITER="Décimal",
|
|
|
65158
65249
|
}
|
|
65159
65250
|
ATIS.locale="en"
|
|
65160
65251
|
_ATIS={}
|
|
65161
|
-
ATIS.version="1.0.
|
|
65252
|
+
ATIS.version="1.0.1"
|
|
65162
65253
|
function ATIS:New(AirbaseName,Frequency,Modulation)
|
|
65163
65254
|
local self=BASE:Inherit(self,FSM:New())
|
|
65164
65255
|
self.airbasename=AirbaseName
|
|
@@ -65713,33 +65804,31 @@ dewpoint=UTILS.CelsiusToFahrenheit(dewpoint)
|
|
|
65713
65804
|
end
|
|
65714
65805
|
local TEMPERATURE=string.format("%d",math.abs(temperature))
|
|
65715
65806
|
local DEWPOINT=string.format("%d",math.abs(dewpoint))
|
|
65716
|
-
local clouds,visibility,turbulence,
|
|
65717
|
-
|
|
65718
|
-
fog=
|
|
65719
|
-
|
|
65720
|
-
if
|
|
65721
|
-
dust=
|
|
65722
|
-
|
|
65723
|
-
local visibilitymin=visibility
|
|
65724
|
-
if fog then
|
|
65725
|
-
if fog.visibility<visibilitymin then
|
|
65726
|
-
visibilitymin=fog.visibility
|
|
65807
|
+
local clouds,visibility,turbulence,dustdens,static=self:GetMissionWeather()
|
|
65808
|
+
local dust=false
|
|
65809
|
+
local fog=false
|
|
65810
|
+
if dustdens then
|
|
65811
|
+
if UTILS.FeetToMeters(1500)>height+25 then
|
|
65812
|
+
dust=true
|
|
65813
|
+
visibility=math.min(visibility,dustdens)
|
|
65727
65814
|
end
|
|
65728
|
-
|
|
65729
|
-
|
|
65730
|
-
|
|
65731
|
-
|
|
65815
|
+
else
|
|
65816
|
+
local fvis=world.weather.getFogVisibilityDistance()
|
|
65817
|
+
local fheight=world.weather.getFogThickness()
|
|
65818
|
+
if fvis>0 and fheight>height+25 then
|
|
65819
|
+
fog=true
|
|
65820
|
+
visibility=math.min(visibility,fvis)
|
|
65732
65821
|
end
|
|
65733
65822
|
end
|
|
65734
65823
|
local VISIBILITY=""
|
|
65735
65824
|
if self.metric then
|
|
65736
|
-
local reportedviz=UTILS.Round(
|
|
65825
|
+
local reportedviz=UTILS.Round(visibility/1000)
|
|
65737
65826
|
if reportedviz>10 then
|
|
65738
65827
|
reportedviz=10
|
|
65739
65828
|
end
|
|
65740
65829
|
VISIBILITY=string.format("%d",reportedviz)
|
|
65741
65830
|
else
|
|
65742
|
-
local reportedviz=UTILS.Round(UTILS.MetersToSM(
|
|
65831
|
+
local reportedviz=UTILS.Round(UTILS.MetersToSM(visibility))
|
|
65743
65832
|
if reportedviz>10 then
|
|
65744
65833
|
reportedviz=10
|
|
65745
65834
|
end
|
|
@@ -66599,18 +66688,13 @@ local dust=nil
|
|
|
66599
66688
|
if weather.enable_dust==true then
|
|
66600
66689
|
dust=weather.dust_density
|
|
66601
66690
|
end
|
|
66602
|
-
local fog=nil
|
|
66603
|
-
if weather.enable_fog==true then
|
|
66604
|
-
fog=weather.fog
|
|
66605
|
-
end
|
|
66606
66691
|
self:T("FF weather:")
|
|
66607
66692
|
self:T({clouds=clouds})
|
|
66608
66693
|
self:T({visibility=visibility})
|
|
66609
66694
|
self:T({turbulence=turbulence})
|
|
66610
|
-
self:T({fog=fog})
|
|
66611
66695
|
self:T({dust=dust})
|
|
66612
66696
|
self:T({static=static})
|
|
66613
|
-
return clouds,visibility,turbulence,
|
|
66697
|
+
return clouds,visibility,turbulence,dust,static
|
|
66614
66698
|
end
|
|
66615
66699
|
function ATIS:_GetThousandsAndHundreds(n)
|
|
66616
66700
|
local N=UTILS.Round(n/1000,1)
|
|
@@ -66999,6 +67083,7 @@ ChinookTroopCircleRadius=5,
|
|
|
66999
67083
|
TroopUnloadDistGround=5,
|
|
67000
67084
|
TroopUnloadDistGroundHerc=25,
|
|
67001
67085
|
TroopUnloadDistGroundHook=15,
|
|
67086
|
+
TroopUnloadDistHoverHook=5,
|
|
67002
67087
|
TroopUnloadDistHover=1.5,
|
|
67003
67088
|
UserSetGroup=nil,
|
|
67004
67089
|
}
|
|
@@ -67035,7 +67120,7 @@ CTLD.UnitTypeCapabilities={
|
|
|
67035
67120
|
["OH58D"]={type="OH58D",crates=false,troops=false,cratelimit=0,trooplimit=0,length=14,cargoweightlimit=400},
|
|
67036
67121
|
["CH-47Fbl1"]={type="CH-47Fbl1",crates=true,troops=true,cratelimit=4,trooplimit=31,length=20,cargoweightlimit=10800},
|
|
67037
67122
|
}
|
|
67038
|
-
CTLD.version="1.1.
|
|
67123
|
+
CTLD.version="1.1.20"
|
|
67039
67124
|
function CTLD:New(Coalition,Prefixes,Alias)
|
|
67040
67125
|
local self=BASE:Inherit(self,FSM:New())
|
|
67041
67126
|
BASE:T({Coalition,Prefixes,Alias})
|
|
@@ -68450,7 +68535,12 @@ local Angle=(heading+270)%360
|
|
|
68450
68535
|
if IsHerc or IsHook then Angle=(heading+180)%360 end
|
|
68451
68536
|
local offset=hoverunload and self.TroopUnloadDistHover or self.TroopUnloadDistGround
|
|
68452
68537
|
if IsHerc then offset=self.TroopUnloadDistGroundHerc or 25 end
|
|
68453
|
-
if IsHook then
|
|
68538
|
+
if IsHook then
|
|
68539
|
+
offset=self.TroopUnloadDistGroundHook or 15
|
|
68540
|
+
if self.TroopUnloadDistHoverHook then
|
|
68541
|
+
offset=self.TroopUnloadDistHoverHook or 5
|
|
68542
|
+
end
|
|
68543
|
+
end
|
|
68454
68544
|
randomcoord:Translate(offset,Angle,nil,true)
|
|
68455
68545
|
end
|
|
68456
68546
|
local tempcount=0
|
|
@@ -69849,6 +69939,20 @@ table.insert(Stock,_troop.Name,_troop.Stock or-1)
|
|
|
69849
69939
|
end
|
|
69850
69940
|
return Stock
|
|
69851
69941
|
end
|
|
69942
|
+
function CTLD:GetLoadedCargo(Unit)
|
|
69943
|
+
local Troops=0
|
|
69944
|
+
local Crates=0
|
|
69945
|
+
local Cargo={}
|
|
69946
|
+
if Unit and Unit:IsAlive()then
|
|
69947
|
+
local name=Unit:GetName()
|
|
69948
|
+
if self.Loaded_Cargo[name]then
|
|
69949
|
+
Troops=self.Loaded_Cargo[name].Troopsloaded or 0
|
|
69950
|
+
Crates=self.Loaded_Cargo[name].Cratesloaded or 0
|
|
69951
|
+
Cargo=self.Loaded_Cargo[name].Cargo or{}
|
|
69952
|
+
end
|
|
69953
|
+
end
|
|
69954
|
+
return Troops,Crates,Cargo
|
|
69955
|
+
end
|
|
69852
69956
|
function CTLD:GetStockStatics()
|
|
69853
69957
|
local Stock={}
|
|
69854
69958
|
local gentroops=self.Cargo_Statics
|
package/package.json
CHANGED
|
Binary file
|