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
|
self.UNITS_Position = 0
|
||||||
|
|
||||||
--- @param Wrapper.Unit#UNIT PlayerUnit
|
--- @param #DATABASE self
|
||||||
local function CheckPlayers( self )
|
local function CheckPlayers( self )
|
||||||
|
|
||||||
local UNITS_Count = #self.UNITS_Index
|
local UNITS_Count = #self.UNITS_Index
|
||||||
@ -122,12 +122,12 @@ function DATABASE:New()
|
|||||||
if PlayerUnit then
|
if PlayerUnit then
|
||||||
local UnitName = PlayerUnit:GetName()
|
local UnitName = PlayerUnit:GetName()
|
||||||
local PlayerName = PlayerUnit:GetPlayerName()
|
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 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:E( { "Add player for unit:", UnitName, PlayerName } )
|
||||||
self:AddPlayer( UnitName, PlayerName )
|
self:AddPlayer( UnitName, PlayerName )
|
||||||
_EVENTDISPATCHER:CreateEventPlayerEnterUnit( PlayerUnit )
|
--_EVENTDISPATCHER:CreateEventPlayerEnterUnit( PlayerUnit )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -135,7 +135,7 @@ function DATABASE:New()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self:E( "Scheduling" )
|
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
|
return self
|
||||||
end
|
end
|
||||||
@ -311,7 +311,7 @@ function DATABASE:AddPlayer( UnitName, PlayerName )
|
|||||||
|
|
||||||
if PlayerName then
|
if PlayerName then
|
||||||
self:E( { "Add player for unit:", UnitName, PlayerName } )
|
self:E( { "Add player for unit:", UnitName, PlayerName } )
|
||||||
self.PLAYERS[PlayerName] = self:FindUnit( UnitName )
|
self.PLAYERS[PlayerName] = UnitName
|
||||||
self.PLAYERSJOINED[PlayerName] = PlayerName
|
self.PLAYERSJOINED[PlayerName] = PlayerName
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -780,9 +780,9 @@ do
|
|||||||
self = MenuGroup._Menus[Path]
|
self = MenuGroup._Menus[Path]
|
||||||
else
|
else
|
||||||
self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) )
|
self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) )
|
||||||
if MenuGroup:IsAlive() then
|
--if MenuGroup:IsAlive() then
|
||||||
MenuGroup._Menus[Path] = self
|
MenuGroup._Menus[Path] = self
|
||||||
end
|
--end
|
||||||
|
|
||||||
self.MenuGroup = MenuGroup
|
self.MenuGroup = MenuGroup
|
||||||
self.Path = Path
|
self.Path = Path
|
||||||
@ -886,9 +886,9 @@ do
|
|||||||
else
|
else
|
||||||
self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) )
|
self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) )
|
||||||
|
|
||||||
if MenuGroup:IsAlive() then
|
--if MenuGroup:IsAlive() then
|
||||||
MenuGroup._Menus[Path] = self
|
MenuGroup._Menus[Path] = self
|
||||||
end
|
--end
|
||||||
|
|
||||||
self.Path = Path
|
self.Path = Path
|
||||||
self.MenuGroup = MenuGroup
|
self.MenuGroup = MenuGroup
|
||||||
|
|||||||
@ -76,6 +76,7 @@ do -- DETECTION MANAGER
|
|||||||
self:SetReportInterval( 30 )
|
self:SetReportInterval( 30 )
|
||||||
self:SetReportDisplayTime( 25 )
|
self:SetReportDisplayTime( 25 )
|
||||||
|
|
||||||
|
self:E( { Detection = Detection } )
|
||||||
Detection:__Start( 1 )
|
Detection:__Start( 1 )
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|||||||
@ -549,7 +549,7 @@ function MISSION:GetTasksRemaining()
|
|||||||
local TasksRemaining = 0
|
local TasksRemaining = 0
|
||||||
for TaskID, Task in pairs( self:GetTasks() ) do
|
for TaskID, Task in pairs( self:GetTasks() ) do
|
||||||
local Task = Task -- Tasking.Task#TASK
|
local Task = Task -- Tasking.Task#TASK
|
||||||
if Task:IsStateSuccess() or Task:IsStateFAILED() then
|
if Task:IsStateSuccess() or Task:IsStateFailed() then
|
||||||
else
|
else
|
||||||
TasksRemaining = TasksRemaining + 1
|
TasksRemaining = TasksRemaining + 1
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user