mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Goal
This commit is contained in:
parent
b1e99dc317
commit
9856a8625d
@ -142,6 +142,7 @@ do -- Goal
|
||||
-- @param #GOAL self
|
||||
-- @param #string PlayerName The name of the player.
|
||||
function GOAL:AddPlayerContribution( PlayerName )
|
||||
self:F({PlayerName})
|
||||
self.Players[PlayerName] = self.Players[PlayerName] or 0
|
||||
self.Players[PlayerName] = self.Players[PlayerName] + 1
|
||||
self.TotalContributions = self.TotalContributions + 1
|
||||
|
||||
@ -508,6 +508,8 @@ function COMMANDCENTER:AssignTask( TaskGroup )
|
||||
|
||||
local Task = Tasks[ math.random( 1, #Tasks ) ] -- Tasking.Task#TASK
|
||||
|
||||
if Task then
|
||||
|
||||
self:I( "Assigning task " .. Task:GetName() .. " using auto assign method " .. self.AutoAssignMethod .. " to " .. TaskGroup:GetName() .. " with task priority " .. AssignPriority )
|
||||
|
||||
if not self.AutoAcceptTasks == true then
|
||||
@ -518,6 +520,8 @@ function COMMANDCENTER:AssignTask( TaskGroup )
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
--- Sets the menu of the command center.
|
||||
-- This command is called within the :New() method.
|
||||
|
||||
@ -253,7 +253,6 @@ do -- TASK_CAPTURE_ZONE
|
||||
|
||||
if self.ZoneGoal then
|
||||
if self.ZoneGoal.Goal:IsAchieved() then
|
||||
self:Success()
|
||||
local TotalContributions = self.ZoneGoal.Goal:GetTotalContributions()
|
||||
local PlayerContributions = self.ZoneGoal.Goal:GetPlayerContributions()
|
||||
self:F( { TotalContributions = TotalContributions, PlayerContributions = PlayerContributions } )
|
||||
@ -263,7 +262,7 @@ do -- TASK_CAPTURE_ZONE
|
||||
Scoring:_AddMissionGoalScore( self.Mission, PlayerName, "Zone " .. self.ZoneGoal:GetZoneName() .." captured", PlayerContribution * 200 / TotalContributions )
|
||||
end
|
||||
end
|
||||
self:AddProgress( PlayerName, "Zone " .. self.ZoneGoal:GetZoneName() .." captured", timer.getTime() , 1 )
|
||||
self:Success()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user