From f5c2ca7aa6fa36869dfa3d158fb57b60dbf544d2 Mon Sep 17 00:00:00 2001 From: Beu Date: Tue, 8 Aug 2023 15:24:26 +0200 Subject: [PATCH] Allow to have S_RoundsPerMap = 0 --- TM_ReverseCup.Script.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/TM_ReverseCup.Script.txt b/TM_ReverseCup.Script.txt index 0e3ed6c..9eb5171 100644 --- a/TM_ReverseCup.Script.txt +++ b/TM_ReverseCup.Script.txt @@ -321,7 +321,11 @@ if (S_EnableCollisions) { ModeUtils::PlaySound(CUIConfig::EUISound::PhaseChange, 0); -UIModules_BigMessage::SetMessage(_("Rounds : ") ^ TL::ToText(G_NbOfValidRounds + 1) ^ " / " ^ TL::ToText(S_RoundsPerMap)); +if (S_RoundsPerMap > 0) { + UIModules_BigMessage::SetMessage(_("Round: ") ^ TL::ToText(G_NbOfValidRounds + 1) ^ " / " ^ TL::ToText(S_RoundsPerMap)); +} else { + UIModules_BigMessage::SetMessage(_("Round: ") ^ TL::ToText(G_NbOfValidRounds + 1)); +} MB_Sleep(3000); UIModules_BigMessage::SetMessage(""); *** @@ -765,7 +769,7 @@ Void ComputeScores() { * @return True if it is the case, false otherwise */ Boolean MapIsOver() { - if (G_NbOfValidRounds >= S_RoundsPerMap) return True; + if (S_RoundsPerMap > 0 && G_NbOfValidRounds >= S_RoundsPerMap) return True; return False; }