@jtff/miztemplate-lib 3.4.6 → 3.4.8
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/172-cap_zone_war.lua +15 -1
- package/package.json +1 -1
|
@@ -42,6 +42,7 @@ function startCapWarZone(objCapWarZone)
|
|
|
42
42
|
15*60,
|
|
43
43
|
45*60
|
|
44
44
|
)
|
|
45
|
+
objCapWarZone.objDispatcher:SetDefaultOverhead(objCapWarZone.customconfig.overhead or 1)
|
|
45
46
|
for indexbase, capbaseconfig in ipairs(objCapWarZone.customconfig.CAPBases) do
|
|
46
47
|
jtff_log.info(string.format("Activating all Squadrons stationed at %s...", capbaseconfig.baseName),"CAP_WAR_ZONE")
|
|
47
48
|
for indexcapsqn, capsqnconfig in ipairs(capbaseconfig.patrolSquadrons) do
|
|
@@ -77,6 +78,10 @@ function startCapWarZone(objCapWarZone)
|
|
|
77
78
|
UTILS.FeetToMeters(20000)
|
|
78
79
|
)
|
|
79
80
|
end
|
|
81
|
+
if ( capsqnconfig.overhead > 0) then
|
|
82
|
+
objCapWarZone.objDispatcher:SetSquadronOverhead(CAPSquadronName, capsqnconfig.overhead)
|
|
83
|
+
end
|
|
84
|
+
objCapWarZone.objDispatcher:SetSquadronOverhead(CAPSquadronName, capsqnconfig.overhead or 1)
|
|
80
85
|
function objCapWarZone.objDispatcher:OnEventBirth(eventData)
|
|
81
86
|
local unit = UNIT:Find(eventData.initiator)
|
|
82
87
|
if (objCapWarZone.customconfig.fireRange) then
|
|
@@ -87,20 +92,26 @@ function startCapWarZone(objCapWarZone)
|
|
|
87
92
|
unit:OptionROT(ENUMS.ROT.EvadeFire)
|
|
88
93
|
end
|
|
89
94
|
local CapZone = nil
|
|
95
|
+
local CapZoneName = nil
|
|
90
96
|
if capsqnconfig.patrolZoneName then
|
|
91
97
|
if capsqnconfig.patrolZoneGroupName then
|
|
92
98
|
CapZone = ZONE_POLYGON:New(capsqnconfig.patrolZoneGroupName, GROUP:FindByName(capsqnconfig.patrolZoneGroupName))
|
|
99
|
+
CapZoneName = capsqnconfig.patrolZoneGroupName
|
|
93
100
|
else
|
|
94
101
|
CapZone = ZONE:New(capsqnconfig.patrolZoneName)
|
|
102
|
+
CapZoneName = capsqnconfig.patrolZoneName
|
|
95
103
|
end
|
|
96
104
|
else
|
|
97
105
|
if capsqnconfig.patrolZoneGroupName then
|
|
98
106
|
CapZone = ZONE_POLYGON:New(capsqnconfig.patrolZoneGroupName, GROUP:FindByName(capsqnconfig.patrolZoneGroupName))
|
|
107
|
+
CapZoneName = capsqnconfig.patrolZoneGroupName
|
|
99
108
|
else
|
|
100
109
|
CapZone = objCapWarZone.objZone
|
|
110
|
+
--CapZoneName = objCapWarZone.objZone:GetName()
|
|
111
|
+
CapZoneName = "unknown"
|
|
101
112
|
end
|
|
102
113
|
end
|
|
103
|
-
jtff_log.info(string.format("Assigned Squadron %s to %s patrol Zone...", CAPSquadronName,
|
|
114
|
+
jtff_log.info(string.format("Assigned Squadron %s to %s patrol Zone...", CAPSquadronName, CapZoneName),"CAP_WAR_ZONE")
|
|
104
115
|
objCapWarZone.objDispatcher:SetSquadronCap(
|
|
105
116
|
CAPSquadronName,
|
|
106
117
|
CapZone,
|
|
@@ -156,6 +167,9 @@ function startCapWarZone(objCapWarZone)
|
|
|
156
167
|
)
|
|
157
168
|
end
|
|
158
169
|
jtff_log.info(string.format("Assigned Squadron %s to GCI mission...", interceptSquadronName),"CAP_WAR_ZONE")
|
|
170
|
+
if ( interceptsqnconfig.overhead > 0) then
|
|
171
|
+
objCapWarZone.objDispatcher:SetSquadronOverhead(interceptSquadronName, interceptsqnconfig.overhead)
|
|
172
|
+
end
|
|
159
173
|
objCapWarZone.objDispatcher:SetSquadronGci(
|
|
160
174
|
interceptSquadronName,
|
|
161
175
|
UTILS.KnotsToKmph(objCapWarZone.customconfig.capParameters.minEngageSpeed) or UTILS.KnotsToKmph(200),
|