diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index 11d5110d5..85a167b36 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -184,7 +184,7 @@ function GROUP:IsAlive() local DCSGroup = self:GetDCSObject() if DCSGroup then - local GroupIsAlive = DCSGroup:isExist() + local GroupIsAlive = DCSGroup:isExist() and DCSGroup:getUnit(1) ~= nil self:T3( GroupIsAlive ) return GroupIsAlive end diff --git a/Moose Development/Moose/XXX - Header Template.lua b/Moose Development/Moose/XXX - Header Template.lua new file mode 100644 index 000000000..c25e774fa --- /dev/null +++ b/Moose Development/Moose/XXX - Header Template.lua @@ -0,0 +1,14 @@ +--- +-- Name: XXX-999 - Title +-- Author: YYY +-- Date Created: DD Mmm YYYY +-- +-- # Situation: +-- +-- +-- +-- # Test cases: +-- +-- 1. + + diff --git a/Moose Test Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua b/Moose Test Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua new file mode 100644 index 000000000..7f33d42f2 --- /dev/null +++ b/Moose Test Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua @@ -0,0 +1,32 @@ +--- +-- Name: GRP-100 - IsAlive +-- Author: FlightControl +-- Date Created: 23 Feb 2017 +-- +-- # Situation: +-- +-- This test is about checking if IsAlive on GROUP level is working correctly. +-- Two ground forces GROUPS are shooting each other. +-- Check the IsAlive status in the logging of the survivor and the defeat. +-- +-- # Test cases: +-- +-- 1. Observe the IsAlive statuses in the dcs.log file. + + + +--Create Spawn Groups +local GroupBlue = GROUP:FindByName( "Blue" ) +local GroupRed = GROUP:FindByName( "Red" ) + +local Schedule, ScheduleID = SCHEDULER:New( nil, + --- Variable Declarations + -- @param Wrapper.Group#GROUP GroupBlue + -- @param Wrapper.Group#GROUP GroupRed + function( GroupBlue, GroupRed ) + local IsAliveBlue = GroupBlue:IsAlive() + local IsAliveRed = GroupRed:IsAlive() + BASE:E( { IsAliveBlue = IsAliveBlue, IsAliveRed = IsAliveRed } ) + end, { GroupBlue, GroupRed }, 1, 1 +) + diff --git a/Moose Test Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz b/Moose Test Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz new file mode 100644 index 000000000..162e39f32 Binary files /dev/null and b/Moose Test Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua b/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua index 0bcb21604..3eb735f3b 100644 --- a/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua +++ b/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua @@ -1,6 +1,18 @@ - - - +--- +-- Name: ZON-100 - Normal Zone +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. local GroupInside = GROUP:FindByName( "Test Inside Polygon" ) diff --git a/Moose Test Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz b/Moose Test Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz index 6af4a527d..b86c3f37e 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz and b/Moose Test Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua b/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua index 795853b5a..c1f996278 100644 --- a/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua +++ b/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua @@ -1,3 +1,19 @@ +--- +-- Name: ZON-200 - Group Zone +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE_GROUP has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + local GroupInside = GROUP:FindByName( "Test Inside Polygon" ) local GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) diff --git a/Moose Test Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz b/Moose Test Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz index a52ef23db..6e7bffdfe 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz and b/Moose Test Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua b/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua index 20790003f..059af186d 100644 --- a/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua +++ b/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua @@ -1,3 +1,18 @@ +--- +-- Name: ZON-300 - Unit Zone +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE_UNIT has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the zone perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. local GroupInside = GROUP:FindByName( "Test Inside Polygon" ) local GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) diff --git a/Moose Test Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz b/Moose Test Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz index 2c0d5beed..36ae67f4e 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz and b/Moose Test Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua b/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua index 07cfc8515..bb887fe4b 100644 --- a/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua +++ b/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua @@ -1,7 +1,18 @@ - - - - +--- +-- Name: ZON-400 - Radius Zone +-- Author: FlightControl +-- Date Created: 21 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE_RADIUS has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the polygon perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. local GroupInside = GROUP:FindByName( "Test Inside Polygon" ) local GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) diff --git a/Moose Test Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz b/Moose Test Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz index 3c187ce3f..e21687408 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz and b/Moose Test Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua b/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua index 50334ba5e..0ca6fc8c7 100644 --- a/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua +++ b/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua @@ -1,8 +1,19 @@ - - - - - +--- +-- Name: ZON-500 - Polygon Zone +-- Author: FlightControl +-- Date Created: 18 Feb 2017 +-- +-- # Situation: +-- +-- A ZONE_POLYGON has been defined, which boundaries are smoking. +-- A vehicle is driving through the zone perimeters. +-- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. +-- +-- # Test cases: +-- +-- 1. Observe the polygon perimeter smoke. +-- 2. Observe the vehicle smoking a red smoke when driving through the zone. + local GroupInside = GROUP:FindByName( "Test Inside Polygon" ) local GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) diff --git a/Moose Test Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz b/Moose Test Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz index 9b9803f24..ca9c15903 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz and b/Moose Test Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz differ