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.version = "1.0.0"
|
||||
cloneZones.version = "1.0.1"
|
||||
cloneZones.verbose = false
|
||||
cloneZones.requiredLibs = {
|
||||
"dcsCommon", -- always
|
||||
@ -14,6 +14,7 @@ cloneZones.cloners = {}
|
||||
|
||||
Version History
|
||||
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.preWipe = cfxZones.getBoolFromZoneProperty(theZone, "preWipe", false)
|
||||
|
||||
if cfxZones.hasProperty(theZone, "empty+1") then
|
||||
theZone.emptyFlag = cfxZones.getNumberFromZoneProperty(theZone, "empty+1", "<None>") -- note string on number default
|
||||
end
|
||||
@ -114,6 +117,9 @@ end
|
||||
--
|
||||
|
||||
function cloneZones.despawnAll(theZone)
|
||||
if cloneZones.verbose then
|
||||
trigger.action.outText("wiping <" .. theZone.name .. ">", 30)
|
||||
end
|
||||
for idx, aGroup in pairs(theZone.mySpawns) do
|
||||
Group.destroy(aGroup)
|
||||
end
|
||||
@ -296,6 +302,11 @@ function cloneZones.spawnWithCloner(theZone)
|
||||
return
|
||||
end
|
||||
|
||||
-- pre-Wipe?
|
||||
if theZone.preWipe then
|
||||
cloneZones.despawnAll(theZone)
|
||||
end
|
||||
|
||||
-- local myLoc = cfxZones.getPoint(theZone)
|
||||
local theClones = cloneZones.spawnWithTemplateForZone(templateZone, theZone)
|
||||
-- reset hasClones so we know our spawns are full and we can
|
||||
|
||||
@ -30,8 +30,9 @@ function pulseFlags.createPulseWithZone(theZone)
|
||||
|
||||
-- time can be number, or number-number range
|
||||
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)
|
||||
end
|
||||
|
||||
theZone.pulses = cfxZones.getNumberFromZoneProperty(theZone, "pulses", -1)
|
||||
theZone.pulsesLeft = 0 -- will start new cycle
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user