mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Updates
This commit is contained in:
parent
4fcb7be9fc
commit
0eb9d1917b
@ -112,7 +112,7 @@ function DATABASE:New()
|
||||
|
||||
self.UNITS_Position = 0
|
||||
|
||||
--- @param Wrapper.Unit#UNIT PlayerUnit
|
||||
--- @param #DATABASE self
|
||||
local function CheckPlayers( self )
|
||||
|
||||
local UNITS_Count = #self.UNITS_Index
|
||||
@ -122,12 +122,12 @@ function DATABASE:New()
|
||||
if PlayerUnit then
|
||||
local UnitName = PlayerUnit:GetName()
|
||||
local PlayerName = PlayerUnit:GetPlayerName()
|
||||
self:E( { UNITS_Count, self.UNITS_Position, UnitName, PlayerName } )
|
||||
--self:E( { UNITS_Count, self.UNITS_Position, UnitName, PlayerName } )
|
||||
if PlayerName and PlayerName ~= "" then
|
||||
if not self.PLAYERS[PlayerName] or self.PLAYERS[PlayerName] ~= PlayerUnit then
|
||||
if self.PLAYERS[PlayerName] == nil or self.PLAYERS[PlayerName] ~= UnitName then
|
||||
self:E( { "Add player for unit:", UnitName, PlayerName } )
|
||||
self:AddPlayer( UnitName, PlayerName )
|
||||
_EVENTDISPATCHER:CreateEventPlayerEnterUnit( PlayerUnit )
|
||||
--_EVENTDISPATCHER:CreateEventPlayerEnterUnit( PlayerUnit )
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -135,7 +135,7 @@ function DATABASE:New()
|
||||
end
|
||||
|
||||
self:E( "Scheduling" )
|
||||
local PlayerCheckSchedule = SCHEDULER:New( nil, CheckPlayers, { self }, 2, 0.05 )
|
||||
local PlayerCheckSchedule = SCHEDULER:New( nil, CheckPlayers, { self }, 2, 0.1 )
|
||||
|
||||
return self
|
||||
end
|
||||
@ -311,7 +311,7 @@ function DATABASE:AddPlayer( UnitName, PlayerName )
|
||||
|
||||
if PlayerName then
|
||||
self:E( { "Add player for unit:", UnitName, PlayerName } )
|
||||
self.PLAYERS[PlayerName] = self:FindUnit( UnitName )
|
||||
self.PLAYERS[PlayerName] = UnitName
|
||||
self.PLAYERSJOINED[PlayerName] = PlayerName
|
||||
end
|
||||
end
|
||||
|
||||
@ -780,9 +780,9 @@ do
|
||||
self = MenuGroup._Menus[Path]
|
||||
else
|
||||
self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) )
|
||||
if MenuGroup:IsAlive() then
|
||||
--if MenuGroup:IsAlive() then
|
||||
MenuGroup._Menus[Path] = self
|
||||
end
|
||||
--end
|
||||
|
||||
self.MenuGroup = MenuGroup
|
||||
self.Path = Path
|
||||
@ -886,9 +886,9 @@ do
|
||||
else
|
||||
self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) )
|
||||
|
||||
if MenuGroup:IsAlive() then
|
||||
--if MenuGroup:IsAlive() then
|
||||
MenuGroup._Menus[Path] = self
|
||||
end
|
||||
--end
|
||||
|
||||
self.Path = Path
|
||||
self.MenuGroup = MenuGroup
|
||||
|
||||
@ -76,6 +76,7 @@ do -- DETECTION MANAGER
|
||||
self:SetReportInterval( 30 )
|
||||
self:SetReportDisplayTime( 25 )
|
||||
|
||||
self:E( { Detection = Detection } )
|
||||
Detection:__Start( 1 )
|
||||
|
||||
return self
|
||||
|
||||
@ -549,7 +549,7 @@ function MISSION:GetTasksRemaining()
|
||||
local TasksRemaining = 0
|
||||
for TaskID, Task in pairs( self:GetTasks() ) do
|
||||
local Task = Task -- Tasking.Task#TASK
|
||||
if Task:IsStateSuccess() or Task:IsStateFAILED() then
|
||||
if Task:IsStateSuccess() or Task:IsStateFailed() then
|
||||
else
|
||||
TasksRemaining = TasksRemaining + 1
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user