mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
- Added a randomization to some of the internal schedulers to ensure that the simulation does not get unnecessary hickups and guarantees more fluent play.
- Added the option SetFlashStatus() to the CommandCenter to ensure flashing of subscribed tasks automatically to inform the player while in-flight. Also extended TASK to ensure the flasing gets initialized once the player joins the task.
This commit is contained in:
parent
14b35cb069
commit
372dd704d2
@ -676,7 +676,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
--BASE:GetParent( self ).onafterGuard( self )
|
||||
|
||||
if not self.SmokeScheduler then
|
||||
self.SmokeScheduler = self:ScheduleRepeat( 1, 1, 0.1, nil, self.StatusSmoke, self )
|
||||
self.SmokeScheduler = self:ScheduleRepeat( self.StartInterval, self.RepeatInterval, 0.1, nil, self.StatusSmoke, self )
|
||||
end
|
||||
end
|
||||
|
||||
@ -747,13 +747,13 @@ do -- ZONE_CAPTURE_COALITION
|
||||
--
|
||||
function ZONE_CAPTURE_COALITION:Start( StartInterval, RepeatInterval )
|
||||
|
||||
StartInterval = StartInterval or 15
|
||||
RepeatInterval = RepeatInterval or 15
|
||||
self.StartInterval = StartInterval or 15
|
||||
self.RepeatInterval = RepeatInterval or 15
|
||||
|
||||
if self.ScheduleStatusZone then
|
||||
self:ScheduleStop( self.ScheduleStatusZone )
|
||||
end
|
||||
self.ScheduleStatusZone = self:ScheduleRepeat( StartInterval, RepeatInterval, 0.1, nil, self.StatusZone, self )
|
||||
self.ScheduleStatusZone = self:ScheduleRepeat( self.StartInterval, self.RepeatInterval, 1.5, nil, self.StatusZone, self )
|
||||
end
|
||||
|
||||
|
||||
|
||||
@ -201,6 +201,7 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName )
|
||||
self:SetAutoAssignTasks( false )
|
||||
self:SetAutoAcceptTasks( true )
|
||||
self:SetAutoAssignMethod( COMMANDCENTER.AutoAssignMethods.Random )
|
||||
self:SetFlashStatus( false )
|
||||
|
||||
self:HandleEvent( EVENTS.Birth,
|
||||
--- @param #COMMANDCENTER self
|
||||
@ -791,3 +792,12 @@ function COMMANDCENTER:ReportDetails( ReportGroup, Task )
|
||||
self:MessageToGroup( Report:Text(), ReportGroup )
|
||||
end
|
||||
|
||||
|
||||
--- Let the command center flash a report of the status of the subscribed task to a group.
|
||||
-- @param #COMMANDCENTER self
|
||||
function COMMANDCENTER:SetFlashStatus( Flash )
|
||||
self:F()
|
||||
|
||||
self.FlashStatus = Flash or true
|
||||
|
||||
end
|
||||
|
||||
@ -856,6 +856,8 @@ do -- Group Assignment
|
||||
|
||||
CommandCenter:SetMenu()
|
||||
|
||||
self:MenuFlashTaskStatus( TaskGroup, self:GetMission():GetCommandCenter().FlashStatus )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
@ -133,7 +133,8 @@ function CLIENT:FindByName( ClientName, ClientBriefing, Error )
|
||||
end
|
||||
|
||||
function CLIENT:Register( ClientName )
|
||||
local self = BASE:Inherit( self, UNIT:Register( ClientName ) )
|
||||
|
||||
local self = BASE:Inherit( self, UNIT:Register( ClientName ) ) -- #CLIENT
|
||||
|
||||
self:F( ClientName )
|
||||
self.ClientName = ClientName
|
||||
@ -141,7 +142,7 @@ function CLIENT:Register( ClientName )
|
||||
self.ClientAlive2 = false
|
||||
|
||||
--self.AliveCheckScheduler = routines.scheduleFunction( self._AliveCheckScheduler, { self }, timer.getTime() + 1, 5 )
|
||||
self.AliveCheckScheduler = SCHEDULER:New( self, self._AliveCheckScheduler, { "Client Alive " .. ClientName }, 1, 5 )
|
||||
self.AliveCheckScheduler = SCHEDULER:New( self, self._AliveCheckScheduler, { "Client Alive " .. ClientName }, 1, 5, 0.5 )
|
||||
|
||||
self:F( self )
|
||||
return self
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user