mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/develop' into branch
This commit is contained in:
commit
0ea6f5f71b
@ -387,6 +387,14 @@ function PLAYERTASK:_CheckCaptureOpsZoneSuccess(OpsZone, CaptureSquadGroupNamePr
|
||||
return OpsZone:GetOwner() == Coalition and isClientInZone and isCaptureGroupInZone
|
||||
end
|
||||
|
||||
--- [User] Override this function in order to implement custom logic if a player can join a task or not.
|
||||
-- @param #PLAYERTASK self
|
||||
-- @param Wrapper.Group#GROUP Group
|
||||
-- @param Wrapper.Client#CLIENT Client
|
||||
-- @return #boolean Outcome True if player can join the task, false if not
|
||||
function PLAYERTASK:CanJoinTask(Group, Client)
|
||||
return true
|
||||
end
|
||||
|
||||
--- [Internal] Add a PLAYERTASKCONTROLLER for this task
|
||||
-- @param #PLAYERTASK self
|
||||
@ -3558,6 +3566,10 @@ function PLAYERTASKCONTROLLER:_JoinTask(Task, Force, Group, Client)
|
||||
return self
|
||||
end
|
||||
|
||||
if not Task:CanJoinTask(Group, Client) then
|
||||
return self
|
||||
end
|
||||
|
||||
local force = false
|
||||
if type(Force) == "boolean" then
|
||||
force = Force
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user