mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
* Fixed issue with Scoring menu not shown in single player.
* Fixed issue with Scoring players table not being populated correctly, resulting in the scoring report for all players not being shown. Fixed.
This commit is contained in:
@@ -718,9 +718,9 @@ do -- Scheduling
|
||||
nil
|
||||
)
|
||||
|
||||
self._.Schedules[#self.Schedules+1] = ScheduleID
|
||||
self._.Schedules[#self._.Schedules+1] = ScheduleID
|
||||
|
||||
return self._.Schedules
|
||||
return self._.Schedules[#self._.Schedules]
|
||||
end
|
||||
|
||||
--- Schedule a new time event. Note that the schedule will only take place if the scheduler is *started*. Even for a single schedule event, the scheduler needs to be started also.
|
||||
@@ -752,9 +752,9 @@ do -- Scheduling
|
||||
Stop
|
||||
)
|
||||
|
||||
self._.Schedules[SchedulerFunction] = ScheduleID
|
||||
self._.Schedules[#self._.Schedules+1] = ScheduleID
|
||||
|
||||
return self._.Schedules
|
||||
return self._.Schedules[#self._.Schedules]
|
||||
end
|
||||
|
||||
--- Stops the Schedule.
|
||||
|
||||
@@ -325,7 +325,7 @@ function DATABASE:AddPlayer( UnitName, PlayerName )
|
||||
if PlayerName then
|
||||
self:E( { "Add player for unit:", UnitName, PlayerName } )
|
||||
self.PLAYERS[PlayerName] = UnitName
|
||||
self.PLAYERUNITS[UnitName] = PlayerName
|
||||
self.PLAYERUNITS[PlayerName] = self:FindUnit( UnitName )
|
||||
self.PLAYERSJOINED[PlayerName] = PlayerName
|
||||
end
|
||||
end
|
||||
@@ -337,10 +337,48 @@ function DATABASE:DeletePlayer( UnitName, PlayerName )
|
||||
if PlayerName then
|
||||
self:E( { "Clean player:", PlayerName } )
|
||||
self.PLAYERS[PlayerName] = nil
|
||||
self.PLAYERUNITS[UnitName] = PlayerName
|
||||
self.PLAYERUNITS[PlayerName] = nil
|
||||
end
|
||||
end
|
||||
|
||||
--- Get the player table from the DATABASE.
|
||||
-- The player table contains all unit names with the key the name of the player (PlayerName).
|
||||
-- @param #DATABASE self
|
||||
-- @usage
|
||||
-- local Players = _DATABASE:GetPlayers()
|
||||
-- for PlayerName, UnitName in pairs( Players ) do
|
||||
-- ..
|
||||
-- end
|
||||
function DATABASE:GetPlayers()
|
||||
return self.PLAYERS
|
||||
end
|
||||
|
||||
|
||||
--- Get the player table from the DATABASE, which contains all UNIT objects.
|
||||
-- The player table contains all UNIT objects of the player with the key the name of the player (PlayerName).
|
||||
-- @param #DATABASE self
|
||||
-- @usage
|
||||
-- local PlayerUnits = _DATABASE:GetPlayerUnits()
|
||||
-- for PlayerName, PlayerUnit in pairs( PlayerUnits ) do
|
||||
-- ..
|
||||
-- end
|
||||
function DATABASE:GetPlayerUnits()
|
||||
return self.PLAYERUNITS
|
||||
end
|
||||
|
||||
|
||||
--- Get the player table from the DATABASE which have joined in the mission historically.
|
||||
-- The player table contains all UNIT objects with the key the name of the player (PlayerName).
|
||||
-- @param #DATABASE self
|
||||
-- @usage
|
||||
-- local PlayersJoined = _DATABASE:GetPlayersJoined()
|
||||
-- for PlayerName, PlayerUnit in pairs( PlayersJoined ) do
|
||||
-- ..
|
||||
-- end
|
||||
function DATABASE:GetPlayersJoined()
|
||||
return self.PLAYERSJOINED
|
||||
end
|
||||
|
||||
|
||||
--- Instantiate new Groups within the DCSRTE.
|
||||
-- This method expects EXACTLY the same structure as a structure within the ME, and needs 2 additional fields defined:
|
||||
|
||||
Reference in New Issue
Block a user