mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
- Inherit ZONE_BASE from FSM instead of BASE. Opens a range of possibilities.
- Remove from ZONE_GOAL the Zone field, and make it inherit from ZONE_BASE instead of FSM! - Rework the new inheritance tree in the code. (Remove .Zone fields). - Implement the determination of attack and defense zones. - Reworked the TaskInfo to include Type and ShowKey. - Flash A2G Tasking Details. Added menu option.
This commit is contained in:
@@ -214,6 +214,26 @@ do -- TASK_CAPTURE_DISPATCHER
|
||||
end
|
||||
|
||||
|
||||
--- Link an AI A2G dispatcher from the other coalition to understand its plan for defenses.
|
||||
-- This is used for the tactical overview, so the players also know the zones attacked by the other AI A2G dispatcher!
|
||||
-- @param #TASK_CAPTURE_DISPATCHER self
|
||||
-- @param AI.AI_A2G_Dispatcher#AI_A2G_DISPATCHER DefenseAIA2GDispatcher
|
||||
function TASK_CAPTURE_DISPATCHER:SetDefenseAIA2GDispatcher( DefenseAIA2GDispatcher )
|
||||
|
||||
self.DefenseAIA2GDispatcher = DefenseAIA2GDispatcher
|
||||
end
|
||||
|
||||
|
||||
--- Get the linked AI A2G dispatcher from the other coalition to understand its plan for defenses.
|
||||
-- This is used for the tactical overview, so the players also know the zones attacked by the AI A2G dispatcher!
|
||||
-- @param #TASK_CAPTURE_DISPATCHER self
|
||||
-- @return AI.AI_A2G_Dispatcher#AI_A2G_DISPATCHER
|
||||
function TASK_CAPTURE_DISPATCHER:GetDefenseAIA2GDispatcher()
|
||||
|
||||
return self.DefenseAIA2GDispatcher
|
||||
end
|
||||
|
||||
|
||||
--- Add a capture zone task.
|
||||
-- @param #TASK_CAPTURE_DISPATCHER self
|
||||
-- @param #string TaskPrefix (optional) The prefix of the capture zone task.
|
||||
@@ -303,6 +323,7 @@ do -- TASK_CAPTURE_DISPATCHER
|
||||
self.AI_A2G_Dispatcher:Unlock( Task.TaskZoneName ) -- This will unlock the zone to be defended by AI.
|
||||
end
|
||||
CaptureZone.Task:UpdateTaskInfo()
|
||||
CaptureZone.Task.ZoneGoal.Attacked = true
|
||||
end
|
||||
|
||||
function CaptureZone.Task.OnEnterSuccess( Task, From, Event, To )
|
||||
@@ -311,6 +332,7 @@ do -- TASK_CAPTURE_DISPATCHER
|
||||
self.AI_A2G_Dispatcher:Lock( Task.TaskZoneName ) -- This will lock the zone from being defended by AI.
|
||||
end
|
||||
CaptureZone.Task:UpdateTaskInfo()
|
||||
CaptureZone.Task.ZoneGoal.Attacked = false
|
||||
end
|
||||
|
||||
function CaptureZone.Task.OnEnterCancelled( Task, From, Event, To )
|
||||
@@ -319,6 +341,7 @@ do -- TASK_CAPTURE_DISPATCHER
|
||||
self.AI_A2G_Dispatcher:Lock( Task.TaskZoneName ) -- This will lock the zone from being defended by AI.
|
||||
end
|
||||
CaptureZone.Task:UpdateTaskInfo()
|
||||
CaptureZone.Task.ZoneGoal.Attacked = false
|
||||
end
|
||||
|
||||
function CaptureZone.Task.OnEnterFailed( Task, From, Event, To )
|
||||
@@ -327,6 +350,7 @@ do -- TASK_CAPTURE_DISPATCHER
|
||||
self.AI_A2G_Dispatcher:Lock( Task.TaskZoneName ) -- This will lock the zone from being defended by AI.
|
||||
end
|
||||
CaptureZone.Task:UpdateTaskInfo()
|
||||
CaptureZone.Task.ZoneGoal.Attacked = false
|
||||
end
|
||||
|
||||
function CaptureZone.Task.OnEnterAborted( Task, From, Event, To )
|
||||
@@ -335,6 +359,7 @@ do -- TASK_CAPTURE_DISPATCHER
|
||||
self.AI_A2G_Dispatcher:Lock( Task.TaskZoneName ) -- This will lock the zone from being defended by AI.
|
||||
end
|
||||
CaptureZone.Task:UpdateTaskInfo()
|
||||
CaptureZone.Task.ZoneGoal.Attacked = false
|
||||
end
|
||||
|
||||
-- Now broadcast the onafterCargoPickedUp event to the Task Cargo Dispatcher.
|
||||
@@ -344,6 +369,7 @@ do -- TASK_CAPTURE_DISPATCHER
|
||||
self.AI_A2G_Dispatcher:Lock( Task.TaskZoneName ) -- This will lock the zone from being defended by AI.
|
||||
end
|
||||
CaptureZone.Task:UpdateTaskInfo()
|
||||
CaptureZone.Task.ZoneGoal.Attacked = false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user