@jtff/miztemplate-lib 3.3.0 → 3.3.1
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 +1422 -470
- package/lua/settings/settings-airboss.lua +3 -0
- package/lua/src/130-airboss.lua +48 -3
- package/package.json +1 -1
package/lua/src/130-airboss.lua
CHANGED
|
@@ -137,6 +137,36 @@ function getCaseTypeFromWeather(CVNCoordinates, recovery_start, recovery_stop)
|
|
|
137
137
|
end
|
|
138
138
|
end
|
|
139
139
|
|
|
140
|
+
function startRecoveryOnDemand(objAirboss)
|
|
141
|
+
local effectiveeventcase = getCaseTypeFromWeather(
|
|
142
|
+
objAirboss:GetCoordinate(),
|
|
143
|
+
UTILS.Round(timer.getAbsTime() + 5 *60,0),
|
|
144
|
+
UTILS.Round(timer.getAbsTime() + ((objAirboss.customconfig.recoveryops.ondemand.recovery_duration_minutes or 30) * 60),0)
|
|
145
|
+
)
|
|
146
|
+
if effectiveeventcase == 1 then
|
|
147
|
+
objAirboss:MessageToMarshal('Good visibility : Case I', objAirboss.customconfig.alias, "", 45, false, 0)
|
|
148
|
+
objAirboss:SetMaxSectionSize(4)
|
|
149
|
+
elseif effectiveeventcase == 2 then
|
|
150
|
+
objAirboss:MessageToMarshal('Bad visibility in altitude : Case II', objAirboss.customconfig.alias, "", 45, false, 0)
|
|
151
|
+
objAirboss:SetMaxSectionSize(2)
|
|
152
|
+
elseif effectiveeventcase == 3 then
|
|
153
|
+
objAirboss:MessageToMarshal('Bad visibility : Case III', objAirboss.customconfig.alias, "", 45, false, 0)
|
|
154
|
+
objAirboss:SetMaxSectionSize(1)
|
|
155
|
+
else
|
|
156
|
+
objAirboss:SetMaxSectionSize(1)
|
|
157
|
+
end
|
|
158
|
+
objAirboss:AddRecoveryWindow(
|
|
159
|
+
UTILS.SecondsToClock(timer.getAbsTime() + 5 * 60, false, false),
|
|
160
|
+
UTILS.SecondsToClock(timer.getAbsTime() + ((objAirboss.customconfig.recoveryops.ondemand.recovery_duration_minutes or 30) * 60),false, false),
|
|
161
|
+
effectiveeventcase,
|
|
162
|
+
objAirboss.customconfig.menurecovery.offset,
|
|
163
|
+
true,
|
|
164
|
+
objAirboss.customconfig.menurecovery.windondeck,
|
|
165
|
+
objAirboss.customconfig.menurecovery.uturn
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
|
|
140
170
|
AIRBOSSArray = {}
|
|
141
171
|
compteur = 0
|
|
142
172
|
MenuCoalitionCSGCommandsBlue = MENU_COALITION:New(coalition.side.BLUE, "CSG Commands", MenuCoalitionBlue)
|
|
@@ -186,6 +216,15 @@ for index, airbossconfig in ipairs(AirBossConfig) do
|
|
|
186
216
|
airbossconfig.carriername
|
|
187
217
|
}
|
|
188
218
|
)
|
|
219
|
+
if (airbossconfig.recoveryops.mode == 'ondemand') then
|
|
220
|
+
MENU_COALITION_COMMAND:New(
|
|
221
|
+
airbossconfig.coalition,
|
|
222
|
+
"OnDemand Recovery : start in 5 minutes",
|
|
223
|
+
objAirboss.menuObject,
|
|
224
|
+
startRecoveryOnDemand,
|
|
225
|
+
objAirboss
|
|
226
|
+
)
|
|
227
|
+
end
|
|
189
228
|
objAirboss:SetTACAN(airbossconfig.tacan.channel, airbossconfig.tacan.mode, airbossconfig.tacan.morse)
|
|
190
229
|
objAirboss:SetICLS(airbossconfig.icls.channel, airbossconfig.icls.morse)
|
|
191
230
|
if (airbossconfig.infinitepatrol) then
|
|
@@ -608,16 +647,19 @@ for index, airbossconfig in ipairs(AirBossConfig) do
|
|
|
608
647
|
if (airbossconfig.recoveryops.alpha) then
|
|
609
648
|
if (airbossconfig.recoveryops.alpha.recoveries) then
|
|
610
649
|
for alphaindex, alphaevent in ipairs(airbossconfig.recoveryops.alpha.recoveries) do
|
|
611
|
-
|
|
650
|
+
AIRBOSSArray[compteur]:SetRecoveryCase(getCaseTypeFromWeather(
|
|
612
651
|
AIRBOSSArray[compteur]:GetCoordinate(),
|
|
613
652
|
UTILS.Round(env.mission.start_time + (alphaevent.recovery_start_minutes * 60) ,0),
|
|
614
653
|
UTILS.Round(env.mission.start_time + (( alphaevent.recovery_start_minutes + alphaevent.recovery_duration_minutes ) * 60),0)
|
|
615
|
-
)
|
|
654
|
+
))
|
|
616
655
|
if AIRBOSSArray[compteur].defaultcase == 1 then
|
|
656
|
+
AIRBOSSArray[compteur]:MessageToMarshal('Good visibility : Case I', AIRBOSSArray[compteur].customconfig.alias, "", 45, false, 0)
|
|
617
657
|
AIRBOSSArray[compteur]:SetMaxSectionSize(4)
|
|
618
658
|
elseif AIRBOSSArray[compteur].defaultcase == 2 then
|
|
659
|
+
AIRBOSSArray[compteur]:MessageToMarshal('Bad visibility in altitude : Case II', AIRBOSSArray[compteur].customconfig.alias, "", 45, false, 0)
|
|
619
660
|
AIRBOSSArray[compteur]:SetMaxSectionSize(2)
|
|
620
661
|
elseif AIRBOSSArray[compteur].defaultcase == 3 then
|
|
662
|
+
AIRBOSSArray[compteur]:MessageToMarshal('Bad visibility : Case III', AIRBOSSArray[compteur].customconfig.alias, "", 45, false, 0)
|
|
621
663
|
AIRBOSSArray[compteur]:SetMaxSectionSize(1)
|
|
622
664
|
else
|
|
623
665
|
AIRBOSSArray[compteur]:SetMaxSectionSize(1)
|
|
@@ -626,7 +668,7 @@ for index, airbossconfig in ipairs(AirBossConfig) do
|
|
|
626
668
|
UTILS.SecondsToClock(env.mission.start_time + (alphaevent.recovery_start_minutes * 60) ),
|
|
627
669
|
UTILS.SecondsToClock(env.mission.start_time +
|
|
628
670
|
( (alphaevent.recovery_start_minutes + alphaevent.recovery_duration_minutes) * 60)),
|
|
629
|
-
|
|
671
|
+
AIRBOSSArray[compteur].defaultcase,
|
|
630
672
|
airbossconfig.menurecovery.offset,
|
|
631
673
|
true,
|
|
632
674
|
airbossconfig.menurecovery.windondeck,
|
|
@@ -635,6 +677,9 @@ for index, airbossconfig in ipairs(AirBossConfig) do
|
|
|
635
677
|
end
|
|
636
678
|
end
|
|
637
679
|
end
|
|
680
|
+
else
|
|
681
|
+
if (airbossconfig.recoveryops.mode == 'ondemand') then
|
|
682
|
+
end
|
|
638
683
|
end
|
|
639
684
|
end
|
|
640
685
|
trigger.action.outText('AIRBOSS scripts Loaded for unit '..airbossconfig.carriername, 10)
|