Last step of bid folder restructure

This commit is contained in:
kaltokri
2024-01-01 23:45:14 +01:00
parent 3aee942510
commit d0ce19b779
500 changed files with 6601 additions and 6601 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +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()
BlueAirbaseShipSet:Flush()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +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 )

View File

@@ -0,0 +1,24 @@
---
-- Name: ZON-103 - Test if GROUP object is in ZONE
-- Author: FlightControl
-- Date Created: 31 Mar 2017
--
-- # Situation:
--
-- A ZONE has been defined, and it is checked if a GROUP object is within the zone.
--
-- # Test cases:
--
-- 1. Observe the zone perimeter, and place the GROUP object in or out of the zone.
-- 2. Observe the results of the functions.
GroupObject = GROUP:FindByName( "Group Object" )
Zone = ZONE:New( "Zone" )
Zone:E( { "Group is completely in Zone:", GroupObject:IsCompletelyInZone( Zone ) } )
Zone:E( { "Group is partially in Zone:", GroupObject:IsPartlyInZone( Zone ) } )
Zone:E( { "Group is not in Zone:", GroupObject:IsNotInZone( Zone ) } )

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +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()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
SetClient = SET_CLIENT:New():FilterCoalitions("blue"):FilterCategories("plane"):FilterCountries("USA"):FilterStart()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,163 @@
SetVehicles = SET_GROUP:New()
SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } )
SetVehicles:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeGreen()
end
end
)
SetBluePlanesGroup = SET_GROUP:New()
:FilterCoalitions( "blue" )
:FilterCategories( "plane" )
:FilterStart()
SetNorthKoreaGroup = SET_GROUP:New()
:FilterCountries( "RUSSIA" )
:FilterStart()
SetSAMGroup = SET_GROUP:New()
:FilterPrefixes( "SAM" )
:FilterStart()
:SetIteratorIntervals( 5, 10 )
SetGroundGroup = SET_GROUP:New()
:FilterCategories( "ground" )
:FilterStart()
SetGroundGroup:Flush()
SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane')
GroupUS_Plane = SpawnUS_Plane:Spawn()
SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle')
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship')
GroupUS_Ship = SpawnUS_Ship:Spawn()
SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle')
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship')
GroupRU_Ship = SpawnRU_Ship:Spawn()
SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
for i = 1, 30 do
GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
end
SetVehicleCompletely = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Completely" )
:FilterStart()
SetVehiclePartly = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Partly" )
:FilterStart()
SetVehicleNot = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Not" )
:FilterStart()
Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4)
Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 )
Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 )
for i = 1, 30 do
Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") )
Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") )
Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") )
end
--DBBlue:TraceDatabase()
--SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 )
--SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 )
--SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 )
--SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 )
--SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 )
--SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 )
--
--SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 )
--SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 )
SetBluePlanesGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue()
end
end
)
SetNorthKoreaGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeRed()
end
end
)
SetSAMGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeOrange()
end
end
)
GroupZoneCompletely = GROUP:FindByName( "Zone Completely" )
GroupZonePartly = GROUP:FindByName( "Zone Partly" )
GroupZoneNot = GROUP:FindByName( "Zone Not" )
ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White )
ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White )
ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White )
SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely,
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue()
end
end
)
SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly,
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue()
end
end
)
SetVehicleNot:ForEachGroupNotInZone( ZoneNot,
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue()
end
end
)

View File

@@ -0,0 +1,31 @@
-- Create a group set.
SetVehicles = SET_GROUP:New()
-- Add groups by name to the set.
SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } )
-- For each unit in the set, smoke the unit green. So, for each unit in the 3 groups within the set, the smoke will be triggered.
SetVehicles:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeGreen()
end
end
)
-- Now we remove Vehicle A.
SetVehicles:RemoveGroupsByName( { "Vehicle A" } )
-- So Vehicle A should not be smoking now in a red color.
SetVehicles:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeRed()
end
end
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,163 @@
SetVehicles = SET_GROUP:New()
SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } )
SetVehicles:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeGreen()
end
end
)
SetBluePlanesGroup = SET_GROUP:New()
:FilterCoalitions( "blue" )
:FilterCategories( "plane" )
:FilterStart()
SetNorthKoreaGroup = SET_GROUP:New()
:FilterCountries( "RUSSIA" )
:FilterStart()
SetSAMGroup = SET_GROUP:New()
:FilterPrefixes( "SAM" )
:FilterStart()
:SetIteratorIntervals( 5, 10 )
SetGroundGroup = SET_GROUP:New()
:FilterCategories( "ground" )
:FilterStart()
SetGroundGroup:Flush()
SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane')
GroupUS_Plane = SpawnUS_Plane:Spawn()
SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle')
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship')
GroupUS_Ship = SpawnUS_Ship:Spawn()
SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle')
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship')
GroupRU_Ship = SpawnRU_Ship:Spawn()
SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
for i = 1, 30 do
GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
end
SetVehicleCompletely = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Completely" )
:FilterStart()
SetVehiclePartly = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Partly" )
:FilterStart()
SetVehicleNot = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Not" )
:FilterStart()
Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4)
Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 )
Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 )
for i = 1, 30 do
Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") )
Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") )
Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") )
end
--DBBlue:TraceDatabase()
--SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 )
--SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 )
--SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 )
--SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 )
--SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 )
--SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 )
--
--SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 )
--SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 )
SetBluePlanesGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue()
end
end
)
SetNorthKoreaGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeRed()
end
end
)
SetSAMGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeOrange()
end
end
)
GroupZoneCompletely = GROUP:FindByName( "Zone Completely" )
GroupZonePartly = GROUP:FindByName( "Zone Partly" )
GroupZoneNot = GROUP:FindByName( "Zone Not" )
ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White )
ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White )
ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White )
SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely,
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue()
end
end
)
SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly,
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue()
end
end
)
SetVehicleNot:ForEachGroupNotInZone( ZoneNot,
--- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue()
end
end
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +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()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +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()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
SetUnit:Flush()
SetUnit:I(SetUnit:Count())

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
SetUnit:Flush()
SetUnit:I( { Count = SetUnit:Count() } )
SCHEDULER:New( nil,
function()
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
SetUnit:Flush()
SetUnit:I( { Count = SetUnit:Count() } )
end, {}, 60 )

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +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()
end

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +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()