Use capcolDefault in Lua scripts
authorWuzzy <Wuzzy2@mail.ru>
Wed, 08 Aug 2018 15:22:34 +0200
changeset 13643 690cc84e9fd6
parent 13642 3d14950641a4
child 13644 1b536e268519
Use capcolDefault in Lua scripts
share/hedgewars/Data/Maps/CTF_Blizzard/map.lua
share/hedgewars/Data/Maps/ClimbHome/map.lua
share/hedgewars/Data/Maps/TrophyRace/map.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua
share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua
share/hedgewars/Data/Scripts/Multiplayer/Battalion.lua
share/hedgewars/Data/Scripts/Multiplayer/Capture_the_Flag.lua
share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua
share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua
share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua
share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua
share/hedgewars/Data/Scripts/Multiplayer/Tumbler.lua
share/hedgewars/Data/Scripts/Multiplayer/WxW.lua
share/hedgewars/Data/Scripts/SimpleMission.lua
share/hedgewars/Data/Scripts/TargetPractice.lua
--- a/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -285,7 +285,7 @@
 				fNeedsRespawn[bbq] = true
 				fCaptures[wtf] = fCaptures[wtf] +1
 
-				AddCaption(string.format(loc("%s has scored!"), GetHogTeamName(CurrentHedgehog)), 0xFFFFFFFF, capgrpGameState)
+				AddCaption(string.format(loc("%s has scored!"), GetHogTeamName(CurrentHedgehog)), capcolDefault, capgrpGameState)
 				for i=1, #clanTeams[wtf] do
 					SetTeamLabel(clanTeams[wtf][i], fCaptures[wtf])
 				end
--- a/share/hedgewars/Data/Maps/ClimbHome/map.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -113,7 +113,7 @@
 
 function onGearDelete(gear)
     if gear == MrMine then
-        AddCaption(loc("Once you set off the proximity trigger, Mr. Mine is not your friend"), 0xFFFFFFFF, capgrpMessage2)
+        AddCaption(loc("Once you set off the proximity trigger, Mr. Mine is not your friend"), capcolDefault, capgrpMessage2)
         MrMine = nil
     elseif GetGearType(gear) == gtCake then
         Cake = nil
@@ -429,7 +429,7 @@
             end
             -- FIXME: Hog is also in winning box if it just walks into the chair from the left, touching it. Intentional?
             if not YouWon and not YouLost and gearIsInBox(CurrentHedgehog, 1920, 252, 50, 50) then
-                AddCaption(loc("Victory!"), 0xFFFFFFFF, capgrpGameState)
+                AddCaption(loc("Victory!"), capcolDefault, capgrpGameState)
                 ShowMission(loc("Climb Home"),
                             loc("Made it!"),
                             string.format(loc("Ahhh, home, sweet home. Made it in %d seconds."), roundedFinishTime),
@@ -464,7 +464,7 @@
                     (not MrMine or (MrMine and band(GetState(MrMine), gstAttacking) == 0)) then
                 -- Player managed to reach home in multiplayer.
                 -- Stop hog, disable controls, celebrate victory and continue the game after 4 seconds.
-                AddCaption(string.format(loc("%s climbed home in %d seconds!"), GetHogName(CurrentHedgehog), roundedFinishTime), 0xFFFFFFFF, capgrpGameState)
+                AddCaption(string.format(loc("%s climbed home in %d seconds!"), GetHogName(CurrentHedgehog), roundedFinishTime), capcolDefault, capgrpGameState)
                 SendStat(siCustomAchievement, string.format(loc("%s (%s) reached home in %.3f seconds."), GetHogName(CurrentHedgehog), GetHogTeamName(CurrentHedgehog), finishTime))
                 makeMultiPlayerWinnerStat(CurrentHedgehog)
                 PlaySound(sndVictory, CurrentHedgehog)
--- a/share/hedgewars/Data/Maps/TrophyRace/map.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Maps/TrophyRace/map.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -194,7 +194,7 @@
                 .. hscore,
                 0, 0)
             AddCaption(string.format(loc("Time: %.3fs"), (ttime/1000)), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpMessage2)
-            AddCaption(loc("Track completed!"), 0xFFFFFFFF, capgrpGameState)
+            AddCaption(loc("Track completed!"), capcolDefault, capgrpGameState)
             EndTurn(true)
         else
             if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) and CurrentHedgehog ~= nil and GetHealth(CurrentHedgehog) > 0 and (not reached) and GameTime%100 == 0 then
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -1200,7 +1200,7 @@
   else
     TurnsLeft = TurnsLeft - 1
     if TurnsLeft >= 1 then
-      AddCaption(string.format(loc("Turns left: %d"), TurnsLeft), 0xFFFFFFFF, capgrpGameState)
+      AddCaption(string.format(loc("Turns left: %d"), TurnsLeft), capcolDefault, capgrpGameState)
     end
   end
 end
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -169,7 +169,7 @@
 end
 
 function lose(gear)
-	AddCaption(loc("Out of ammo!"), 0xFFFFFFFF, capgrpMessage2)
+	AddCaption(loc("Out of ammo!"), capcolDefault, capgrpMessage2)
 	PlaySound(sndStupid, hero.gear)
 	gameOver()
 end
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -454,13 +454,13 @@
 	SaveCampaignVar("HeroHealth", GetHealth(hero.gear))
 	SaveCampaignVar("HeroAmmoIce01IceGun", GetAmmoCount(hero.gear, amIceGun))
 	SaveCampaignVar("HeroAmmoIce01Bazooka", GetAmmoCount(hero.gear, amBazooka))
-	AddCaption(loc("Checkpoint reached!"), 0xFFFFFFFF, capgrpMessage2)
+	AddCaption(loc("Checkpoint reached!"), capcolDefault, capgrpMessage2)
 end
 
 function columnCheckPoint(gear)
 	saveCheckpoint("2")
 	SaveCampaignVar("HeroHealth", GetHealth(hero.gear))
-	AddCaption(loc("Checkpoint reached!"), 0xFFFFFFFF, capgrpMessage2)
+	AddCaption(loc("Checkpoint reached!"), capcolDefault, capgrpMessage2)
 	SaveCampaignVar("HeroAmmoIce01IceGun", GetAmmoCount(hero.gear, amIceGun))
 	SaveCampaignVar("HeroAmmoIce01Bazooka", GetAmmoCount(hero.gear, amBazooka))
 end
--- a/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -386,7 +386,7 @@
 		else
 			if not game_lost then
 			-- Victory!
-			AddCaption(loc("Victory!"), 0xFFFFFFFF, capgrpGameState)
+			AddCaption(loc("Victory!"), capcolDefault, capgrpGameState)
 			ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Congratulations! You've eliminated all targets|within the allowed time frame."), 0, 0)
 			-- Also let the hogs shout "victory!"
 			PlaySound(sndVictory, CurrentHedgehog)
--- a/share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -345,7 +345,7 @@
 		if cratesLeft == 0 then
 
 			local rank = "unknown"
-			local color = 0xFFFFFFFF
+			local color = capcolDefault
 			local sound = sndVictory
 			if planesUsed >= 156 then
 				rank = loc("Destroyer of planes")	
--- a/share/hedgewars/Data/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -221,9 +221,9 @@
 		end
 
 		if missionWon == true then
-			AddCaption(loc("Victory!"), 0xFFFFFFFF,capgrpGameState)
+			AddCaption(loc("Victory!"), capcolDefault, capgrpGameState)
 		else
-			AddCaption(loc("Challenge over!"), 0xFFFFFFFF,capgrpGameState)
+			AddCaption(loc("Challenge over!"), capcolDefault, capgrpGameState)
 		end
 
 	end
@@ -241,7 +241,7 @@
 		AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
 		DeleteGear(gear)
 		PlaySound(sndExplosion)
-		AddCaption(string.format(knockTaunt(), GetHogName(gear)), 0xFFFFFFFF, capgrpMessage)
+		AddCaption(string.format(knockTaunt(), GetHogName(gear)), capcolDefault, capgrpMessage)
 
 		hogsKilled = hogsKilled +1
 		SetTeamLabel(playerTeamName, tostring(GetKillScore()))
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -184,7 +184,7 @@
 	InfFuel = true, }
 TargetPos[12] = { Modifier = true, Func = function()
 	Objective = true
-	AddCaption(loc("Training complete!"), 0xFFFFFFFF, capgrpGameState)
+	AddCaption(loc("Training complete!"), capcolDefault, capgrpGameState)
 	Info(loc("Training complete!"), loc("Good bye!"), 4, 5000)
 
 	if SaucerGear ~= nil then
@@ -292,7 +292,7 @@
 	SpawnTargets()
 
 	if TargetNumber > 1 then
-		AddCaption(loc("Next target is ready!"), 0xFFFFFFFF, capgrpMessage2)
+		AddCaption(loc("Next target is ready!"), capcolDefault, capgrpMessage2)
 	end
 end
 
@@ -460,7 +460,7 @@
 		if TargetsRemaining <= 0 then
 			if TargetNumber == BoomTarget or not HasHedgehogLandedYet() then
 				if SaucerGear then
-					AddCaption(loc("Objective completed! Now land safely."), 0xFFFFFFFF, capgrpMessage2)
+					AddCaption(loc("Objective completed! Now land safely."), capcolDefault, capgrpMessage2)
 				end
 				Check = true
 				CheckTimer = 500
@@ -490,7 +490,7 @@
 	end
 	if Gear == Barrels[2] then
 		Barrels[2] = nil
-		AddCaption(loc("Kaboom!"), 0xFFFFFFFF, capgrpMessage)
+		AddCaption(loc("Kaboom!"), capcolDefault, capgrpMessage)
 	end
 end
 
@@ -516,7 +516,7 @@
 			end
 		end
 	end
-	if GrenadeExploded and TargetNumber == BoomTarget then
+	if GrenadeExploded and TargetNumber == BoomTarget and GetHealth(Player) then
 		GrenadeTimer = GrenadeTimer + 20
 		if GrenadeTimer > 1500 then
 			GrenadeTimer = 0
@@ -524,7 +524,7 @@
 			GrenadeExploded = false
 			if SaucerGear and TargetNumber == BoomTarget and TargetsRemaining > 0 then
 				PlaySound(sndShotgunReload)
-				AddCaption(loc("+1 Grenade"), 0xDDDD00FF, capgrpAmmoinfo)
+				AddCaption(loc("+1 Grenade"), GetClanColor(GetHogClan(Player)), capgrpAmmoinfo)
 				AddAmmo(Player, amGrenade, 1)
 			end
 		end
@@ -551,7 +551,7 @@
 
 function onGearResurrect(Gear, VGear)
 	if Gear == Player then
-		AddCaption(loc("Oh no! You have died. Try again!"), 0xFFFFFFFF, capgrpMessage2)
+		AddCaption(loc("Oh no! You have died. Try again!"), capcolDefault, capgrpMessage2)
 		ResetCurrentTarget()
 		if VGear then
 			SetVisualGearValues(VGear, GetX(Gear), GetY(Gear))
@@ -560,6 +560,6 @@
 end
 
 function onSkipTurn()
-	AddCaption(loc("Try again!"), 0xFFFFFFFF, capgrpMessage2)
+	AddCaption(loc("Try again!"), capcolDefault, capgrpMessage2)
 	ResetCurrentTarget()
 end
--- a/share/hedgewars/Data/Scripts/Multiplayer/Battalion.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Battalion.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -1163,7 +1163,7 @@
   local team = getHogInfo(KingHog, 'team')
   local msgColor = getHogInfo(KingHog, 'clanColor')
 
-  AddCaption(string.format(loc("The king of %s has died!"), team), 0xFFFFFFFF, capgrpGameState)
+  AddCaption(string.format(loc("The king of %s has died!"), team), capcolDefault, capgrpGameState)
 
   -- Kill the rest of the team normally, just like the official King Mode game modifier
   for hog, val in pairs(hogInfo) do
@@ -1448,7 +1448,7 @@
     local RoundsTillSD = (SuddenDeathTurns+2) - (TotalRounds+1)
     -- Show SD reminder every couple of turns, and in the first turn
     if (not firstTurnOver) or (RoundsTillSD <= 6) or (RoundsTillSD <= 25 and RoundsTillSD % 5 == 0) or (RoundsTillSD % 10 == 0) then
-        AddCaption(string.format(loc("Rounds until Sudden Death: %d"), RoundsTillSD), 0xFFFFFFFF, capgrpGameState)
+        AddCaption(string.format(loc("Rounds until Sudden Death: %d"), RoundsTillSD), capcolDefault, capgrpGameState)
     end
   end
 
--- a/share/hedgewars/Data/Scripts/Multiplayer/Capture_the_Flag.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Capture_the_Flag.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -153,7 +153,7 @@
 			end
 		end
 		if CurrentHedgehog ~= nil then
-			AddCaption(string.format(loc("Victory for %s!"), GetHogTeamName(CurrentHedgehog)), 0xFFFFFFFF, capgrpGameState)
+			AddCaption(string.format(loc("Victory for %s!"), GetHogTeamName(CurrentHedgehog)), capcolDefault, capgrpGameState)
 			updateScores()
 		end
 
@@ -202,7 +202,7 @@
 		fIsMissing[thiefClan] = false
 		fNeedsRespawn[thiefClan] = true
 		fCaptures[flagClan] = fCaptures[flagClan] +1
-		AddCaption(string.format(loc("%s has scored!"), GetHogName(CurrentHedgehog)), 0xFFFFFFFF, capgrpGameState)
+		AddCaption(string.format(loc("%s has scored!"), GetHogName(CurrentHedgehog)), capcolDefault, capgrpGameState)
 		updateScores()
 		PlaySound(sndHomerun)
 		fThief[thiefClan] = nil -- player no longer has the enemy flag
@@ -225,7 +225,7 @@
 
 		fNeedsRespawn[flagClan] = true
 		HandleRespawns() -- this will set fIsMissing[flagClan] to false :)
-		AddCaption(loc("Flag returned!"), 0xFFFFFFFF, capgrpMessage2)
+		AddCaption(loc("Flag returned!"), capcolDefault, capgrpMessage2)
 
 	--if the player is taking the enemy flag (not possible if already holding a flag)
 	elseif GetHogClan(CurrentHedgehog) ~= flagClan and (thiefClan == nil) then
@@ -242,7 +242,7 @@
 				end
 			end
 		end
-		AddCaption(loc("Flag captured!"), 0xFFFFFFFF, capgrpMessage2)
+		AddCaption(loc("Flag captured!"), capcolDefault, capgrpMessage2)
 
 	end
 
@@ -282,7 +282,7 @@
 
 			fNeedsRespawn[i] = false
 			fIsMissing[i] = false -- new, this should solve problems of a respawned flag being "returned" when a player tries to score
-			AddCaption(loc("Flag respawned!"), 0xFFFFFFFF, capgrpMessage2)
+			AddCaption(loc("Flag respawned!"), capcolDefault, capgrpMessage2)
 		end
 
 	end
@@ -412,7 +412,7 @@
 function StartTheGame()
 
 	gameStarted = true
-	AddCaption(loc("Game Started!"), 0xFFFFFFFF, capgrpGameState)
+	AddCaption(loc("Game Started!"), capcolDefault, capgrpGameState)
 
 	for i = 0, ClansCount-1 do
 
--- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -120,7 +120,7 @@
 local colorHealingStationParticle = 0x00FF0080
 local colorGeneratorParticle = 0xFFFF00FF
 
-local colorMessageError = 0xFFFFFFFF
+local colorMessageError = capcolDefault
 
 -- Fake ammo types, for the overwritten weapons in Construction Mode
 local amCMStructurePlacer = amAirAttack
@@ -771,7 +771,7 @@
 							loc("%s is now as poor as a church mouse"),
 						}
 						local r = math.random(1, #msgs)
-						AddCaption(string.format(msgs[r], GetHogName(gear)), 0xFFFFFFFF, capgrpAmmoinfo)
+						AddCaption(string.format(msgs[r], GetHogName(gear)), capcolDefault, capgrpAmmoinfo)
 					end
 
 				end
--- a/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -1214,7 +1214,7 @@
 
 			TurnTimeLeft=100000
 
-			AddCaption(string.format(CS.SELECT_WEP_INFORMATION_SHORT, GetHogTeamName(CurrentHedgehog)), 0xFFFFFFFF, capgrpGameState)
+			AddCaption(string.format(CS.SELECT_WEP_INFORMATION_SHORT, GetHogTeamName(CurrentHedgehog)), capcolDefault, capgrpGameState)
 			AddCaption(loc("No continent selected"), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmoinfo)
 			CS.SELECT_CONTINENT_CHECK=true
 			ShowMission(loc("Continental supplies"),loc("Let a continent provide your weapons!"),GeneralInformation(), 0, 0)
--- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -2332,11 +2332,11 @@
 	WriteLnToConsole("")
 	WriteLnToConsole("			if (c ==  \"victory\") and (GetHogLevel(hhs[i]) ~= 0) then")
 	WriteLnToConsole("				DismissTeam(GetHogTeamName(hhs[i]))")
-	WriteLnToConsole("				AddCaption(loc(\"Victory!\"), 0xFFFFFFFF, capgrpGameState)")
+	WriteLnToConsole("				AddCaption(loc(\"Victory!\"), capcolDefault, capgrpGameState)")
 	WriteLnToConsole("				ShowMission(loc(\"User Mission\"), loc(\"Mission\"), loc(\"Mission succeeded!\"), 0, 0)")
 	WriteLnToConsole("			elseif (c ==  \"failure\") and (GetHogLevel(hhs[i]) == 0) then")
 	WriteLnToConsole("				DismissTeam(GetHogTeamName(hhs[i]))")
-	WriteLnToConsole("				AddCaption(loc(\"Defeat!\"), 0xFFFFFFFF, capgrpGameState)")
+	WriteLnToConsole("				AddCaption(loc(\"Defeat!\"), capcolDefault, capgrpGameState)")
 	WriteLnToConsole("				ShowMission(loc(\"User Mission\"), loc(\"Mission\"), loc(\"Mission failed!\"), -amSkip, 0)")
 	WriteLnToConsole("			elseif (c ==  \"victory\") and (GetHogLevel(hhs[i]) == 0) then")
 	WriteLnToConsole("				PlaySound(sndVictory,hhs[i]) -- check if we actually need this")
--- a/share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -235,7 +235,7 @@
     killsCounter = 0
 
     if mutant == nil then
-        AddCaption( loc("First killer will mutate"), 0xFFFFFFFF, capgrpGameState )
+        AddCaption( loc("First killer will mutate"), capcolDefault, capgrpGameState )
     end
 
     checkScore()
@@ -262,23 +262,23 @@
 
 function countBodies()
         if killsCounter == 2 then
-            AddCaption(loc("Double kill!"), 0xFFFFFFFF, capgrpGameState )
+            AddCaption(loc("Double kill!"), capcolDefault, capgrpGameState )
         elseif killsCounter == 3 then
-            AddCaption(loc("Mega kill!"), 0xFFFFFFFF, capgrpGameState )
+            AddCaption(loc("Mega kill!"), capcolDefault, capgrpGameState )
             PlaySound(sndRegret)
         elseif killsCounter == 4 then
-            AddCaption(loc("Ultra kill!"), 0xFFFFFFFF, capgrpGameState )
+            AddCaption(loc("Ultra kill!"), capcolDefault, capgrpGameState )
         elseif killsCounter == 5 then
-            AddCaption(loc("Monster kill!"), 0xFFFFFFFF, capgrpGameState )
+            AddCaption(loc("Monster kill!"), capcolDefault, capgrpGameState )
             PlaySound(sndIllGetYou)
         elseif killsCounter == 6 then
-            AddCaption(loc("Ludicrous kill!"), 0xFFFFFFFF, capgrpGameState )
+            AddCaption(loc("Ludicrous kill!"), capcolDefault, capgrpGameState )
             PlaySound(sndNutter)
         elseif killsCounter == 7 then
-            AddCaption(loc("Holy shit!"), 0xFFFFFFFF, capgrpGameState )
+            AddCaption(loc("Holy shit!"), capcolDefault, capgrpGameState )
             PlaySound(sndLaugh)
         elseif killsCounter > 8 then
-            AddCaption(loc("Insanity!"), 0xFFFFFFFF, capgrpGameState )
+            AddCaption(loc("Insanity!"), capcolDefault, capgrpGameState )
         end
 
         if killsCounter > recordKills then
@@ -724,7 +724,7 @@
             local winner = createEndGameStats()
             if winner then
                 SendStat(siGameResult, string.format(loc("%s wins!"), winner))
-                AddCaption(string.format(loc("%s wins!"), winner), 0xFFFFFFFF, capgrpGameState)
+                AddCaption(string.format(loc("%s wins!"), winner), capcolDefault, capgrpGameState)
             end
             gameOver = true
         end
--- a/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -555,7 +555,7 @@
 		statusText = loc("Game over!")
 		scoreText = loc("Final team scores:")
 	else
-		AddCaption(string.format(loc("Rounds complete: %d/%d"), roundNumber, roundLimit), 0xFFFFFFFF, capgrpMessage)
+		AddCaption(string.format(loc("Rounds complete: %d/%d"), roundNumber, roundLimit), capcolDefault, capgrpMessage)
 		return
 	end
 	local displayTime
@@ -576,7 +576,7 @@
 				SetState(hhs[i], bor(GetState(hhs[i]), gstWinner))
 			end
 		end
-		AddCaption(string.format(loc("%s wins!"), winnerTeam), 0xFFFFFFFF, capgrpGameState)
+		AddCaption(string.format(loc("%s wins!"), winnerTeam), capcolDefault, capgrpGameState)
 		SendStat(siGameResult, string.format(loc("%s wins!"), winnerTeam))
 
 		for i = 1, TeamsCount do
@@ -1279,7 +1279,7 @@
 
 		if (TimeLeft == 0) then
 			if PlayerIsFine() then
-				AddCaption(loc("Time's up!"), 0xFFFFFFFF, capgrpGameState)
+				AddCaption(loc("Time's up!"), capcolDefault, capgrpGameState)
 			end
 			if (stopMovement == false) then	--time to stop the player
 				stopMovement = true
@@ -1852,7 +1852,7 @@
 	FailGraphics()
 
 	if not kamikaze then
-		AddCaption(loc("GOTCHA!"), 0xFFFFFFFF, capgrpGameState)
+		AddCaption(loc("GOTCHA!"), capcolDefault, capgrpGameState)
 		PlaySound(sndHellish)
 	end
 
--- a/share/hedgewars/Data/Scripts/Multiplayer/Tumbler.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Tumbler.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -916,18 +916,18 @@
 
 			roundKills = roundKills + 1
 			if roundKills == 2 then
-				AddCaption(loc("Double Kill!"),0xffffffff,capgrpMessage2)
+				AddCaption(loc("Double Kill!"),capcolDefault,capgrpMessage2)
 			elseif roundKills == 3 then
-				AddCaption(loc("Killing spree!"),0xffffffff,capgrpMessage2)
+				AddCaption(loc("Killing spree!"),capcolDefault,capgrpMessage2)
 			elseif roundKills >= 4 then
-				AddCaption(loc("Unstoppable!"),0xffffffff,capgrpMessage2)
+				AddCaption(loc("Unstoppable!"),capcolDefault,capgrpMessage2)
 			end
 
 		elseif gear == CurrentHedgehog then
 			DisableTumbler()
 
 		elseif gear ~= CurrentHedgehog then
-			AddCaption(loc("Friendly Fire!"),0xffffffff,capgrpMessage2)
+			AddCaption(loc("Friendly Fire!"),capcolDefault,capgrpMessage2)
 		end
 
 	end
--- a/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -874,7 +874,7 @@
 function onGearWaterSkip(gear)
 	if gear == CurrentHedgehog then
 		hasSurfed = true
-		AddCaption(loc("Surfer!"), 0xFFFFFFFF, capgrpMessage2)
+		AddCaption(loc("Surfer!"), capcolDefault, capgrpMessage2)
 	end
 end
 
@@ -890,7 +890,7 @@
 			AddCaption(loc("All walls touched!"))
 			allWallsHit = true
 			if (requireSurfer == true) and (hasSurfed == false) then
-				AddCaption(loc("Go surf!"), 0xFFFFFFFF, capgrpMessage2)
+				AddCaption(loc("Go surf!"), capcolDefault, capgrpMessage2)
 			end
 		else
 			AddCaption(string.format(loc("Walls left: %d"), wallsLeft))
@@ -974,7 +974,7 @@
 			roundN = 2
 		else
 			TurnTimeLeft = TurnTime
-			AddCaption(string.format(loc("Let's go, %s!"), GetHogTeamName(CurrentHedgehog)), 0xFFFFFFFF, capgrpMessage2)
+			AddCaption(string.format(loc("Let's go, %s!"), GetHogTeamName(CurrentHedgehog)), capcolDefault, capgrpMessage2)
 			roundN = 100
 			wallsLeft = #wTouched
 			allowCrate = true
--- a/share/hedgewars/Data/Scripts/SimpleMission.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/SimpleMission.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -524,7 +524,7 @@
 	_G.sm.win = function()
 		if not _G.sm.gameEnded then
 			_G.sm.gameEnded = true
-			AddCaption(loc("Victory!"), 0xFFFFFFFF, capgrpGameState)
+			AddCaption(loc("Victory!"), capcolDefault, capgrpGameState)
 			SendStat(siGameResult, loc("You win!"))
 			if GetHogLevel(CurrentHedgehog) == 0 then
 				SetState(CurrentHedgehog, bor(GetState(CurrentHedgehog), gstWinner))
@@ -539,7 +539,7 @@
 	_G.sm.lose = function(failReason)
 		if not _G.sm.gameEnded then
 			_G.sm.gameEnded = true
-			AddCaption(loc("Scenario failed!"), 0xFFFFFFFF, capgrpGameState)
+			AddCaption(loc("Scenario failed!"), capcolDefault, capgrpGameState)
 			SendStat(siGameResult, loc("You lose!"))
 			if failReason then
 				SendStat(siCustomAchievement, failReason)
@@ -836,7 +836,7 @@
 		end
 		if params.rubbers ~= nil then
 			for i, rubberData in pairs(params.rubbers) do
-				PlaceSprite(rubberData.x, rubberData.y, sprAmRubber, 0xFFFFFFFF, rubberData.frameIdx, false, false, false, lfBouncy)
+				PlaceSprite(rubberData.x, rubberData.y, sprAmRubber, capcolDefault, rubberData.frameIdx, false, false, false, lfBouncy)
 			end
 		end
 
--- a/share/hedgewars/Data/Scripts/TargetPractice.lua	Wed Aug 08 14:38:54 2018 +0200
+++ b/share/hedgewars/Data/Scripts/TargetPractice.lua	Wed Aug 08 15:22:34 2018 +0200
@@ -190,7 +190,7 @@
 	_G.onGameTick20 = function()
 		if TurnTimeLeft < 40 and TurnTimeLeft > 0 and scored < total_targets and game_lost == false then
 			game_lost = true
-			AddCaption(loc("Time’s up!"), 0xFFFFFFFF, capgrpGameState)
+			AddCaption(loc("Time’s up!"), capcolDefault, capgrpGameState)
 			ShowMission(params.missionTitle, loc("Aiming practice"), loc("Oh no! Time's up! Just try again."), -amSkip, 0)
 			SetHealth(player, 0)
 			time_goal = 1
@@ -199,7 +199,7 @@
 		if band(GetState(player), gstDrowning) == gstDrowning and game_lost == false and scored < total_targets then
 			game_lost = true
 			time_goal = 1
-			AddCaption(loc("You lose!"), 0xFFFFFFFF, capgrpGameState)
+			AddCaption(loc("You lose!"), capcolDefault, capgrpGameState)
 			ShowMission(params.missionTitle, loc("Aiming practice"), loc("Oh no! You failed! Just try again."), -amSkip, 0)
 		end
 
@@ -238,11 +238,11 @@
 			scored = scored + 1
 			SetTeamLabel(params.teamName, tostring(getTargetsScore()))
 			if scored < total_targets then
-				AddCaption(string.format(loc("Targets left: %d"), (total_targets-scored)), 0xFFFFFFFF, capgrpMessage)
+				AddCaption(string.format(loc("Targets left: %d"), (total_targets-scored)), capcolDefault, capgrpMessage)
 				spawnTarget()
 			else
 				if not game_lost then
-					AddCaption(loc("You have destroyed all targets!"), 0xFFFFFFFF, capgrpGameState)
+					AddCaption(loc("You have destroyed all targets!"), capcolDefault, capgrpGameState)
 					ShowMission(params.missionTitle, loc("Aiming practice"), loc("Congratulations! You have destroyed all targets within the time."), 0, 0)
 					PlaySound(sndVictory, player)
 					SetEffect(player, heInvulnerable, 1)
@@ -258,7 +258,7 @@
 		if GetGearType(gear) == gtHedgehog then
 			if not game_lost then
 				game_lost = true
-				AddCaption(loc("You lose!"), 0xFFFFFFFF, capgrpGameState)
+				AddCaption(loc("You lose!"), capcolDefault, capgrpGameState)
 				ShowMission(params.missionTitle, loc("Aiming practice"), loc("Oh no! You failed! Just try again."), -amSkip, 0)
 
 				SetHealth(player, 0)
@@ -269,7 +269,7 @@
 
 	_G.onGearDelete = function(gear)
 		if GetGearType(gear) == gtTarget and band(GetState(gear), gstDrowning) ~= 0 then
-			AddCaption(loc("You lost your target, try again!"), 0xFFFFFFFF, capgrpGameState)
+			AddCaption(loc("You lost your target, try again!"), capcolDefault, capgrpGameState)
 			local newTarget = spawnTarget()
 			local x, y = GetGearPosition(newTarget)
 			local success = PlaceSprite(x, y + 24, sprAmGirder, 0, 0xFFFFFFFF, false, false, false)