mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2025-08-15 10:37:46 +00:00
Last step of bid folder restructure
This commit is contained in:
parent
3aee942510
commit
d0ce19b779
@ -1,80 +1,80 @@
|
||||
-- This test mission models the behaviour of the AI_PATROL_ZONE class.
|
||||
--
|
||||
-- It creates a 2 AI_PATROL_ZONE objects with the name Patrol1 and Patrol2.
|
||||
-- Patrol1 will govern a GROUP object to patrol the zone defined by PatrolZone1, within 3000 meters and 6000 meters, within a speed of 400 and 600 km/h.
|
||||
-- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 60 secondes, before returning to base.
|
||||
--
|
||||
-- Patrol2 will goven a GROUP object to patrol the zone defined by PatrolZone2, within 600 meters and 1000 meters, within a speed of 300 and 400 km/h.
|
||||
-- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 0 secondes, before returning to base.
|
||||
--
|
||||
-- The Patrol1 and Patrol2 object have 2 state transition functions defined, which customize the default behaviour of the RTB state.
|
||||
-- When Patrol1 goes RTB, it will create a new GROUP object, that will be assigned to Patrol2.
|
||||
-- When Patrol2 goes RTB, it will create a new GROUP object, that will be assgined to Patrol1.
|
||||
--
|
||||
-- In this way, the Patrol1 and Patrol2 objects are fluctuating the patrol pattern from PatrolZone1 and PatrolZone2 :-)
|
||||
|
||||
|
||||
PatrolZoneGroup1 = GROUP:FindByName( "Patrol Zone 1" )
|
||||
PatrolZone1 = ZONE_POLYGON:New( "Patrol Zone 1", PatrolZoneGroup1 )
|
||||
|
||||
PatrolZoneGroup2 = GROUP:FindByName( "Patrol Zone 2" )
|
||||
PatrolZone2 = ZONE_POLYGON:New( "Patrol Zone 2", PatrolZoneGroup2 )
|
||||
|
||||
PatrolSpawn = SPAWN:New( "Patrol Group" )
|
||||
PatrolGroup = PatrolSpawn:Spawn()
|
||||
|
||||
Patrol1 = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 )
|
||||
Patrol1:ManageFuel( 0.2, 60 )
|
||||
Patrol1:SetControllable( PatrolGroup )
|
||||
Patrol1:__Start( 5 )
|
||||
|
||||
Patrol2 = AI_PATROL_ZONE:New( PatrolZone2, 600, 1000, 300, 400 )
|
||||
Patrol2:ManageFuel( 0.2, 0 )
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
|
||||
-- @param #AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
-- @return #boolean If false is returned, then the OnAfter state transition function will not be called.
|
||||
function Patrol1:OnLeaveRTB( AIGroup )
|
||||
AIGroup:MessageToRed( "Returning to base", 20 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol1:OnAfterRTB( AIGroup )
|
||||
local NewGroup = PatrolSpawn:Spawn()
|
||||
Patrol2:SetControllable( NewGroup )
|
||||
Patrol2:__Start( 1 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol1:OnEnterPatrol( AIGroup )
|
||||
AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone1:GetName() , 20 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
|
||||
-- @param #AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
-- @return #boolean If false is returned, then the OnEnter state transition function will not be called.
|
||||
function Patrol2:OnBeforeRTB( AIGroup )
|
||||
AIGroup:MessageToRed( "Returning to base", 20 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol2:OnEnterRTB( AIGroup )
|
||||
local NewGroup = PatrolSpawn:Spawn()
|
||||
Patrol1:SetControllable( NewGroup )
|
||||
Patrol1:__Start( 1 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol2:OnEnterPatrol( AIGroup )
|
||||
AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone2:GetName() , 20 )
|
||||
end
|
||||
-- This test mission models the behaviour of the AI_PATROL_ZONE class.
|
||||
--
|
||||
-- It creates a 2 AI_PATROL_ZONE objects with the name Patrol1 and Patrol2.
|
||||
-- Patrol1 will govern a GROUP object to patrol the zone defined by PatrolZone1, within 3000 meters and 6000 meters, within a speed of 400 and 600 km/h.
|
||||
-- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 60 secondes, before returning to base.
|
||||
--
|
||||
-- Patrol2 will goven a GROUP object to patrol the zone defined by PatrolZone2, within 600 meters and 1000 meters, within a speed of 300 and 400 km/h.
|
||||
-- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 0 secondes, before returning to base.
|
||||
--
|
||||
-- The Patrol1 and Patrol2 object have 2 state transition functions defined, which customize the default behaviour of the RTB state.
|
||||
-- When Patrol1 goes RTB, it will create a new GROUP object, that will be assigned to Patrol2.
|
||||
-- When Patrol2 goes RTB, it will create a new GROUP object, that will be assgined to Patrol1.
|
||||
--
|
||||
-- In this way, the Patrol1 and Patrol2 objects are fluctuating the patrol pattern from PatrolZone1 and PatrolZone2 :-)
|
||||
|
||||
|
||||
PatrolZoneGroup1 = GROUP:FindByName( "Patrol Zone 1" )
|
||||
PatrolZone1 = ZONE_POLYGON:New( "Patrol Zone 1", PatrolZoneGroup1 )
|
||||
|
||||
PatrolZoneGroup2 = GROUP:FindByName( "Patrol Zone 2" )
|
||||
PatrolZone2 = ZONE_POLYGON:New( "Patrol Zone 2", PatrolZoneGroup2 )
|
||||
|
||||
PatrolSpawn = SPAWN:New( "Patrol Group" )
|
||||
PatrolGroup = PatrolSpawn:Spawn()
|
||||
|
||||
Patrol1 = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 )
|
||||
Patrol1:ManageFuel( 0.2, 60 )
|
||||
Patrol1:SetControllable( PatrolGroup )
|
||||
Patrol1:__Start( 5 )
|
||||
|
||||
Patrol2 = AI_PATROL_ZONE:New( PatrolZone2, 600, 1000, 300, 400 )
|
||||
Patrol2:ManageFuel( 0.2, 0 )
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
|
||||
-- @param #AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
-- @return #boolean If false is returned, then the OnAfter state transition function will not be called.
|
||||
function Patrol1:OnLeaveRTB( AIGroup )
|
||||
AIGroup:MessageToRed( "Returning to base", 20 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol1:OnAfterRTB( AIGroup )
|
||||
local NewGroup = PatrolSpawn:Spawn()
|
||||
Patrol2:SetControllable( NewGroup )
|
||||
Patrol2:__Start( 1 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol1:OnEnterPatrol( AIGroup )
|
||||
AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone1:GetName() , 20 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
|
||||
-- @param #AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
-- @return #boolean If false is returned, then the OnEnter state transition function will not be called.
|
||||
function Patrol2:OnBeforeRTB( AIGroup )
|
||||
AIGroup:MessageToRed( "Returning to base", 20 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol2:OnEnterRTB( AIGroup )
|
||||
local NewGroup = PatrolSpawn:Spawn()
|
||||
Patrol1:SetControllable( NewGroup )
|
||||
Patrol1:__Start( 1 )
|
||||
end
|
||||
|
||||
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
|
||||
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
|
||||
-- @param Wrapper.Group#GROUP AIGroup
|
||||
function Patrol2:OnEnterPatrol( AIGroup )
|
||||
AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone2:GetName() , 20 )
|
||||
end
|
||||
@ -1,33 +1,33 @@
|
||||
--- Simple function scheduling
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. The log should contain a "Hello World" line that is fired off 10 seconds after mission start.
|
||||
--
|
||||
--
|
||||
-- # Status: TESTED - 12 Dec 2016
|
||||
|
||||
local TestScheduler = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Hello World 1")
|
||||
end, {}, 1
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Hello World 2")
|
||||
end, {}, 2
|
||||
)
|
||||
|
||||
collectgarbage()
|
||||
|
||||
--- Simple function scheduling
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. The log should contain a "Hello World" line that is fired off 10 seconds after mission start.
|
||||
--
|
||||
--
|
||||
-- # Status: TESTED - 12 Dec 2016
|
||||
|
||||
local TestScheduler = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Hello World 1")
|
||||
end, {}, 1
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Hello World 2")
|
||||
end, {}, 2
|
||||
)
|
||||
|
||||
collectgarbage()
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
--- Simple Object Scheduling
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Tracing of a scheduler in an Object.
|
||||
-- The log should contain a "Hello World" line of the object, that is fired off 1 seconds after mission start.
|
||||
--
|
||||
-- # Status: TESTED - 12 Dec 2016
|
||||
|
||||
local TEST_BASE = {
|
||||
ClassName = "TEST_BASE",
|
||||
}
|
||||
|
||||
function TEST_BASE:New( Message )
|
||||
self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
local TestScheduler = SCHEDULER:New( self,
|
||||
function( Object, Message )
|
||||
Object:E( Message )
|
||||
end, { Message }, 1
|
||||
)
|
||||
end
|
||||
|
||||
--- Simple Object Scheduling
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Tracing of a scheduler in an Object.
|
||||
-- The log should contain a "Hello World" line of the object, that is fired off 1 seconds after mission start.
|
||||
--
|
||||
-- # Status: TESTED - 12 Dec 2016
|
||||
|
||||
local TEST_BASE = {
|
||||
ClassName = "TEST_BASE",
|
||||
}
|
||||
|
||||
function TEST_BASE:New( Message )
|
||||
self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
local TestScheduler = SCHEDULER:New( self,
|
||||
function( Object, Message )
|
||||
Object:E( Message )
|
||||
end, { Message }, 1
|
||||
)
|
||||
end
|
||||
|
||||
local Test = TEST_BASE:New( "Hello World" )
|
||||
@ -1,24 +1,24 @@
|
||||
--- Simple repeat scheduling of a function.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. The log should contain "Hello World Repeat" lines that is fired off 1 second after mission start and is repeated every 1 seconds.
|
||||
--
|
||||
--
|
||||
-- # Status: TESTED - 13 Dec 2016
|
||||
|
||||
local TestScheduler = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Hello World Repeat")
|
||||
end, {}, 1, 1
|
||||
--- Simple repeat scheduling of a function.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. The log should contain "Hello World Repeat" lines that is fired off 1 second after mission start and is repeated every 1 seconds.
|
||||
--
|
||||
--
|
||||
-- # Status: TESTED - 13 Dec 2016
|
||||
|
||||
local TestScheduler = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Hello World Repeat")
|
||||
end, {}, 1, 1
|
||||
)
|
||||
@ -1,44 +1,44 @@
|
||||
--- Object Repeat Scheduling.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- Three Test objects are created.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1".
|
||||
-- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute.
|
||||
-- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute.
|
||||
--
|
||||
-- # Status: TESTED - 13 Dec 2016
|
||||
|
||||
local TEST_BASE = {
|
||||
ClassName = "TEST_BASE",
|
||||
}
|
||||
|
||||
function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop )
|
||||
self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
self.TestScheduler = SCHEDULER:New( self,
|
||||
function( Object, Message )
|
||||
Object:E( Message )
|
||||
end, { Message }, Start, Repeat, Randomize, Stop
|
||||
)
|
||||
return self
|
||||
end
|
||||
|
||||
do
|
||||
local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 )
|
||||
end
|
||||
|
||||
local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 )
|
||||
|
||||
local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 )
|
||||
--- Object Repeat Scheduling.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- Three Test objects are created.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1".
|
||||
-- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute.
|
||||
-- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute.
|
||||
--
|
||||
-- # Status: TESTED - 13 Dec 2016
|
||||
|
||||
local TEST_BASE = {
|
||||
ClassName = "TEST_BASE",
|
||||
}
|
||||
|
||||
function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop )
|
||||
self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
self.TestScheduler = SCHEDULER:New( self,
|
||||
function( Object, Message )
|
||||
Object:E( Message )
|
||||
end, { Message }, Start, Repeat, Randomize, Stop
|
||||
)
|
||||
return self
|
||||
end
|
||||
|
||||
do
|
||||
local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 )
|
||||
end
|
||||
|
||||
local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 )
|
||||
|
||||
local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 )
|
||||
@ -1,41 +1,41 @@
|
||||
--- Simple repeat scheduling of a function.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 14 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- Start a schedule called TestScheduler. TestScheduler will repeat the words "Hello World Repeat" every second in the log.
|
||||
-- After 10 seconds, TestScheduler will stop the scheduler.
|
||||
-- After 20 seconds, TestScheduler will restart the scheduler.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Check that the "Hello World Repeat" lines are consistent with the scheduling timing. They should stop showing after 10 seconds, and restart after 20 seconds.
|
||||
--
|
||||
--
|
||||
-- # Status: TESTED - 14 Dec 2016
|
||||
|
||||
local TestScheduler = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( timer.getTime() .. " - Hello World Repeat")
|
||||
end, {}, 1, 1
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
TestScheduler:Stop()
|
||||
end, {}, 10
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
TestScheduler:Start()
|
||||
end, {}, 20
|
||||
)
|
||||
--- Simple repeat scheduling of a function.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 14 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- Start a schedule called TestScheduler. TestScheduler will repeat the words "Hello World Repeat" every second in the log.
|
||||
-- After 10 seconds, TestScheduler will stop the scheduler.
|
||||
-- After 20 seconds, TestScheduler will restart the scheduler.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Check that the "Hello World Repeat" lines are consistent with the scheduling timing. They should stop showing after 10 seconds, and restart after 20 seconds.
|
||||
--
|
||||
--
|
||||
-- # Status: TESTED - 14 Dec 2016
|
||||
|
||||
local TestScheduler = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( timer.getTime() .. " - Hello World Repeat")
|
||||
end, {}, 1, 1
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
TestScheduler:Stop()
|
||||
end, {}, 10
|
||||
)
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
TestScheduler:Start()
|
||||
end, {}, 20
|
||||
)
|
||||
|
||||
@ -1,60 +1,60 @@
|
||||
--- No Object Scheduling because of garbage collect and Object nillification.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- A Test object is created.
|
||||
-- It is nillified directly after the Schedule has been planned.
|
||||
-- There should be no schedule fired.
|
||||
-- The Test object should be garbage collected!
|
||||
--
|
||||
-- THIS IS A VERY IMPORTANT TEST!
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. No schedule should be fired! The destructors of the Test object should be shown.
|
||||
-- 2. Commend the nillification of the Test object in the source, and test again.
|
||||
-- The schedule should now be fired and Hello World should be logged through the Test object.
|
||||
--
|
||||
-- # Status: STARTED - 12 Dec 2016
|
||||
|
||||
local TEST_BASE = {
|
||||
ClassName = "TEST_BASE",
|
||||
}
|
||||
|
||||
function TEST_BASE:New( Message )
|
||||
self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
self.TestScheduler = SCHEDULER:New( self,
|
||||
function( Object, Message )
|
||||
Object:E( Message )
|
||||
end, { Message }, 1
|
||||
)
|
||||
return self
|
||||
end
|
||||
|
||||
do
|
||||
local Test1 = TEST_BASE:New( "Hello World Test 1" )
|
||||
Test1 = nil
|
||||
BASE:E( Test1 )
|
||||
end
|
||||
|
||||
local Test2 = TEST_BASE:New( "Hello World Test 2" )
|
||||
BASE:E( Test2 )
|
||||
|
||||
local Test3 = TEST_BASE:New( "Hello World Test 3" )
|
||||
Test3 = nil
|
||||
BASE:E( Test3 )
|
||||
|
||||
collectgarbage()
|
||||
|
||||
BASE:E( "Collect Garbage executed." )
|
||||
BASE:E( "You should only see a Hello Worlld message for Test 2!" )
|
||||
--- No Object Scheduling because of garbage collect and Object nillification.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 12 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
-- A Test object is created.
|
||||
-- It is nillified directly after the Schedule has been planned.
|
||||
-- There should be no schedule fired.
|
||||
-- The Test object should be garbage collected!
|
||||
--
|
||||
-- THIS IS A VERY IMPORTANT TEST!
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. No schedule should be fired! The destructors of the Test object should be shown.
|
||||
-- 2. Commend the nillification of the Test object in the source, and test again.
|
||||
-- The schedule should now be fired and Hello World should be logged through the Test object.
|
||||
--
|
||||
-- # Status: STARTED - 12 Dec 2016
|
||||
|
||||
local TEST_BASE = {
|
||||
ClassName = "TEST_BASE",
|
||||
}
|
||||
|
||||
function TEST_BASE:New( Message )
|
||||
self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
self.TestScheduler = SCHEDULER:New( self,
|
||||
function( Object, Message )
|
||||
Object:E( Message )
|
||||
end, { Message }, 1
|
||||
)
|
||||
return self
|
||||
end
|
||||
|
||||
do
|
||||
local Test1 = TEST_BASE:New( "Hello World Test 1" )
|
||||
Test1 = nil
|
||||
BASE:E( Test1 )
|
||||
end
|
||||
|
||||
local Test2 = TEST_BASE:New( "Hello World Test 2" )
|
||||
BASE:E( Test2 )
|
||||
|
||||
local Test3 = TEST_BASE:New( "Hello World Test 3" )
|
||||
Test3 = nil
|
||||
BASE:E( Test3 )
|
||||
|
||||
collectgarbage()
|
||||
|
||||
BASE:E( "Collect Garbage executed." )
|
||||
BASE:E( "You should only see a Hello Worlld message for Test 2!" )
|
||||
BASE:E( "Check if Test 1 and Test 3 are garbage collected!" )
|
||||
@ -1,80 +1,80 @@
|
||||
--- Object Repeat Scheduling.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Three objects Test1, Test2, Test 3 are created with schedule a function.
|
||||
-- After 15 seconds, Test1 is nillified and Garbage Collect is done.
|
||||
-- After 30 seconds, Test2 is nillified and Garbage Collect is done.
|
||||
-- After 45 seconds, Test3 is nillified and Garbage Collect is done.
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
--
|
||||
-- Three Test objects are created.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1".
|
||||
-- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute.
|
||||
-- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute.
|
||||
-- 4. After 15 seconds, Test1 should stop working. No "Hello World Repeat 1" may be shown after 15 seconds.
|
||||
-- 5. After 30 seconds, Test2 should stop working. No "Hello World Repeat 2" may be shown after 30 seconds.
|
||||
-- 6. After 45 seconds, Test3 should stop working. No "Hello World Repeat 3" may be shown after 45 seconds.
|
||||
--
|
||||
-- # Status: TESTED - 13 Dec 2016
|
||||
|
||||
local TEST_BASE = {
|
||||
ClassName = "TEST_BASE",
|
||||
}
|
||||
|
||||
function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop )
|
||||
self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
self.TestScheduler = SCHEDULER:New( self,
|
||||
function( Object, Message )
|
||||
Object:E( Message )
|
||||
end, { Message }, Start, Repeat, Randomize, Stop
|
||||
)
|
||||
return self
|
||||
end
|
||||
|
||||
do
|
||||
local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 )
|
||||
|
||||
-- Nillify Test1 after 15 seconds and garbage collect.
|
||||
local Nil1 = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Nillify Test1 and Garbage Collect" )
|
||||
Test1 = nil
|
||||
collectgarbage()
|
||||
end, {}, 15 )
|
||||
|
||||
end
|
||||
|
||||
local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 )
|
||||
|
||||
|
||||
local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 )
|
||||
|
||||
-- Nillify Test2 after 30 seconds and garbage collect.
|
||||
local Nil2 = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Nillify Test2 and Garbage Collect" )
|
||||
Test2 = nil
|
||||
collectgarbage()
|
||||
end, {}, 30 )
|
||||
|
||||
-- Nillify Test3 after 45 seconds and garbage collect.
|
||||
local Nil3 = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Nillify Test3 and Garbage Collect" )
|
||||
Test3 = nil
|
||||
collectgarbage()
|
||||
end, {}, 45 )
|
||||
|
||||
collectgarbage()
|
||||
--- Object Repeat Scheduling.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 13 Dec 2016
|
||||
--
|
||||
-- # Situation
|
||||
-- Three objects Test1, Test2, Test 3 are created with schedule a function.
|
||||
-- After 15 seconds, Test1 is nillified and Garbage Collect is done.
|
||||
-- After 30 seconds, Test2 is nillified and Garbage Collect is done.
|
||||
-- After 45 seconds, Test3 is nillified and Garbage Collect is done.
|
||||
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
|
||||
-- Create a new SCHEDULER object.
|
||||
-- Check the DCS.log.
|
||||
--
|
||||
--
|
||||
-- Three Test objects are created.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1".
|
||||
-- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute.
|
||||
-- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute.
|
||||
-- 4. After 15 seconds, Test1 should stop working. No "Hello World Repeat 1" may be shown after 15 seconds.
|
||||
-- 5. After 30 seconds, Test2 should stop working. No "Hello World Repeat 2" may be shown after 30 seconds.
|
||||
-- 6. After 45 seconds, Test3 should stop working. No "Hello World Repeat 3" may be shown after 45 seconds.
|
||||
--
|
||||
-- # Status: TESTED - 13 Dec 2016
|
||||
|
||||
local TEST_BASE = {
|
||||
ClassName = "TEST_BASE",
|
||||
}
|
||||
|
||||
function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop )
|
||||
self = BASE:Inherit( self, BASE:New() )
|
||||
|
||||
self.TestScheduler = SCHEDULER:New( self,
|
||||
function( Object, Message )
|
||||
Object:E( Message )
|
||||
end, { Message }, Start, Repeat, Randomize, Stop
|
||||
)
|
||||
return self
|
||||
end
|
||||
|
||||
do
|
||||
local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 )
|
||||
|
||||
-- Nillify Test1 after 15 seconds and garbage collect.
|
||||
local Nil1 = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Nillify Test1 and Garbage Collect" )
|
||||
Test1 = nil
|
||||
collectgarbage()
|
||||
end, {}, 15 )
|
||||
|
||||
end
|
||||
|
||||
local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 )
|
||||
|
||||
|
||||
local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 )
|
||||
|
||||
-- Nillify Test2 after 30 seconds and garbage collect.
|
||||
local Nil2 = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Nillify Test2 and Garbage Collect" )
|
||||
Test2 = nil
|
||||
collectgarbage()
|
||||
end, {}, 30 )
|
||||
|
||||
-- Nillify Test3 after 45 seconds and garbage collect.
|
||||
local Nil3 = SCHEDULER:New( nil,
|
||||
function()
|
||||
BASE:E( "Nillify Test3 and Garbage Collect" )
|
||||
Test3 = nil
|
||||
collectgarbage()
|
||||
end, {}, 45 )
|
||||
|
||||
collectgarbage()
|
||||
@ -1,16 +1,16 @@
|
||||
|
||||
BlueAirbaseSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterStart()
|
||||
|
||||
RedAirbaseSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterStart()
|
||||
|
||||
RedAirbaseHelipadSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterCategories("helipad"):FilterStart()
|
||||
|
||||
BlueAirbaseShipSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterCategories("ship"):FilterStart()
|
||||
|
||||
BlueAirbaseSet:Flush()
|
||||
|
||||
RedAirbaseSet:Flush()
|
||||
|
||||
RedAirbaseHelipadSet:Flush()
|
||||
|
||||
|
||||
BlueAirbaseSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterStart()
|
||||
|
||||
RedAirbaseSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterStart()
|
||||
|
||||
RedAirbaseHelipadSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterCategories("helipad"):FilterStart()
|
||||
|
||||
BlueAirbaseShipSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterCategories("ship"):FilterStart()
|
||||
|
||||
BlueAirbaseSet:Flush()
|
||||
|
||||
RedAirbaseSet:Flush()
|
||||
|
||||
RedAirbaseHelipadSet:Flush()
|
||||
|
||||
BlueAirbaseShipSet:Flush()
|
||||
@ -1,34 +1,34 @@
|
||||
---
|
||||
-- Name: SET-102 - Test SET_GROUP object against ZONE
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 31 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- A ZONE has been defined, and the SET_GROUP object is checked against the zone.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the zone perimeter, and place the SET_GROUP object in or out of the zone.
|
||||
-- 2. Observe the results of the functions.
|
||||
|
||||
|
||||
SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart()
|
||||
|
||||
Zone = ZONE:New( "Zone" )
|
||||
|
||||
SetGroupObject:ForEachGroupCompletelyInZone( Zone,
|
||||
function( GroupObject )
|
||||
GroupObject:E( { GroupObject:GetName(), "I am completely in Zone" } )
|
||||
end )
|
||||
|
||||
SetGroupObject:ForEachGroupPartlyInZone( Zone,
|
||||
function( GroupObject )
|
||||
GroupObject:E( { GroupObject:GetName(), "I am partially in Zone" } )
|
||||
end )
|
||||
|
||||
SetGroupObject:ForEachGroupNotInZone( Zone,
|
||||
function( GroupObject )
|
||||
GroupObject:E( { GroupObject:GetName(), "I am not in Zone" } )
|
||||
end )
|
||||
|
||||
---
|
||||
-- Name: SET-102 - Test SET_GROUP object against ZONE
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 31 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- A ZONE has been defined, and the SET_GROUP object is checked against the zone.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the zone perimeter, and place the SET_GROUP object in or out of the zone.
|
||||
-- 2. Observe the results of the functions.
|
||||
|
||||
|
||||
SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart()
|
||||
|
||||
Zone = ZONE:New( "Zone" )
|
||||
|
||||
SetGroupObject:ForEachGroupCompletelyInZone( Zone,
|
||||
function( GroupObject )
|
||||
GroupObject:E( { GroupObject:GetName(), "I am completely in Zone" } )
|
||||
end )
|
||||
|
||||
SetGroupObject:ForEachGroupPartlyInZone( Zone,
|
||||
function( GroupObject )
|
||||
GroupObject:E( { GroupObject:GetName(), "I am partially in Zone" } )
|
||||
end )
|
||||
|
||||
SetGroupObject:ForEachGroupNotInZone( Zone,
|
||||
function( GroupObject )
|
||||
GroupObject:E( { GroupObject:GetName(), "I am not in Zone" } )
|
||||
end )
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
---
|
||||
-- Name: ZON-103 - Test if GROUP object is in ZONE
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 31 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- A ZONE has been defined, and it is checked if a GROUP object is within the zone.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the zone perimeter, and place the GROUP object in or out of the zone.
|
||||
-- 2. Observe the results of the functions.
|
||||
|
||||
|
||||
GroupObject = GROUP:FindByName( "Group Object" )
|
||||
|
||||
Zone = ZONE:New( "Zone" )
|
||||
|
||||
|
||||
Zone:E( { "Group is completely in Zone:", GroupObject:IsCompletelyInZone( Zone ) } )
|
||||
Zone:E( { "Group is partially in Zone:", GroupObject:IsPartlyInZone( Zone ) } )
|
||||
Zone:E( { "Group is not in Zone:", GroupObject:IsNotInZone( Zone ) } )
|
||||
|
||||
---
|
||||
-- Name: ZON-103 - Test if GROUP object is in ZONE
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 31 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- A ZONE has been defined, and it is checked if a GROUP object is within the zone.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the zone perimeter, and place the GROUP object in or out of the zone.
|
||||
-- 2. Observe the results of the functions.
|
||||
|
||||
|
||||
GroupObject = GROUP:FindByName( "Group Object" )
|
||||
|
||||
Zone = ZONE:New( "Zone" )
|
||||
|
||||
|
||||
Zone:E( { "Group is completely in Zone:", GroupObject:IsCompletelyInZone( Zone ) } )
|
||||
Zone:E( { "Group is partially in Zone:", GroupObject:IsPartlyInZone( Zone ) } )
|
||||
Zone:E( { "Group is not in Zone:", GroupObject:IsNotInZone( Zone ) } )
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
---
|
||||
-- Name: SET-103 - Test SET_GROUP players added and deleted
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 31 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Multiple groups of ground vehicles have been defined.
|
||||
-- There are collected in a SET_GROUP.
|
||||
-- A human player is jumping into the seat on one of these vehicles of the SET_GROUP.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the player added and deleted from the SET_GROUP depending on the behaviour.
|
||||
|
||||
|
||||
SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart()
|
||||
---
|
||||
-- Name: SET-103 - Test SET_GROUP players added and deleted
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 31 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- Multiple groups of ground vehicles have been defined.
|
||||
-- There are collected in a SET_GROUP.
|
||||
-- A human player is jumping into the seat on one of these vehicles of the SET_GROUP.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the player added and deleted from the SET_GROUP depending on the behaviour.
|
||||
|
||||
|
||||
SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart()
|
||||
@ -1,3 +1,3 @@
|
||||
|
||||
SetClient = SET_CLIENT:New():FilterCoalitions("blue"):FilterCategories("plane"):FilterCountries("USA"):FilterStart()
|
||||
|
||||
|
||||
SetClient = SET_CLIENT:New():FilterCoalitions("blue"):FilterCategories("plane"):FilterCountries("USA"):FilterStart()
|
||||
|
||||
@ -1,163 +1,163 @@
|
||||
|
||||
|
||||
|
||||
|
||||
SetVehicles = SET_GROUP:New()
|
||||
|
||||
SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } )
|
||||
|
||||
SetVehicles:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeGreen()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
|
||||
SetBluePlanesGroup = SET_GROUP:New()
|
||||
:FilterCoalitions( "blue" )
|
||||
:FilterCategories( "plane" )
|
||||
:FilterStart()
|
||||
|
||||
SetNorthKoreaGroup = SET_GROUP:New()
|
||||
:FilterCountries( "RUSSIA" )
|
||||
:FilterStart()
|
||||
|
||||
SetSAMGroup = SET_GROUP:New()
|
||||
:FilterPrefixes( "SAM" )
|
||||
:FilterStart()
|
||||
:SetIteratorIntervals( 5, 10 )
|
||||
|
||||
SetGroundGroup = SET_GROUP:New()
|
||||
:FilterCategories( "ground" )
|
||||
:FilterStart()
|
||||
|
||||
SetGroundGroup:Flush()
|
||||
|
||||
SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane')
|
||||
GroupUS_Plane = SpawnUS_Plane:Spawn()
|
||||
|
||||
SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle')
|
||||
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
|
||||
|
||||
SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship')
|
||||
GroupUS_Ship = SpawnUS_Ship:Spawn()
|
||||
|
||||
SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle')
|
||||
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
|
||||
|
||||
SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship')
|
||||
GroupRU_Ship = SpawnRU_Ship:Spawn()
|
||||
|
||||
SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
|
||||
SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
|
||||
|
||||
for i = 1, 30 do
|
||||
GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
|
||||
GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
|
||||
end
|
||||
|
||||
SetVehicleCompletely = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Completely" )
|
||||
:FilterStart()
|
||||
|
||||
SetVehiclePartly = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Partly" )
|
||||
:FilterStart()
|
||||
|
||||
SetVehicleNot = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Not" )
|
||||
:FilterStart()
|
||||
|
||||
Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4)
|
||||
Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 )
|
||||
Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 )
|
||||
for i = 1, 30 do
|
||||
Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") )
|
||||
Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") )
|
||||
Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") )
|
||||
end
|
||||
|
||||
--DBBlue:TraceDatabase()
|
||||
--SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 )
|
||||
--
|
||||
--SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 )
|
||||
|
||||
SetBluePlanesGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetNorthKoreaGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeRed()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetSAMGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeOrange()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
GroupZoneCompletely = GROUP:FindByName( "Zone Completely" )
|
||||
GroupZonePartly = GROUP:FindByName( "Zone Partly" )
|
||||
GroupZoneNot = GROUP:FindByName( "Zone Not" )
|
||||
|
||||
ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White )
|
||||
ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White )
|
||||
ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White )
|
||||
|
||||
SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetVehicleNot:ForEachGroupNotInZone( ZoneNot,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
SetVehicles = SET_GROUP:New()
|
||||
|
||||
SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } )
|
||||
|
||||
SetVehicles:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeGreen()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
|
||||
SetBluePlanesGroup = SET_GROUP:New()
|
||||
:FilterCoalitions( "blue" )
|
||||
:FilterCategories( "plane" )
|
||||
:FilterStart()
|
||||
|
||||
SetNorthKoreaGroup = SET_GROUP:New()
|
||||
:FilterCountries( "RUSSIA" )
|
||||
:FilterStart()
|
||||
|
||||
SetSAMGroup = SET_GROUP:New()
|
||||
:FilterPrefixes( "SAM" )
|
||||
:FilterStart()
|
||||
:SetIteratorIntervals( 5, 10 )
|
||||
|
||||
SetGroundGroup = SET_GROUP:New()
|
||||
:FilterCategories( "ground" )
|
||||
:FilterStart()
|
||||
|
||||
SetGroundGroup:Flush()
|
||||
|
||||
SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane')
|
||||
GroupUS_Plane = SpawnUS_Plane:Spawn()
|
||||
|
||||
SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle')
|
||||
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
|
||||
|
||||
SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship')
|
||||
GroupUS_Ship = SpawnUS_Ship:Spawn()
|
||||
|
||||
SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle')
|
||||
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
|
||||
|
||||
SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship')
|
||||
GroupRU_Ship = SpawnRU_Ship:Spawn()
|
||||
|
||||
SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
|
||||
SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
|
||||
|
||||
for i = 1, 30 do
|
||||
GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
|
||||
GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
|
||||
end
|
||||
|
||||
SetVehicleCompletely = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Completely" )
|
||||
:FilterStart()
|
||||
|
||||
SetVehiclePartly = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Partly" )
|
||||
:FilterStart()
|
||||
|
||||
SetVehicleNot = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Not" )
|
||||
:FilterStart()
|
||||
|
||||
Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4)
|
||||
Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 )
|
||||
Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 )
|
||||
for i = 1, 30 do
|
||||
Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") )
|
||||
Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") )
|
||||
Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") )
|
||||
end
|
||||
|
||||
--DBBlue:TraceDatabase()
|
||||
--SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 )
|
||||
--
|
||||
--SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 )
|
||||
|
||||
SetBluePlanesGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetNorthKoreaGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeRed()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetSAMGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeOrange()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
GroupZoneCompletely = GROUP:FindByName( "Zone Completely" )
|
||||
GroupZonePartly = GROUP:FindByName( "Zone Partly" )
|
||||
GroupZoneNot = GROUP:FindByName( "Zone Not" )
|
||||
|
||||
ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White )
|
||||
ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White )
|
||||
ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White )
|
||||
|
||||
SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetVehicleNot:ForEachGroupNotInZone( ZoneNot,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
@ -1,163 +1,163 @@
|
||||
|
||||
|
||||
|
||||
|
||||
SetVehicles = SET_GROUP:New()
|
||||
|
||||
SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } )
|
||||
|
||||
SetVehicles:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeGreen()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
|
||||
SetBluePlanesGroup = SET_GROUP:New()
|
||||
:FilterCoalitions( "blue" )
|
||||
:FilterCategories( "plane" )
|
||||
:FilterStart()
|
||||
|
||||
SetNorthKoreaGroup = SET_GROUP:New()
|
||||
:FilterCountries( "RUSSIA" )
|
||||
:FilterStart()
|
||||
|
||||
SetSAMGroup = SET_GROUP:New()
|
||||
:FilterPrefixes( "SAM" )
|
||||
:FilterStart()
|
||||
:SetIteratorIntervals( 5, 10 )
|
||||
|
||||
SetGroundGroup = SET_GROUP:New()
|
||||
:FilterCategories( "ground" )
|
||||
:FilterStart()
|
||||
|
||||
SetGroundGroup:Flush()
|
||||
|
||||
SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane')
|
||||
GroupUS_Plane = SpawnUS_Plane:Spawn()
|
||||
|
||||
SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle')
|
||||
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
|
||||
|
||||
SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship')
|
||||
GroupUS_Ship = SpawnUS_Ship:Spawn()
|
||||
|
||||
SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle')
|
||||
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
|
||||
|
||||
SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship')
|
||||
GroupRU_Ship = SpawnRU_Ship:Spawn()
|
||||
|
||||
SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
|
||||
SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
|
||||
|
||||
for i = 1, 30 do
|
||||
GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
|
||||
GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
|
||||
end
|
||||
|
||||
SetVehicleCompletely = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Completely" )
|
||||
:FilterStart()
|
||||
|
||||
SetVehiclePartly = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Partly" )
|
||||
:FilterStart()
|
||||
|
||||
SetVehicleNot = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Not" )
|
||||
:FilterStart()
|
||||
|
||||
Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4)
|
||||
Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 )
|
||||
Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 )
|
||||
for i = 1, 30 do
|
||||
Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") )
|
||||
Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") )
|
||||
Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") )
|
||||
end
|
||||
|
||||
--DBBlue:TraceDatabase()
|
||||
--SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 )
|
||||
--
|
||||
--SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 )
|
||||
|
||||
SetBluePlanesGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetNorthKoreaGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeRed()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetSAMGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeOrange()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
GroupZoneCompletely = GROUP:FindByName( "Zone Completely" )
|
||||
GroupZonePartly = GROUP:FindByName( "Zone Partly" )
|
||||
GroupZoneNot = GROUP:FindByName( "Zone Not" )
|
||||
|
||||
ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White )
|
||||
ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White )
|
||||
ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White )
|
||||
|
||||
SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetVehicleNot:ForEachGroupNotInZone( ZoneNot,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
SetVehicles = SET_GROUP:New()
|
||||
|
||||
SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } )
|
||||
|
||||
SetVehicles:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeGreen()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
|
||||
SetBluePlanesGroup = SET_GROUP:New()
|
||||
:FilterCoalitions( "blue" )
|
||||
:FilterCategories( "plane" )
|
||||
:FilterStart()
|
||||
|
||||
SetNorthKoreaGroup = SET_GROUP:New()
|
||||
:FilterCountries( "RUSSIA" )
|
||||
:FilterStart()
|
||||
|
||||
SetSAMGroup = SET_GROUP:New()
|
||||
:FilterPrefixes( "SAM" )
|
||||
:FilterStart()
|
||||
:SetIteratorIntervals( 5, 10 )
|
||||
|
||||
SetGroundGroup = SET_GROUP:New()
|
||||
:FilterCategories( "ground" )
|
||||
:FilterStart()
|
||||
|
||||
SetGroundGroup:Flush()
|
||||
|
||||
SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane')
|
||||
GroupUS_Plane = SpawnUS_Plane:Spawn()
|
||||
|
||||
SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle')
|
||||
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
|
||||
|
||||
SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship')
|
||||
GroupUS_Ship = SpawnUS_Ship:Spawn()
|
||||
|
||||
SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle')
|
||||
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
|
||||
|
||||
SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship')
|
||||
GroupRU_Ship = SpawnRU_Ship:Spawn()
|
||||
|
||||
SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
|
||||
SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
|
||||
|
||||
for i = 1, 30 do
|
||||
GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
|
||||
GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
|
||||
end
|
||||
|
||||
SetVehicleCompletely = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Completely" )
|
||||
:FilterStart()
|
||||
|
||||
SetVehiclePartly = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Partly" )
|
||||
:FilterStart()
|
||||
|
||||
SetVehicleNot = SET_GROUP:New()
|
||||
:FilterPrefixes( "Spawn Vehicle Zone Not" )
|
||||
:FilterStart()
|
||||
|
||||
Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4)
|
||||
Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 )
|
||||
Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 )
|
||||
for i = 1, 30 do
|
||||
Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") )
|
||||
Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") )
|
||||
Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") )
|
||||
end
|
||||
|
||||
--DBBlue:TraceDatabase()
|
||||
--SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 )
|
||||
--
|
||||
--SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 )
|
||||
--SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 )
|
||||
|
||||
SetBluePlanesGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetNorthKoreaGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeRed()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetSAMGroup:ForEachGroup(
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeOrange()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
GroupZoneCompletely = GROUP:FindByName( "Zone Completely" )
|
||||
GroupZonePartly = GROUP:FindByName( "Zone Partly" )
|
||||
GroupZoneNot = GROUP:FindByName( "Zone Not" )
|
||||
|
||||
ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White )
|
||||
ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White )
|
||||
ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White )
|
||||
|
||||
SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
SetVehicleNot:ForEachGroupNotInZone( ZoneNot,
|
||||
--- @param Wrapper.Group#GROUP MooseGroup
|
||||
function( MooseGroup )
|
||||
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
|
||||
local UnitAction = UnitData -- Wrapper.Unit#UNIT
|
||||
UnitAction:SmokeBlue()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
-- The mission contains templates, which are late activated groups. Only the active groups should be included.
|
||||
-- It should count 3 groups in DCS.log.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce()
|
||||
SetGroup:Flush()
|
||||
SetGroup:I( { Count = SetGroup:Count() } )
|
||||
|
||||
MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll()
|
||||
-- The mission contains templates, which are late activated groups. Only the active groups should be included.
|
||||
-- It should count 3 groups in DCS.log.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce()
|
||||
SetGroup:Flush()
|
||||
SetGroup:I( { Count = SetGroup:Count() } )
|
||||
|
||||
MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll()
|
||||
@ -1,8 +1,8 @@
|
||||
-- The mission contains templates, which are late activated groups. All groups should be included.
|
||||
-- It should count 7 groups in DCS.log.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
SetGroup:Flush()
|
||||
SetGroup:I( { Count = SetGroup:Count() } )
|
||||
|
||||
MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll()
|
||||
-- The mission contains templates, which are late activated groups. All groups should be included.
|
||||
-- It should count 7 groups in DCS.log.
|
||||
|
||||
SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
SetGroup:Flush()
|
||||
SetGroup:I( { Count = SetGroup:Count() } )
|
||||
|
||||
MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll()
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
|
||||
SetUnit:Flush()
|
||||
|
||||
SetUnit:I(SetUnit:Count())
|
||||
|
||||
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
|
||||
SetUnit:Flush()
|
||||
|
||||
SetUnit:I(SetUnit:Count())
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
SetUnit:Flush()
|
||||
SetUnit:I( { Count = SetUnit:Count() } )
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
SetUnit:Flush()
|
||||
SetUnit:I( { Count = SetUnit:Count() } )
|
||||
end, {}, 60 )
|
||||
|
||||
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
SetUnit:Flush()
|
||||
SetUnit:I( { Count = SetUnit:Count() } )
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
SetUnit:Flush()
|
||||
SetUnit:I( { Count = SetUnit:Count() } )
|
||||
end, {}, 60 )
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
SetUnit:Flush()
|
||||
SetUnit:I( { Count = SetUnit:Count() } )
|
||||
end, {}, 0, 30 )
|
||||
|
||||
GroupPlanes = GROUP:FindByName( "Planes #001" )
|
||||
|
||||
GroupPlanes:HandleEvent( EVENTS.EngineShutdown )
|
||||
|
||||
function GroupPlanes:OnEventEngineShutdown( EventData )
|
||||
|
||||
EventData.IniUnit:Destroy()
|
||||
|
||||
SCHEDULER:New( nil,
|
||||
function()
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
|
||||
SetUnit:Flush()
|
||||
SetUnit:I( { Count = SetUnit:Count() } )
|
||||
end, {}, 0, 30 )
|
||||
|
||||
GroupPlanes = GROUP:FindByName( "Planes #001" )
|
||||
|
||||
GroupPlanes:HandleEvent( EVENTS.EngineShutdown )
|
||||
|
||||
function GroupPlanes:OnEventEngineShutdown( EventData )
|
||||
|
||||
EventData.IniUnit:Destroy()
|
||||
|
||||
end
|
||||
@ -1,8 +1,8 @@
|
||||
-- The mission contains templates, which are late activated groups. Only the active units should be included.
|
||||
-- It should count 24 units in DCS.log.
|
||||
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce()
|
||||
SetUnit:Flush()
|
||||
SetUnit:I( { Count = SetUnit:Count() } )
|
||||
|
||||
MESSAGE:NewType( "There are " .. SetUnit:Count() .. " units in the SetUnit.", MESSAGE.Type.Information ):ToAll()
|
||||
-- The mission contains templates, which are late activated groups. Only the active units should be included.
|
||||
-- It should count 24 units in DCS.log.
|
||||
|
||||
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce()
|
||||
SetUnit:Flush()
|
||||
SetUnit:I( { Count = SetUnit:Count() } )
|
||||
|
||||
MESSAGE:NewType( "There are " .. SetUnit:Count() .. " units in the SetUnit.", MESSAGE.Type.Information ):ToAll()
|
||||
@ -1,22 +1,22 @@
|
||||
-- Name: SPA-011 - Ground Ops - Simple Spawning
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn a ground vehicle.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicle is spawned.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Spawn a gound vehicle...
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
Spawn_Group_1 = Spawn_Vehicle_1:Spawn()
|
||||
|
||||
|
||||
|
||||
-- Name: SPA-011 - Ground Ops - Simple Spawning
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn a ground vehicle.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicle is spawned.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Spawn a gound vehicle...
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
Spawn_Group_1 = Spawn_Vehicle_1:Spawn()
|
||||
|
||||
|
||||
|
||||
@ -1,26 +1,26 @@
|
||||
-- Name: SPA-012 - Ground Ops - Multiple Spawns
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Spawn a gound vehicle...
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
Spawn_Group_1 = Spawn_Vehicle_1:Spawn()
|
||||
Spawn_Group_2 = Spawn_Vehicle_1:Spawn()
|
||||
Spawn_Group_3 = Spawn_Vehicle_1:Spawn()
|
||||
Spawn_Group_4 = Spawn_Vehicle_1:Spawn()
|
||||
Spawn_Group_5 = Spawn_Vehicle_1:Spawn()
|
||||
|
||||
|
||||
|
||||
-- Name: SPA-012 - Ground Ops - Multiple Spawns
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Spawn a gound vehicle...
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
Spawn_Group_1 = Spawn_Vehicle_1:Spawn()
|
||||
Spawn_Group_2 = Spawn_Vehicle_1:Spawn()
|
||||
Spawn_Group_3 = Spawn_Vehicle_1:Spawn()
|
||||
Spawn_Group_4 = Spawn_Vehicle_1:Spawn()
|
||||
Spawn_Group_5 = Spawn_Vehicle_1:Spawn()
|
||||
|
||||
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
-- Name: SPA-013 - Ground Ops - Scheduled Spawns
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 )
|
||||
|
||||
|
||||
|
||||
|
||||
-- Name: SPA-013 - Ground Ops - Scheduled Spawns
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 )
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
-- Name: SPA-014 - Ground Ops - Scheduled Spawns Limited
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
-- 3. There should not be more than 5 groups spawned.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 5, 0 ):SpawnScheduled( 5, .5 )
|
||||
|
||||
|
||||
-- Name: SPA-014 - Ground Ops - Scheduled Spawns Limited
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
-- 3. There should not be more than 5 groups spawned.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 5, 0 ):SpawnScheduled( 5, .5 )
|
||||
|
||||
|
||||
@ -1,27 +1,27 @@
|
||||
-- Name: SPA-015 - Ground Ops - Randomize Route
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
-- 3. There should not be more than 5 groups spawned.
|
||||
-- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeRoute( 1, 1, 200 ) -- Randomize route starting from point 1 till point 3, with a radius of 200 meters around each point.
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
|
||||
|
||||
|
||||
-- Name: SPA-015 - Ground Ops - Randomize Route
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
-- 3. There should not be more than 5 groups spawned.
|
||||
-- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeRoute( 1, 1, 200 ) -- Randomize route starting from point 1 till point 3, with a radius of 200 meters around each point.
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,29 +1,29 @@
|
||||
-- Name: SPA-016 - Ground Ops - Randomize Zones
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
-- 3. There should not be more than 5 groups spawned.
|
||||
-- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3.
|
||||
-- 5. Observe that the position where the units are spawned, is randomized according the zones.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Create a zone table of the 2 zones.
|
||||
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
|
||||
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeRoute( 1, 1, 200 )
|
||||
:InitRandomizeZones( ZoneTable )
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
-- Name: SPA-016 - Ground Ops - Randomize Zones
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
-- 3. There should not be more than 5 groups spawned.
|
||||
-- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3.
|
||||
-- 5. Observe that the position where the units are spawned, is randomized according the zones.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Create a zone table of the 2 zones.
|
||||
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
|
||||
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeRoute( 1, 1, 200 )
|
||||
:InitRandomizeZones( ZoneTable )
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
@ -1,31 +1,31 @@
|
||||
-- Name: SPA-017 - Ground Ops - Set AI inactive while spawning
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 24 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
-- But set the AI inactive when spawning.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
-- 3. There should not be more than 5 groups spawned.
|
||||
-- 4. Observe that the AI is inactivated, and thus, the vehicles aren't moving.
|
||||
-- 5. Observe that the position where the units are spawned, is randomized in the zones perimeters.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Create a zone table of the 2 zones.
|
||||
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
|
||||
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeRoute( 1, 1, 200 )
|
||||
:InitRandomizeZones( ZoneTable )
|
||||
:InitAIOnOff( false ) -- This will disable the AI. You can also use :InitAIOff(). Set AI On (for those groups with AI Off in the ME), with :InitAIOn().
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
-- Name: SPA-017 - Ground Ops - Set AI inactive while spawning
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 24 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
-- But set the AI inactive when spawning.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
|
||||
-- 2. The vehicles should spawn according the scheduler parameters.
|
||||
-- 3. There should not be more than 5 groups spawned.
|
||||
-- 4. Observe that the AI is inactivated, and thus, the vehicles aren't moving.
|
||||
-- 5. Observe that the position where the units are spawned, is randomized in the zones perimeters.
|
||||
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Create a zone table of the 2 zones.
|
||||
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
|
||||
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeRoute( 1, 1, 200 )
|
||||
:InitRandomizeZones( ZoneTable )
|
||||
:InitAIOnOff( false ) -- This will disable the AI. You can also use :InitAIOff(). Set AI On (for those groups with AI Off in the ME), with :InitAIOn().
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
@ -1,28 +1,28 @@
|
||||
---
|
||||
-- Name: SPA-018 - Ground Ops - Randomize Templates
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned with randomized templates.
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Create a zone table of the 2 zones.
|
||||
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
|
||||
|
||||
TemplateTable = { "A", "B", "C" }
|
||||
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeRoute( 1, 1, 200 )
|
||||
:InitRandomizeTemplate( TemplateTable )
|
||||
--:InitRandomizeZones( ZoneTable )
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
---
|
||||
-- Name: SPA-018 - Ground Ops - Randomize Templates
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 10 Jan 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned with randomized templates.
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Create a zone table of the 2 zones.
|
||||
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
|
||||
|
||||
TemplateTable = { "A", "B", "C" }
|
||||
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeRoute( 1, 1, 200 )
|
||||
:InitRandomizeTemplate( TemplateTable )
|
||||
--:InitRandomizeZones( ZoneTable )
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
@ -1,27 +1,27 @@
|
||||
---
|
||||
-- Name: SPA-019 - Ground Ops - Randomize Templates with Waypoints
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 24 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned with randomized templates.
|
||||
-- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other.
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Create a zone table of the 2 zones.
|
||||
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
|
||||
|
||||
TemplateTable = { "A", "B", "C" }
|
||||
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeTemplate( TemplateTable )
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
---
|
||||
-- Name: SPA-019 - Ground Ops - Randomize Templates with Waypoints
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 24 Feb 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the ground vehicles are spawned with randomized templates.
|
||||
-- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other.
|
||||
|
||||
|
||||
-- Tests Gudauta
|
||||
-- -------------
|
||||
-- Create a zone table of the 2 zones.
|
||||
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
|
||||
|
||||
TemplateTable = { "A", "B", "C" }
|
||||
|
||||
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
|
||||
:InitLimit( 10, 10 )
|
||||
:InitRandomizeTemplate( TemplateTable )
|
||||
:SpawnScheduled( 5, .5 )
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user