New folder structure

This commit is contained in:
kaltokri
2024-01-01 19:37:07 +01:00
parent 05cec43639
commit 6f570db72f
39 changed files with 1210 additions and 1210 deletions
@@ -0,0 +1,23 @@
---
-- Name: CAP-001 - Combat Air Patrol
-- Author: FlightControl
-- Date Created: 16 January 2017
--
-- # Situation:
-- The Su-27 airplane will patrol in PatrolZone.
-- It will not engage any enemy automatically.
--
-- # Test cases:
--
-- 1. Observe the Su-27 patrolling.
--
local CapPlane = GROUP:FindByName( "Plane" )
local PatrolZone = ZONE:New( "Patrol Zone" )
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
AICapZone:SetControllable( CapPlane )
AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone.
@@ -0,0 +1,27 @@
---
-- Name: CAP-010 - CAP and Engage within Range
-- Author: FlightControl
-- Date Created: 16 January 2017
--
-- # Situation:
--
-- The Su-27 airplane will patrol in PatrolZone.
-- It will engage when it detects the airplane and when the A-10C is within the engage range.
--
-- # Test cases:
--
-- 1. Observe the Su-27 patrolling.
-- 2. Observe that, when the A-10C is within the engage range, it will engage.
-- 3. After engage, observe that the Su-27 returns to the PatrolZone.
-- 4. If you want, you can wait until the Su-27 is out of fuel and will land.
CapPlane = GROUP:FindByName( "Plane" )
PatrolZone = ZONE:New( "Patrol Zone" )
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
AICapZone:SetControllable( CapPlane )
AICapZone:SetEngageRange( 20000 ) -- Set the Engage Range to 20.000 meters. The AI won't engage when the enemy is beyond 20.000 meters.
AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone.
@@ -0,0 +1,23 @@
-- Name: CAP-001 - Combat Air Patrol
-- Author: FlightControl
-- Date Created: 16 January 2017
--
-- # Situation:
--
-- # Test cases:
--
local CapPlane = GROUP:FindByName( "Plane" )
local PatrolZone = ZONE:New( "Patrol Zone" )
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
local EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
local CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
AICapZone:SetControllable( CapPlane )
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone.
@@ -0,0 +1,32 @@
---
-- Name: CAP-011 - CAP and Engage within Zone
-- Author: FlightControl
-- Date Created: 16 January 2017
--
-- # Situation:
--
-- The Su-27 airplane will patrol in PatrolZone.
-- It will engage when it detects the airplane and when the A-10C is within the CapEngageZone.
--
-- # Test cases:
--
-- 1. Observe the Su-27 patrolling.
-- 2. Observe that, when the A-10C is within the engage zone, it will engage.
-- 3. After engage, observe that the Su-27 returns to the PatrolZone.
-- 4. If you want, you can wait until the Su-27 is out of fuel and will land.
CapPlane = GROUP:FindByName( "Plane" )
PatrolZone = ZONE:New( "Patrol Zone" )
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
AICapZone:SetControllable( CapPlane )
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone.
@@ -0,0 +1,43 @@
---
-- Name: CAP-012 - CAP - Test Abort
-- Author: FlightControl
-- Date Created: 14 Mar 2017
--
-- # Situation:
--
-- The Su-27 airplane will patrol in PatrolZone.
-- It will engage when it detects the airplane and when the A-10C is within the CapEngageZone.
-- It will abort the engagement after 1 minute and return to the patrol zone.
--
-- # Test cases:
--
-- 1. Observe the Su-27 patrolling.
-- 2. Observe that, when the A-10C is within the engage zone, it will engage.
-- 3. After engage, observe that the Su-27 returns to the PatrolZone.
-- 4. When it engages, it will abort the engagement after 1 minute.
CapPlane = GROUP:FindByName( "Plane" )
PatrolZone = ZONE:New( "Patrol Zone" )
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
AICapZone:SetControllable( CapPlane )
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone.
function AICapZone:OnAfterEngage(Controllable,From,Event,To)
AICapZone:__Abort( 60 )
end
function AICapZone:OnAfterAbort(Controllable,From,Event,To)
BASE:E("MISSION ABORTED! Returning to Patrol Zone!")
MESSAGE:New("MISSION ABORTED! Returning to Patrol Zone!",30,"ALERT!")
end
@@ -0,0 +1,27 @@
---
-- Name: CAP-020 - Combat Air Patrol RTB Test
-- Author: FlightControl
-- Date Created: 14 February 2017
--
-- # Situation:
-- The Su-27 airplane will patrol in PatrolZone.
-- It will return to base when out of fuel.
--
-- # Test cases:
--
-- 1. Observe the Su-27 patrolling.
-- 2. It should return to base when out of fuel.
--
CapSpawn = SPAWN:New( "Plane" ):InitLimit(1,2):InitRepeatOnLanding()
CapGroup = CapSpawn:Spawn()
PatrolZone = ZONE:New( "Patrol Zone" )
AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
AICapZone:SetControllable( CapGroup )
AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone.