@jtff/miztemplate-lib 3.8.4 → 3.8.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/src/130-airboss.lua +17 -15
- package/package.json +1 -1
package/lua/src/130-airboss.lua
CHANGED
|
@@ -77,23 +77,25 @@ end
|
|
|
77
77
|
|
|
78
78
|
function getCaseTypeFromWeather(CVNCoordinates, recovery_start, recovery_stop)
|
|
79
79
|
if (CVNCoordinates) then
|
|
80
|
-
if ((
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
end
|
|
85
|
-
if (recovery_stop) then
|
|
86
|
-
if (recovery_stop > (tonumber(CVNCoordinates:GetSunset(true)) - 30*60)) then
|
|
87
|
-
--recovery_stop after Navy SunSet
|
|
88
|
-
jtff_log.info("CASE III weather : Recovery ending after Navy SunSet", "AIRBOSS")
|
|
80
|
+
if (type(CVNCoordinates:GetSunset(true)) ~= "nil" and type(CVNCoordinates:GetSunrise(true)) ~= "nil" ) then
|
|
81
|
+
if ((timer.getAbsTime() >= (tonumber(CVNCoordinates:GetSunset(true)) - 30*60)) or (timer.getAbsTime() <= (tonumber(CVNCoordinates:GetSunrise(true)) + 30*60))) then
|
|
82
|
+
--Navy Night conditions
|
|
83
|
+
jtff_log.info("CASE III weather : Navy Night", "AIRBOSS")
|
|
89
84
|
return 3
|
|
90
85
|
end
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
if (recovery_stop) then
|
|
87
|
+
if (recovery_stop > (tonumber(CVNCoordinates:GetSunset(true)) - 30*60)) then
|
|
88
|
+
--recovery_stop after Navy SunSet
|
|
89
|
+
jtff_log.info("CASE III weather : Recovery ending after Navy SunSet", "AIRBOSS")
|
|
90
|
+
return 3
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
if (recovery_start) then
|
|
94
|
+
if (recovery_start < (tonumber(CVNCoordinates:GetSunrise(true)) + 30*60)) then
|
|
95
|
+
--recover_start before Navy SunRise
|
|
96
|
+
jtff_log.info("CASE III weather : Recovery starting before Navy SunRise","AIRBOSS")
|
|
97
|
+
return 3
|
|
98
|
+
end
|
|
97
99
|
end
|
|
98
100
|
end
|
|
99
101
|
end
|