diff --git a/Moose Test Missions/AI Balancer/AIBALANCER - Spawned AI/AIBALANCER - Spawned AI.lua b/Moose Test Missions/AIB - AI Balancer/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua similarity index 95% rename from Moose Test Missions/AI Balancer/AIBALANCER - Spawned AI/AIBALANCER - Spawned AI.lua rename to Moose Test Missions/AIB - AI Balancer/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua index e9692de61..0fac8ac6c 100644 --- a/Moose Test Missions/AI Balancer/AIBALANCER - Spawned AI/AIBALANCER - Spawned AI.lua +++ b/Moose Test Missions/AIB - AI Balancer/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua @@ -4,7 +4,7 @@ -- -- Name: Spawned AI -- Author: FlightControl --- Date Created: 7 December 2016 +-- Date Created: 07 Dec 2016 -- -- # Situation: -- @@ -19,6 +19,8 @@ -- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. -- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. -- +-- # Status: TESTED 07 Dec 2016 +-- -- @module TEST.AIBALANCER.T001 -- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. diff --git a/Moose Test Missions/AI Balancer/AIBALANCER - Spawned AI/AIBALANCER - Spawned AI.miz b/Moose Test Missions/AIB - AI Balancer/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz similarity index 100% rename from Moose Test Missions/AI Balancer/AIBALANCER - Spawned AI/AIBALANCER - Spawned AI.miz rename to Moose Test Missions/AIB - AI Balancer/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz diff --git a/Moose Test Missions/AIB - AI Balancer/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua b/Moose Test Missions/AIB - AI Balancer/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua new file mode 100644 index 000000000..7adb52067 --- /dev/null +++ b/Moose Test Missions/AIB - AI Balancer/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua @@ -0,0 +1,38 @@ +--- AI Patrolling +-- +-- === +-- +-- Name: Patrol AI +-- Author: FlightControl +-- Date Created: 7 December 2016 +-- +-- # Situation: +-- +-- For the red coalition, 2 client slots are foreseen. +-- For those players that have not joined the mission, red AI is spawned. +-- The red AI should start patrolling an area until fuel is empty and return to the home base. +-- +-- # Test cases: +-- +-- 1. If no player is logging into the red slots, 2 red AI planes should be alive. +-- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. +-- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. +-- 4. Spawned AI should take-off from the airbase, and start patrolling the area around Anapa. +-- 5. When the AI is out-of-fuel, it should report it is returning to the home base, and land at Anapa. +-- +-- # Status: DEVELOP 07 Dec 2016 +-- +-- @module TEST.AIBALANCER.T002 + +-- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. +local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ):FilterStart() + +-- Define the SPAWN object for the red AI plane template. +-- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. +-- If a blocked plane exists, this red plane will be ReSpawned. +local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) + +-- Start the AIBALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. +local RU_AIBalancer = AIBALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) + +function RU_AIBalancer:OnAfterSpawn() \ No newline at end of file diff --git a/Moose Test Missions/AIB - AI Balancer/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz b/Moose Test Missions/AIB - AI Balancer/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz new file mode 100644 index 000000000..b0fc85ea2 Binary files /dev/null and b/Moose Test Missions/AIB - AI Balancer/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz differ diff --git a/Moose Test Missions/AI Balancer/AIBALANCER - Two coalitions InitCleanUp test/AIBALANCER - Two coalitions InitCleanUp test.lua b/Moose Test Missions/AIB - AI Balancer/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua similarity index 100% rename from Moose Test Missions/AI Balancer/AIBALANCER - Two coalitions InitCleanUp test/AIBALANCER - Two coalitions InitCleanUp test.lua rename to Moose Test Missions/AIB - AI Balancer/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua diff --git a/Moose Test Missions/AI Balancer/AIBALANCER - Two coalitions InitCleanUp test/AIBALANCER - Two coalitions InitCleanUp test.miz b/Moose Test Missions/AIB - AI Balancer/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz similarity index 100% rename from Moose Test Missions/AI Balancer/AIBALANCER - Two coalitions InitCleanUp test/AIBALANCER - Two coalitions InitCleanUp test.miz rename to Moose Test Missions/AIB - AI Balancer/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz