Fix empty mission objectives getting translated
This commit is contained in:
committed by
Matthias Mailänder
parent
8a18c2e4b6
commit
64e84554d3
@@ -38,7 +38,11 @@ end
|
|||||||
---@param description string key of the translation string
|
---@param description string key of the translation string
|
||||||
---@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 = description
|
||||||
|
if translation ~= "" then
|
||||||
|
translation = UserInterface.Translate(description)
|
||||||
|
end
|
||||||
|
|
||||||
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
|
||||||
@@ -48,7 +52,11 @@ end
|
|||||||
---@param description string key of the translation string
|
---@param description string key of the translation string
|
||||||
---@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 = description
|
||||||
|
if translation ~= "" then
|
||||||
|
translation = UserInterface.Translate(description)
|
||||||
|
end
|
||||||
|
|
||||||
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