Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl

# Conflicts:
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
This commit is contained in:
FlightControl
2017-03-05 09:37:06 +01:00
9 changed files with 179 additions and 10 deletions

View File

@@ -0,0 +1,32 @@
---
-- 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" )
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
local ZoneA = ZONE:New( "Zone A" )
ZoneA:BoundZone( 90 )
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 )
if GroupInside:IsCompletelyInZone( ZoneA ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )

View File

@@ -0,0 +1,33 @@
---
-- Name: ZON-502 - Polygon Zone Boundary
-- Author: FlightControl
-- Date Created: 18 Feb 2017
--
-- # Situation:
--
-- A ZONE_POLYGON has been defined, which boundaries are tires.
-- 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" )
local GroupPolygon = GROUP:FindByName( "Polygon A" )
local PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon )
PolygonZone:BoundZone()
Messager = SCHEDULER:New( nil,
function()
GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 )
if GroupInside:IsCompletelyInZone( PolygonZone ) then
GroupInside:GetUnit(1):SmokeRed()
end
end,
{}, 0, 1 )