Trying to get the dependency on EVENTs solved.
@ -425,7 +425,7 @@ function EVENT:Init( EventID, EventClass )
|
||||
-- Each event has a subtable of EventClasses, ordered by EventPriority.
|
||||
local EventPriority = EventClass:GetEventPriority()
|
||||
if not self.Events[EventID][EventPriority] then
|
||||
self.Events[EventID][EventPriority] = setmetatable( {}, { __mode = "k" } )
|
||||
self.Events[EventID][EventPriority] = setmetatable( {}, { __mode = "kv" } )
|
||||
end
|
||||
|
||||
if not self.Events[EventID][EventPriority][EventClass] then
|
||||
|
||||
@ -940,46 +940,49 @@ do -- DETECTION_BASE
|
||||
local DetectedUnit = DetectedSet:GetFirst()
|
||||
|
||||
DetectedItem.FriendliesNearBy = false
|
||||
|
||||
if DetectedUnit then
|
||||
|
||||
local SphereSearch = {
|
||||
id = world.VolumeType.SPHERE,
|
||||
params = {
|
||||
point = DetectedUnit:GetVec3(),
|
||||
radius = 6000,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
--- @param Dcs.DCSWrapper.Unit#Unit FoundDCSUnit
|
||||
-- @param Wrapper.Group#GROUP ReportGroup
|
||||
-- @param Set#SET_GROUP ReportSetGroup
|
||||
local FindNearByFriendlies = function( FoundDCSUnit, ReportGroupData )
|
||||
local SphereSearch = {
|
||||
id = world.VolumeType.SPHERE,
|
||||
params = {
|
||||
point = DetectedUnit:GetVec3(),
|
||||
radius = 6000,
|
||||
}
|
||||
|
||||
local DetectedItem = ReportGroupData.DetectedItem -- Functional.Detection#DETECTION_BASE.DetectedItem
|
||||
local DetectedSet = ReportGroupData.DetectedItem.Set
|
||||
local DetectedUnit = DetectedSet:GetFirst() -- Wrapper.Unit#UNIT
|
||||
local ReportSetGroup = ReportGroupData.ReportSetGroup
|
||||
|
||||
local EnemyCoalition = DetectedUnit:GetCoalition()
|
||||
|
||||
local FoundUnitCoalition = FoundDCSUnit:getCoalition()
|
||||
local FoundUnitName = FoundDCSUnit:getName()
|
||||
local FoundUnitGroupName = FoundDCSUnit:getGroup():getName()
|
||||
local EnemyUnitName = DetectedUnit:GetName()
|
||||
local FoundUnitInReportSetGroup = ReportSetGroup:FindGroup( FoundUnitGroupName ) ~= nil
|
||||
|
||||
self:T3( { "Friendlies search:", FoundUnitName, FoundUnitCoalition, EnemyUnitName, EnemyCoalition, FoundUnitInReportSetGroup } )
|
||||
|
||||
if FoundUnitCoalition ~= EnemyCoalition and FoundUnitInReportSetGroup == false then
|
||||
DetectedItem.FriendliesNearBy = true
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
--- @param Dcs.DCSWrapper.Unit#Unit FoundDCSUnit
|
||||
-- @param Wrapper.Group#GROUP ReportGroup
|
||||
-- @param Set#SET_GROUP ReportSetGroup
|
||||
local FindNearByFriendlies = function( FoundDCSUnit, ReportGroupData )
|
||||
|
||||
local DetectedItem = ReportGroupData.DetectedItem -- Functional.Detection#DETECTION_BASE.DetectedItem
|
||||
local DetectedSet = ReportGroupData.DetectedItem.Set
|
||||
local DetectedUnit = DetectedSet:GetFirst() -- Wrapper.Unit#UNIT
|
||||
local ReportSetGroup = ReportGroupData.ReportSetGroup
|
||||
|
||||
world.searchObjects( Object.Category.UNIT, SphereSearch, FindNearByFriendlies, ReportGroupData )
|
||||
|
||||
local EnemyCoalition = DetectedUnit:GetCoalition()
|
||||
|
||||
local FoundUnitCoalition = FoundDCSUnit:getCoalition()
|
||||
local FoundUnitName = FoundDCSUnit:getName()
|
||||
local FoundUnitGroupName = FoundDCSUnit:getGroup():getName()
|
||||
local EnemyUnitName = DetectedUnit:GetName()
|
||||
local FoundUnitInReportSetGroup = ReportSetGroup:FindGroup( FoundUnitGroupName ) ~= nil
|
||||
|
||||
self:T3( { "Friendlies search:", FoundUnitName, FoundUnitCoalition, EnemyUnitName, EnemyCoalition, FoundUnitInReportSetGroup } )
|
||||
|
||||
if FoundUnitCoalition ~= EnemyCoalition and FoundUnitInReportSetGroup == false then
|
||||
DetectedItem.FriendliesNearBy = true
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
world.searchObjects( Object.Category.UNIT, SphereSearch, FindNearByFriendlies, ReportGroupData )
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170317_1239' )
|
||||
env.info( 'Moose Generation Timestamp: 20170317_1402' )
|
||||
|
||||
local base = _G
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170317_1239' )
|
||||
env.info( 'Moose Generation Timestamp: 20170317_1402' )
|
||||
|
||||
local base = _G
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
|
||||
|
||||
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
|
||||
|
||||
local Scoring = SCORING:New( "Detect Demo" )
|
||||
Scoring = SCORING:New( "Detect Demo" )
|
||||
|
||||
local Mission = MISSION
|
||||
:New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED )
|
||||
|
||||
BIN
docs/Presentations/TASK_DISPATCHER/Dia1.JPG
Normal file
|
After Width: | Height: | Size: 202 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia10.JPG
Normal file
|
After Width: | Height: | Size: 231 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia11.JPG
Normal file
|
After Width: | Height: | Size: 224 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia12.JPG
Normal file
|
After Width: | Height: | Size: 170 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia13.JPG
Normal file
|
After Width: | Height: | Size: 195 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia14.JPG
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia15.JPG
Normal file
|
After Width: | Height: | Size: 200 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia16.JPG
Normal file
|
After Width: | Height: | Size: 240 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia17.JPG
Normal file
|
After Width: | Height: | Size: 208 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia18.JPG
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia2.JPG
Normal file
|
After Width: | Height: | Size: 203 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia3.JPG
Normal file
|
After Width: | Height: | Size: 223 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia4.JPG
Normal file
|
After Width: | Height: | Size: 209 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia5.JPG
Normal file
|
After Width: | Height: | Size: 205 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia6.JPG
Normal file
|
After Width: | Height: | Size: 248 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia7.JPG
Normal file
|
After Width: | Height: | Size: 225 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia8.JPG
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
docs/Presentations/TASK_DISPATCHER/Dia9.JPG
Normal file
|
After Width: | Height: | Size: 251 KiB |