# HG changeset patch # User Wuzzy # Date 1518254368 -3600 # Node ID 7ea62261c4818d8b2e710e18c8d8f9055f7db27a # Parent eafaada79157a1b26e3a1783ebac863bcbba0e3a Construction Mode: Change message color diff -r eafaada79157 -r 7ea62261c481 ChangeLog.txt --- a/ChangeLog.txt Sat Feb 10 10:02:58 2018 +0100 +++ b/ChangeLog.txt Sat Feb 10 10:19:28 2018 +0100 @@ -19,6 +19,8 @@ Styles and game modes: + Construction Mode: Add a few shortcuts + Construction Mode: Remember all selections + + Construction Mode: Add subtle glow to healing station + + Construction Mode: Change message colors A Space Adventure: + Precise Shooting: Display collected ammo diff -r eafaada79157 -r 7ea62261c481 share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Sat Feb 10 10:02:58 2018 +0100 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Sat Feb 10 10:19:28 2018 +0100 @@ -130,7 +130,7 @@ local colorHealingStationParticle = 0x00FF00FF -local colorMessage = 0xFFBA00FF +local colorMessageError = 0xFFFFFFFF -- Fake ammo types, for the overwritten weapons in Construction Mode local amCMStructurePlacer = amAirAttack @@ -639,7 +639,7 @@ end if ((teleportDestinationSuccessful == false) or (teleportOriginSuccessful == false)) then - AddCaption(loc("Teleport Unsuccessful. Please teleport within a clan teleporter's sphere of influence.")) + AddCaption(loc("Teleport unsuccessful. Please teleport within a clan teleporter's sphere of influence."), colorMessageError, capgrpMessage) SetGearTarget(gear, GetX(CurrentHedgehog), GetY(CurrentHedgehog)) end @@ -954,10 +954,10 @@ function PlaceObject(x,y) if (clanUsedExtraTime[GetHogClan(CurrentHedgehog)] == true) and (cat[cIndex] == "Utility Crate Placement Mode") and (utilArray[pIndex][1] == amExtraTime) then - AddCaption(loc("You may only place 1 Extra Time crate per turn."),colorMessage,capgrpVolume) + AddCaption(loc("You may only place 1 Extra Time crate per turn."), colorMessageError, capgrpVolume) PlaySound(sndDenied) elseif (conf_cratesPerRound ~= "inf" and clanCratesSpawned[GetHogClan(CurrentHedgehog)] >= conf_cratesPerRound) and ( (cat[cIndex] == "Health Crate Placement Mode") or (cat[cIndex] == "Utility Crate Placement Mode") or (cat[cIndex] == "Weapon Crate Placement Mode") ) then - AddCaption(string.format(loc("You may only place %d crates per round."), conf_cratesPerRound),colorMessage,capgrpVolume) + AddCaption(string.format(loc("You may only place %d crates per round."), conf_cratesPerRound), colorMessageError, capgrpVolume) PlaySound(sndDenied) elseif (XYisInRect(x,y, clanBoundsSX[GetHogClan(CurrentHedgehog)],clanBoundsSY[GetHogClan(CurrentHedgehog)],clanBoundsEX[GetHogClan(CurrentHedgehog)],clanBoundsEY[GetHogClan(CurrentHedgehog)]) == true) and (clanPower[GetHogClan(CurrentHedgehog)] >= placedExpense) @@ -1014,15 +1014,15 @@ if placed then clanPower[GetHogClan(CurrentHedgehog)] = clanPower[GetHogClan(CurrentHedgehog)] - placedExpense else - AddCaption(loc("Invalid Placement"),colorMessage,capgrpVolume) + AddCaption(loc("Invalid Placement"), colorMessageError, capgrpVolume) PlaySound(sndDenied) end else if (clanPower[GetHogClan(CurrentHedgehog)] >= placedExpense) then - AddCaption(loc("Invalid Placement"),colorMessage,capgrpVolume) + AddCaption(loc("Invalid Placement"), colorMessageError, capgrpVolume) else - AddCaption(loc("Insufficient Power"),colorMessage,capgrpVolume) + AddCaption(loc("Insufficient Power"), colorMessageError, capgrpVolume) end PlaySound(sndDenied) end @@ -1138,7 +1138,7 @@ end if updated then - AddCaption(loc(cat[cIndex]), colorMessage, capgrpMessage) + AddCaption(loc(cat[cIndex]), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpMessage) showModeMessage() wallsVisible = true else @@ -1250,7 +1250,7 @@ placedExpense = utilArray[pIndex][2] end - AddCaption(string.format(loc("Cost: %d"), placedExpense), colorMessage, capgrpAmmostate) + AddCaption(string.format(loc("Cost: %d"), placedExpense), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmostate) end @@ -1297,7 +1297,7 @@ else str = tostring(val) end - AddCaption(str, colorMessage, capgrpMessage2) + AddCaption(str, GetClanColor(GetHogClan(CurrentHedgehog)), capgrpMessage2) end function rotateMode(pDir)