Publish reworked missions with global variables

This commit is contained in:
FlightControl
2017-03-18 14:42:03 +01:00
parent 553ceb462e
commit cd69b8a879
195 changed files with 294 additions and 293 deletions

View File

@@ -10,24 +10,24 @@
-- # Test cases:
--
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_UNITS:New( FACSet )
FACAreas = DETECTION_UNITS:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
local TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...
@@ -43,4 +43,4 @@ function Mission:OnBeforeComplete( From, Event, To )
return true
end
return false
end
end

View File

@@ -15,21 +15,21 @@
-- For test, each zone will have a circle of tyres, that are visible on the map too.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_AREAS:New( FACSet, 500 )
FACAreas = DETECTION_AREAS:New( FACSet, 500 )
FACAreas:BoundDetectedZones()
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
local TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, HQ, AttackGroups, FACAreas )
AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, HQ, AttackGroups, FACAreas )

View File

@@ -15,21 +15,21 @@
-- For test, each zone will have a circle of tyres, that are visible on the map too.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_AREAS:New( FACSet, 500 )
FACAreas = DETECTION_AREAS:New( FACSet, 500 )
FACAreas:BoundDetectedZones()
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
local TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, HQ, AttackGroups, FACAreas )
AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, HQ, AttackGroups, FACAreas )

View File

@@ -15,21 +15,21 @@
-- For test, each zone will have a circle of tyres, that are visible on the map too.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
local Scoring = SCORING:New( "Detect Demo" )
Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_TYPES:New( FACSet )
FACAreas = DETECTION_TYPES:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
local TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, HQ, AttackGroups, FACAreas )
AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, HQ, AttackGroups, FACAreas )

View File

@@ -14,24 +14,24 @@
-- 1. Observe the FAC(A)'s detecting targets and grouping them.
-- 2. Check that the HQ provides menus to engage on a task set by the FACs.
--
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
Scoring = SCORING:New( "Detect Demo" )
local Mission = MISSION
Mission = MISSION
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
:AddScoring( Scoring )
local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart()
local FACAreas = DETECTION_UNITS:New( FACSet )
FACAreas = DETECTION_UNITS:New( FACSet )
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
local TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas )
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
-- This is just an example, but many more examples can follow...