mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#PLAYERTASK
* PLAYERTASKCONTROLLER:AddPlayerTaskToQueue(PlayerTask,Silent) Silent option added #CTLD * Small fix for BEACON Zones
This commit is contained in:
parent
af0106d466
commit
65d25f6544
@ -22,7 +22,7 @@
|
||||
-- @module Ops.CTLD
|
||||
-- @image OPS_CTLD.jpg
|
||||
|
||||
-- Last Update October 2022
|
||||
-- Last Update December 2022
|
||||
|
||||
do
|
||||
|
||||
@ -1078,7 +1078,7 @@ CTLD.UnitTypes = {
|
||||
|
||||
--- CTLD class version.
|
||||
-- @field #string version
|
||||
CTLD.version="1.0.19"
|
||||
CTLD.version="1.0.20"
|
||||
|
||||
--- Instantiate a new CTLD.
|
||||
-- @param #CTLD self
|
||||
@ -3611,7 +3611,8 @@ function CTLD:CheckDroppedBeacons()
|
||||
|
||||
for _,_beacon in pairs (self.droppedBeacons) do
|
||||
local beacon = _beacon -- #CTLD.CargoZone
|
||||
local T0 = beacon.timestamp
|
||||
if not beacon.timestamp then beacon.timestamp = timer.getTime() end
|
||||
local T0 = beacon.timestamp
|
||||
if timer.getTime() - T0 > timeout then
|
||||
local name = beacon.name
|
||||
self.droppedbeaconref[name] = nil
|
||||
|
||||
@ -1409,7 +1409,7 @@ PLAYERTASKCONTROLLER.Messages = {
|
||||
|
||||
--- PLAYERTASK class version.
|
||||
-- @field #string version
|
||||
PLAYERTASKCONTROLLER.version="0.1.49"
|
||||
PLAYERTASKCONTROLLER.version="0.1.50"
|
||||
|
||||
--- Create and run a new TASKCONTROLLER instance.
|
||||
-- @param #PLAYERTASKCONTROLLER self
|
||||
@ -2651,6 +2651,7 @@ end
|
||||
--- [User] Add a PLAYERTASK object to the list of (open) tasks
|
||||
-- @param #PLAYERTASKCONTROLLER self
|
||||
-- @param Ops.PlayerTask#PLAYERTASK PlayerTask
|
||||
-- @param #boolean Silent If true, make no "has new task" announcement
|
||||
-- @return #PLAYERTASKCONTROLLER self
|
||||
-- @usage
|
||||
-- Example to create a PLAYERTASK of type CTLD and give Players 10 minutes to complete:
|
||||
@ -2671,13 +2672,15 @@ end
|
||||
-- )
|
||||
--
|
||||
-- taskmanager:AddPlayerTaskToQueue(PlayerTask)
|
||||
function PLAYERTASKCONTROLLER:AddPlayerTaskToQueue(PlayerTask)
|
||||
function PLAYERTASKCONTROLLER:AddPlayerTaskToQueue(PlayerTask,Silent)
|
||||
self:T(self.lid.."AddPlayerTaskToQueue")
|
||||
if PlayerTask and PlayerTask.ClassName and PlayerTask.ClassName == "PLAYERTASK" then
|
||||
PlayerTask:_SetController(self)
|
||||
PlayerTask:SetCoalition(self.Coalition)
|
||||
self.TaskQueue:Push(PlayerTask)
|
||||
self:__TaskAdded(10,PlayerTask)
|
||||
if not Silent then
|
||||
self:__TaskAdded(10,PlayerTask)
|
||||
end
|
||||
else
|
||||
self:E(self.lid.."***** NO valid PAYERTASK object sent!")
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user