# HG changeset patch # User Wuzzy # Date 1480079160 -3600 # Node ID ed40d46c9e59be6edc0cb4a99f998d8da505daf1 # Parent 6c734d8defefd57b0325a1dc5db0871d15ce1286 Remove team score messages in Knockball/Basketball because they're redundant diff -r 6c734d8defef -r ed40d46c9e59 share/hedgewars/Data/Maps/Basketball/map.lua --- a/share/hedgewars/Data/Maps/Basketball/map.lua Fri Nov 25 13:53:22 2016 +0100 +++ b/share/hedgewars/Data/Maps/Basketball/map.lua Fri Nov 25 14:06:00 2016 +0100 @@ -2,8 +2,6 @@ HedgewarsScriptLoad("/Scripts/Locale.lua") -local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} - local started = false function onGameInit() @@ -24,39 +22,11 @@ started = true end -function onGameTick() -end - function onAmmoStoreInit() SetAmmo(amBaseballBat, 9, 0, 0, 0) SetAmmo(amSkip, 9, 0, 0, 0) end -function onGearAdd(gear) -end - -function onGearDelete(gear) - if not started then - return - end - if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then - local clan = GetHogClan(CurrentHedgehog) - local s - if clan ~= nil then - if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then - score[clan] = score[clan] + 1 - s = string.format(loc("%s is out and Team %d|scored a point!| |Score:"), GetHogName(gear), clan + 1) - else - score[clan] = score[clan] - 1 - s = string.format(loc("%s is out and Team %d|scored a penalty!| |Score:"), GetHogName(gear), clan + 1) - end - s = s .. " " .. score[0] - for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end - ShowMission(loc("Basketball"), loc("Not So Friendly Match"), s, -amBaseballBat, 0) - end - end -end - function onNewTurn() SetWeapon(amBaseballBat) end diff -r 6c734d8defef -r ed40d46c9e59 share/hedgewars/Data/Maps/Knockball/map.lua --- a/share/hedgewars/Data/Maps/Knockball/map.lua Fri Nov 25 13:53:22 2016 +0100 +++ b/share/hedgewars/Data/Maps/Knockball/map.lua Fri Nov 25 14:06:00 2016 +0100 @@ -2,12 +2,8 @@ HedgewarsScriptLoad("/Scripts/Locale.lua") -local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} - local ball = nil -local started = false - function onGameInit() GameFlags = gfSolidLand + gfInvulnerable + gfDivideTeams TurnTime = 20000 @@ -22,7 +18,6 @@ function onGameStart() ShowMission(loc("Knockball"), loc("Not So Friendly Match"), loc("Bat balls at your enemies and|push them into the sea!"), -amBaseballBat, 0) - started = true end function onGameTick() @@ -48,26 +43,8 @@ end function onGearDelete(gear) - if not started then - return - end if gear == ball then ball = nil - elseif (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then - local clan = GetHogClan(CurrentHedgehog) - local s - if clan ~= nil then - if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then - score[clan] = score[clan] + 1 - s = string.format(loc("%s is out and Team %d|scored a point!| |Score:"), GetHogName(gear), clan + 1) - else - score[clan] = score[clan] - 1 - s = string.format(loc("%s is out and Team %d|scored a penalty!| |Score:"), GetHogName(gear), clan + 1) - end - s = s .. " " .. score[0] - for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end - ShowMission(loc("Knockball"), loc("Not So Friendly Match"), s, -amBaseballBat, 0) - end end end