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
@@ -264,7 +264,7 @@ end)
Trigger.OnEnteredFootprint(SpyHideout3Trigger, function(a, id)
if not spyHideout3Trigger and a.Owner == player then
spyHideout3Trigger = true
if Map.LobbyOption("difficulty") ~= "hard" then
if Difficulty ~= "hard" then
Reinforcements.Reinforce(player, USSRReinforcements2, { ReinforcementSpawn.Location, CameraSpyHideout33.Location }, 0)
Media.PlaySpeechNotification(player, "ReinforcementsArrived")
end
@@ -371,7 +371,7 @@ Tick = function()
if not SpyHideout4.IsDead and SpyHideout4.HasPassengers then
spyReachedHideout4 = true
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")