Remove duplicated definitions in utils.lua
This commit is contained in:
committed by
Matthias Mailänder
parent
0bfa53b58d
commit
bebe3f710b
@@ -7,26 +7,6 @@
|
|||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
---Adds a new mandatory objective, translates it and announces it via in-game chat message.
|
|
||||||
---@param player player recipient of the objective
|
|
||||||
---@param description string key of the translation string
|
|
||||||
---@return number id used to query for the objective later
|
|
||||||
AddPrimaryObjective = function(player, description)
|
|
||||||
local translation = UserInterface.Translate(description)
|
|
||||||
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-primary-objective"))
|
|
||||||
return player.AddObjective(translation, UserInterface.Translate("primary"), true)
|
|
||||||
end
|
|
||||||
|
|
||||||
---Adds a new optional objective, translates it and announces it via in-game chat message.
|
|
||||||
---@param player player recipient of the objective
|
|
||||||
---@param description string key of the translation string
|
|
||||||
---@return number id used to query for the objective later
|
|
||||||
AddSecondaryObjective = function(player, description)
|
|
||||||
local translation = UserInterface.Translate(description)
|
|
||||||
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-secondary-objective"))
|
|
||||||
return player.AddObjective(translation, UserInterface.Translate("secondary"), false)
|
|
||||||
end
|
|
||||||
|
|
||||||
IdleHunt = function(actor)
|
IdleHunt = function(actor)
|
||||||
if actor.HasProperty("Hunt") and not actor.IsDead then
|
if actor.HasProperty("Hunt") and not actor.IsDead then
|
||||||
Trigger.OnIdle(actor, actor.Hunt)
|
Trigger.OnIdle(actor, actor.Hunt)
|
||||||
@@ -39,7 +19,6 @@ end
|
|||||||
---@return number id used to query for the objective later
|
---@return number id used to query for the objective later
|
||||||
AddPrimaryObjective = function(player, description)
|
AddPrimaryObjective = function(player, description)
|
||||||
local translation = UserInterface.Translate(description)
|
local translation = UserInterface.Translate(description)
|
||||||
|
|
||||||
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-primary-objective"))
|
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-primary-objective"))
|
||||||
return player.AddObjective(translation, UserInterface.Translate("primary"), true)
|
return player.AddObjective(translation, UserInterface.Translate("primary"), true)
|
||||||
end
|
end
|
||||||
@@ -50,7 +29,6 @@ end
|
|||||||
---@return number id used to query for the objective later
|
---@return number id used to query for the objective later
|
||||||
AddSecondaryObjective = function(player, description)
|
AddSecondaryObjective = function(player, description)
|
||||||
local translation = UserInterface.Translate(description)
|
local translation = UserInterface.Translate(description)
|
||||||
|
|
||||||
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-secondary-objective"))
|
Media.DisplayMessageToPlayer(player, translation, UserInterface.Translate("new-secondary-objective"))
|
||||||
return player.AddObjective(translation, UserInterface.Translate("secondary"), false)
|
return player.AddObjective(translation, UserInterface.Translate("secondary"), false)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user