mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Additions
This commit is contained in:
parent
21e12068c7
commit
52d20ed8ef
@ -3884,9 +3884,9 @@ do -- SET_CLIENT
|
||||
|
||||
--- Builds a set of clients of certain callsigns.
|
||||
-- @param #SET_CLIENT self
|
||||
-- @param #string Callsigns Can be a string e.g. "Ford", or a table of strings e.g. {"Uzi","Enfield","Chevy"}
|
||||
-- @param #string Callsigns Can be a single string e.g. "Ford", or a table of strings e.g. {"Uzi","Enfield","Chevy"}. Refers to the callsigns as they can be set in the mission editor.
|
||||
-- @return #SET_CLIENT self
|
||||
function SET_CLIENT:Filtercallsigns( Callsigns )
|
||||
function SET_CLIENT:FilterCallsigns( Callsigns )
|
||||
if not self.Filter.Callsigns then
|
||||
self.Filter.Callsigns = {}
|
||||
end
|
||||
@ -3894,14 +3894,14 @@ do -- SET_CLIENT
|
||||
Callsigns = { Callsigns }
|
||||
end
|
||||
for callsignID, callsign in pairs( Callsigns ) do
|
||||
self.Filter.Coalitions[Callsigns] = Callsigns
|
||||
self.Filter.Callsigns[callsign] = callsign
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Builds a set of clients of certain playernames.
|
||||
-- @param #SET_CLIENT self
|
||||
-- @param #string Playernames Can be a string e.g. "Apple", or a table of strings e.g. {"Walter","Hermann","Gonzo"}
|
||||
-- @param #string Playernames Can be a single string e.g. "Apple", or a table of strings e.g. {"Walter","Hermann","Gonzo"}. Useful if you have e.g. a common squadron prefix.
|
||||
-- @return #SET_CLIENT self
|
||||
function SET_CLIENT:FilterPlayernames( Playernames )
|
||||
if not self.Filter.Playernames then
|
||||
@ -3910,8 +3910,8 @@ do -- SET_CLIENT
|
||||
if type( Playernames ) ~= "table" then
|
||||
Playernames = { Playernames }
|
||||
end
|
||||
for PlayernameID, Playernames in pairs( Playernames ) do
|
||||
self.Filter.Coalitions[Playernames] = Playernames
|
||||
for PlayernameID, playername in pairs( Playernames ) do
|
||||
self.Filter.Playernames[playername] = playername
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
@ -1435,7 +1435,7 @@ PLAYERTASKCONTROLLER.Messages = {
|
||||
|
||||
--- PLAYERTASK class version.
|
||||
-- @field #string version
|
||||
PLAYERTASKCONTROLLER.version="0.1.52"
|
||||
PLAYERTASKCONTROLLER.version="0.1.53"
|
||||
|
||||
--- Create and run a new TASKCONTROLLER instance.
|
||||
-- @param #PLAYERTASKCONTROLLER self
|
||||
@ -2731,6 +2731,7 @@ end
|
||||
-- @param #PLAYERTASKCONTROLLER self
|
||||
-- @param Ops.PlayerTask#PLAYERTASK PlayerTask
|
||||
-- @param #boolean Silent If true, make no "has new task" announcement
|
||||
-- @param #boolen TaskFilter If true, apply the white/black-list task filters here, also
|
||||
-- @return #PLAYERTASKCONTROLLER self
|
||||
-- @usage
|
||||
-- Example to create a PLAYERTASK of type CTLD and give Players 10 minutes to complete:
|
||||
@ -2751,9 +2752,17 @@ end
|
||||
-- )
|
||||
--
|
||||
-- taskmanager:AddPlayerTaskToQueue(PlayerTask)
|
||||
function PLAYERTASKCONTROLLER:AddPlayerTaskToQueue(PlayerTask,Silent)
|
||||
function PLAYERTASKCONTROLLER:AddPlayerTaskToQueue(PlayerTask,Silent,TaskFilter)
|
||||
self:T(self.lid.."AddPlayerTaskToQueue")
|
||||
if PlayerTask and PlayerTask.ClassName and PlayerTask.ClassName == "PLAYERTASK" then
|
||||
if TaskFilter then
|
||||
if self.UseWhiteList and (not self:_CheckTaskTypeAllowed(PlayerTask.Type)) then
|
||||
return self
|
||||
end
|
||||
if self.UseBlackList and self:_CheckTaskTypeDisallowed(PlayerTask.Type) then
|
||||
return self
|
||||
end
|
||||
end
|
||||
PlayerTask:_SetController(self)
|
||||
PlayerTask:SetCoalition(self.Coalition)
|
||||
self.TaskQueue:Push(PlayerTask)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user