mirror of
https://github.com/weyne85/DML.git
synced 2025-10-29 16:57:49 +00:00
Version 0.70a
This commit is contained in:
parent
5ae7f36482
commit
a9ac365b8d
@ -1,5 +1,5 @@
|
|||||||
cloneZones = {}
|
cloneZones = {}
|
||||||
cloneZones.version = "1.0.0"
|
cloneZones.version = "1.0.1"
|
||||||
cloneZones.verbose = false
|
cloneZones.verbose = false
|
||||||
cloneZones.requiredLibs = {
|
cloneZones.requiredLibs = {
|
||||||
"dcsCommon", -- always
|
"dcsCommon", -- always
|
||||||
@ -14,6 +14,7 @@ cloneZones.cloners = {}
|
|||||||
|
|
||||||
Version History
|
Version History
|
||||||
1.0.0 - initial version
|
1.0.0 - initial version
|
||||||
|
1.0.1 - preWipe attribute
|
||||||
|
|
||||||
--]]--
|
--]]--
|
||||||
|
|
||||||
@ -93,6 +94,8 @@ function cloneZones.createClonerWithZone(theZone) -- has "Cloner"
|
|||||||
|
|
||||||
theZone.moveRoute = cfxZones.getBoolFromZoneProperty(theZone, "moveRoute", false)
|
theZone.moveRoute = cfxZones.getBoolFromZoneProperty(theZone, "moveRoute", false)
|
||||||
|
|
||||||
|
theZone.preWipe = cfxZones.getBoolFromZoneProperty(theZone, "preWipe", false)
|
||||||
|
|
||||||
if cfxZones.hasProperty(theZone, "empty+1") then
|
if cfxZones.hasProperty(theZone, "empty+1") then
|
||||||
theZone.emptyFlag = cfxZones.getNumberFromZoneProperty(theZone, "empty+1", "<None>") -- note string on number default
|
theZone.emptyFlag = cfxZones.getNumberFromZoneProperty(theZone, "empty+1", "<None>") -- note string on number default
|
||||||
end
|
end
|
||||||
@ -114,6 +117,9 @@ end
|
|||||||
--
|
--
|
||||||
|
|
||||||
function cloneZones.despawnAll(theZone)
|
function cloneZones.despawnAll(theZone)
|
||||||
|
if cloneZones.verbose then
|
||||||
|
trigger.action.outText("wiping <" .. theZone.name .. ">", 30)
|
||||||
|
end
|
||||||
for idx, aGroup in pairs(theZone.mySpawns) do
|
for idx, aGroup in pairs(theZone.mySpawns) do
|
||||||
Group.destroy(aGroup)
|
Group.destroy(aGroup)
|
||||||
end
|
end
|
||||||
@ -295,6 +301,11 @@ function cloneZones.spawnWithCloner(theZone)
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- pre-Wipe?
|
||||||
|
if theZone.preWipe then
|
||||||
|
cloneZones.despawnAll(theZone)
|
||||||
|
end
|
||||||
|
|
||||||
-- local myLoc = cfxZones.getPoint(theZone)
|
-- local myLoc = cfxZones.getPoint(theZone)
|
||||||
local theClones = cloneZones.spawnWithTemplateForZone(templateZone, theZone)
|
local theClones = cloneZones.spawnWithTemplateForZone(templateZone, theZone)
|
||||||
|
|||||||
@ -30,8 +30,9 @@ function pulseFlags.createPulseWithZone(theZone)
|
|||||||
|
|
||||||
-- time can be number, or number-number range
|
-- time can be number, or number-number range
|
||||||
theZone.minTime, theZone.time = cfxZones.getPositiveRangeFromZoneProperty(theZone, "time", 1)
|
theZone.minTime, theZone.time = cfxZones.getPositiveRangeFromZoneProperty(theZone, "time", 1)
|
||||||
|
if pulseFlags.verbose then
|
||||||
trigger.action.outText("***PulF: zone <" .. theZone.name .. "> time is <".. theZone.minTime ..", " .. theZone.time .. "!", 30)
|
trigger.action.outText("***PulF: zone <" .. theZone.name .. "> time is <".. theZone.minTime ..", " .. theZone.time .. "!", 30)
|
||||||
|
end
|
||||||
|
|
||||||
theZone.pulses = cfxZones.getNumberFromZoneProperty(theZone, "pulses", -1)
|
theZone.pulses = cfxZones.getNumberFromZoneProperty(theZone, "pulses", -1)
|
||||||
theZone.pulsesLeft = 0 -- will start new cycle
|
theZone.pulsesLeft = 0 -- will start new cycle
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user