Updated Moose.lua

This commit is contained in:
funkyfranky
2022-10-11 19:30:16 +00:00
parent 192d4710a2
commit 9f91de26ca
982 changed files with 22665 additions and 22625 deletions

View File

@@ -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()

View File

@@ -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 )

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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

View File

@@ -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()