@jtff/miztemplate-lib 3.10.5 → 3.10.7
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 +70 -69
- package/lua/lib/Moose_.lua +64370 -19663
- package/lua/src/176-random_air_traffic.lua +29 -27
- package/package.json +1 -1
- package/scripts/inject-scripts.js +0 -7
- package/lua/lib/Hercules_Cargo.lua +0 -686
|
@@ -5,69 +5,71 @@ RATManagerArray = {}
|
|
|
5
5
|
compteur = 0
|
|
6
6
|
for index, ratconfig in ipairs(RATConfig) do
|
|
7
7
|
if ratconfig.enable == true then
|
|
8
|
-
jtff_log.info(string.format("
|
|
8
|
+
jtff_log.info(string.format("RATManager %s Enable",ratconfig.name),"RAT")
|
|
9
9
|
compteur = compteur +1
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
local RATmanager=RATMANAGER:New(ratconfig.maximum_aircrafts)
|
|
10
|
+
local ratManagerName = ratconfig.name or "unknown"
|
|
11
|
+
RATManagerArray[compteur] = RATMANAGER:New(ratconfig.constant_alive_groups or nil)
|
|
12
|
+
RATManagerArray[compteur].RATObjectsArray = {}
|
|
14
13
|
for index_planegroup, planegroupconfig in ipairs(ratconfig.aircrafts_groupconfigs) do
|
|
15
14
|
if (type(planegroupconfig.templatename) == "string") then
|
|
16
15
|
planegroupconfig.templatename = {planegroupconfig.templatename}
|
|
17
16
|
end
|
|
18
17
|
if (type(planegroupconfig.templatename) == "table") then
|
|
19
|
-
for
|
|
20
|
-
jtff_log.debug(string.format("
|
|
21
|
-
|
|
18
|
+
for templateindex, templatename in ipairs(planegroupconfig.templatename) do
|
|
19
|
+
jtff_log.debug(string.format("RATManager %s - template %s", ratManagerName ,templatename),"RAT")
|
|
20
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex] = RAT:New(templatename)
|
|
22
21
|
if (type(planegroupconfig.airbases_names) == "table" ) then
|
|
23
|
-
|
|
22
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:SetTakeoff("cold")
|
|
24
23
|
for airstartindex, airstartname in ipairs(planegroupconfig.airbases_names.departure) do
|
|
25
|
-
if not(
|
|
26
|
-
|
|
24
|
+
if not(RATManagerArray[compteur].RATObjectsArray[templateindex]:_AirportExists(airstartname)) then
|
|
25
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:SetTakeoff("air")
|
|
27
26
|
end
|
|
28
27
|
end
|
|
29
28
|
for airstopindex, airstopname in ipairs(planegroupconfig.airbases_names.arrival) do
|
|
30
|
-
if not(
|
|
31
|
-
|
|
29
|
+
if not(RATManagerArray[compteur].RATObjectsArray[templateindex]:_AirportExists(airstopname)) then
|
|
30
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:DestinationZone()
|
|
32
31
|
end
|
|
33
32
|
end
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:SetDeparture(planegroupconfig.airbases_names.departure)
|
|
34
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:SetDestination(planegroupconfig.airbases_names.arrival)
|
|
36
35
|
end
|
|
37
36
|
if (type(planegroupconfig.inactive_timer) == "number" ) then
|
|
38
|
-
|
|
37
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:TimeDestroyInactive(planegroupconfig.inactive_timer)
|
|
39
38
|
end
|
|
40
39
|
if (type(planegroupconfig.atcmessage_enable) == "boolean" ) then
|
|
41
|
-
|
|
40
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:ATC_Messages(planegroupconfig.atcmessage_enable)
|
|
42
41
|
else
|
|
43
|
-
|
|
42
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:ATC_Messages(false)
|
|
44
43
|
end
|
|
45
44
|
if (type(planegroupconfig.flightlevel) == "number" ) then
|
|
46
|
-
|
|
45
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:SetFLcruise(planegroupconfig.flightlevel)
|
|
47
46
|
end
|
|
48
47
|
if (type(planegroupconfig.speed) == "number") then
|
|
49
|
-
|
|
48
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:SetMaxCruiseSpeed(UTILS.KnotsToKmph(planegroupconfig.speed))
|
|
50
49
|
end
|
|
51
50
|
if (planegroupconfig.liveries) then
|
|
52
|
-
|
|
51
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:Livery(planegroupconfig.liveries)
|
|
53
52
|
end
|
|
54
53
|
if (type(planegroupconfig.allow_immortal) == "boolean" and planegroupconfig.allow_immortal == true) then
|
|
55
|
-
|
|
54
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:Immortal()
|
|
56
55
|
end
|
|
57
56
|
if (type(planegroupconfig.allow_invisible) == "boolean" and planegroupconfig.allow_invisible == true) then
|
|
58
|
-
|
|
57
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:Invisible()
|
|
59
58
|
end
|
|
60
59
|
if (type(planegroupconfig.commute) == "boolean" and planegroupconfig.commute == true) then
|
|
61
|
-
|
|
60
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:Commute(true)
|
|
62
61
|
end
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
RATManagerArray[compteur].RATObjectsArray[templateindex]:SetEPLRS(true)
|
|
63
|
+
RATManagerArray[compteur]:Add(RATManagerArray[compteur].RATObjectsArray[templateindex], planegroupconfig.minimun_spawns)
|
|
64
|
+
--RATManagerArray[compteur].RATObjectsArray[templateindex]:SetSpawnInterval(planegroupconfig.inactive_timer)
|
|
65
|
+
--RATManagerArray[compteur].RATObjectsArray[templateindex]:InitRepeat()
|
|
66
|
+
--RATManagerArray[compteur].RATObjectsArray[templateindex]:Spawn()
|
|
65
67
|
end
|
|
66
68
|
else
|
|
67
69
|
jtff_log.error(string.format("RAT error in template name type : %s", planegroupconfig.templatename),"RAT")
|
|
68
70
|
end
|
|
69
71
|
end
|
|
70
|
-
RATManagerArray[compteur] =
|
|
72
|
+
RATManagerArray[compteur].customconfig = ratconfig
|
|
71
73
|
RATManagerArray[compteur]:Start(spawnStandardDelay)
|
|
72
74
|
end
|
|
73
75
|
end
|
package/package.json
CHANGED
|
@@ -196,13 +196,6 @@ async function doInject(ciObject, sourceMizFileName, workspacePath,destinationMi
|
|
|
196
196
|
timing: 12,
|
|
197
197
|
color: '0x008000ff'
|
|
198
198
|
});
|
|
199
|
-
libsArray.push({
|
|
200
|
-
folder: 'lib',
|
|
201
|
-
scriptTitle: 'Hercules',
|
|
202
|
-
scripts: ['Hercules_Cargo.lua'],
|
|
203
|
-
timing: 14,
|
|
204
|
-
color: '0x008000ff'
|
|
205
|
-
});
|
|
206
199
|
libsArray.push({
|
|
207
200
|
folder: 'lib',
|
|
208
201
|
scriptTitle: 'Skynet and Hound',
|