Mutant: Add message for excess teams
authorWuzzy <Wuzzy2@mail.ru>
Thu, 10 Oct 2019 00:40:39 +0200
changeset 15483 19e987301674
parent 15482 751b992656ab
child 15484 b9b48e8b5ec4
Mutant: Add message for excess teams
share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua	Thu Oct 10 00:32:24 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua	Thu Oct 10 00:40:39 2019 +0200
@@ -59,6 +59,7 @@
 local teamsDead = {}
 local teamsDeleted = {}
 local hogLimitHit = false
+local teamLimitHit = false
 local cnthhs
 
 local circles = {}
@@ -157,7 +158,7 @@
 end
 
 function limitHogsClan(gear)
-    hogLimitHit = true
+    teamLimitHit = true
     SetEffect(gear, heResurrectable, 0)
     setGearValue(gear, "excess", true)
     DeleteGear(gear)
@@ -197,8 +198,10 @@
         cnthhs = 0
         runOnHogsInTeam(limitHogsTeam, GetTeamName(i))
     end
+    if teamLimitHit then
+        WriteLnToChat(loc("Only one team per clan allowed! Excess teams will be removed."))
+    end
     if hogLimitHit then
-        -- TODO: Update warning message to include excess teams as well
         WriteLnToChat(loc("Only one hog per team allowed! Excess hogs will be removed."))
     end
     trackTeams()