Use global difficulty.

This commit is contained in:
Matthias Mailänder
2021-10-10 22:06:03 +02:00
committed by abcdefg30
parent 58b105f0d4
commit d42edfc0b9
70 changed files with 241 additions and 279 deletions

View File

@@ -6,11 +6,11 @@
the License, or (at your option) any later version. For more
information, see COPYING.
]]
if Map.LobbyOption("difficulty") == "easy" then
if Difficulty == "easy" then
remainingTime = DateTime.Minutes(7)
elseif Map.LobbyOption("difficulty") == "normal" then
elseif Difficulty == "normal" then
remainingTime = DateTime.Minutes(6)
elseif Map.LobbyOption("difficulty") == "hard" then
elseif Difficulty == "hard" then
remainingTime = DateTime.Minutes(5)
end
@@ -307,7 +307,7 @@ Tick = function()
enemy.MarkCompletedObjective(alliedObjective)
end
if remainingTime == DateTime.Minutes(5) and Map.LobbyOption("difficulty") ~= "hard" then
if remainingTime == DateTime.Minutes(5) and Difficulty ~= "hard" then
Media.PlaySpeechNotification(player, "WarningFiveMinutesRemaining")
elseif remainingTime == DateTime.Minutes(4) then
Media.PlaySpeechNotification(player, "WarningFourMinutesRemaining")