Added class name notification of the next boss
This commit is contained in:
parent
e9bc1459e2
commit
355680edf8
3 changed files with 20 additions and 16 deletions
|
@ -781,11 +781,12 @@ function GM:ZombieHUD()
|
||||||
local y = ScrH() * 0.3
|
local y = ScrH() * 0.3
|
||||||
draw_SimpleTextBlur(translate.Get("waiting_for_next_wave"), "ZSHUDFont", x, y, COLOR_DARKRED, TEXT_ALIGN_CENTER)
|
draw_SimpleTextBlur(translate.Get("waiting_for_next_wave"), "ZSHUDFont", x, y, COLOR_DARKRED, TEXT_ALIGN_CENTER)
|
||||||
local pl = GAMEMODE.NextBossZombie
|
local pl = GAMEMODE.NextBossZombie
|
||||||
|
local bossname = GAMEMODE.NextBossZombieClass
|
||||||
if pl and pl:IsValid() then
|
if pl and pl:IsValid() then
|
||||||
if pl == MySelf then
|
if pl == MySelf then
|
||||||
draw_SimpleTextBlur(translate.Get("you_will_be_next_boss_zombie"), "ZSHUDFont", x, y+th, COLOR_RED, TEXT_ALIGN_CENTER)
|
draw_SimpleTextBlur(translate.Format("you_will_be_x_soon", "'"..bossname.."'"), "ZSHUDFont", x, y+th, COLOR_RED, TEXT_ALIGN_CENTER)
|
||||||
else
|
else
|
||||||
draw_SimpleTextBlur(translate.Format("x_will_be_next_boss_zombie", pl:Name()), "ZSHUDFont", x, y+th, COLOR_GRAY, TEXT_ALIGN_CENTER)
|
draw_SimpleTextBlur(translate.Format("x_will_be_y_soon", pl:Name(), "'"..bossname.."'"), "ZSHUDFont", x, y+th, COLOR_GRAY, TEXT_ALIGN_CENTER)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if MySelf:GetZombieClassTable().NeverAlive then
|
if MySelf:GetZombieClassTable().NeverAlive then
|
||||||
|
@ -1644,6 +1645,7 @@ end)
|
||||||
|
|
||||||
net.Receive("zs_nextboss", function(length)
|
net.Receive("zs_nextboss", function(length)
|
||||||
GAMEMODE.NextBossZombie = net.ReadEntity()
|
GAMEMODE.NextBossZombie = net.ReadEntity()
|
||||||
|
GAMEMODE.NextBossZombieClass = net.ReadString()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
net.Receive("zs_zvols", function(length)
|
net.Receive("zs_zvols", function(length)
|
||||||
|
|
|
@ -990,20 +990,22 @@ function GM:CalculateNextBoss()
|
||||||
if ent:GetZombieClassTable().Boss and ent:Alive() then
|
if ent:GetZombieClassTable().Boss and ent:Alive() then
|
||||||
livingbosses = livingbosses + 1
|
livingbosses = livingbosses + 1
|
||||||
if livingbosses >= 3 then return end
|
if livingbosses >= 3 then return end
|
||||||
else
|
else
|
||||||
if ent:GetInfo("zs_nobosspick") == "0" then
|
if ent:GetInfo("zs_nobosspick") == "0" then
|
||||||
table.insert(zombies, ent)
|
table.insert(zombies, ent)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.sort(zombies, BossZombieSort)
|
end
|
||||||
local newboss = zombies[1]
|
table.sort(zombies, BossZombieSort)
|
||||||
if not newboss or newboss ~= GAMEMODE.NextBossZombie then
|
local newboss = zombies[1]
|
||||||
net.Start("zs_nextboss")
|
if newboss and newboss:IsValid() then
|
||||||
net.WriteEntity(newboss)
|
local newbossclass = GAMEMODE.ZombieClasses[newboss:GetBossZombieIndex()].Name
|
||||||
net.Broadcast()
|
net.Start("zs_nextboss")
|
||||||
end
|
net.WriteEntity(newboss)
|
||||||
return newboss
|
net.WriteString(newbossclass)
|
||||||
|
net.Broadcast()
|
||||||
|
end
|
||||||
|
return newboss
|
||||||
end
|
end
|
||||||
|
|
||||||
function GM:LastBite(victim, attacker)
|
function GM:LastBite(victim, attacker)
|
||||||
|
|
|
@ -103,8 +103,8 @@ LANGUAGE.intermission = "Intermission"
|
||||||
LANGUAGE.press_f2_for_the_points_shop = "Press F2 for the Points Shop!"
|
LANGUAGE.press_f2_for_the_points_shop = "Press F2 for the Points Shop!"
|
||||||
LANGUAGE.breath = "Breath"
|
LANGUAGE.breath = "Breath"
|
||||||
LANGUAGE.zombie_volunteers = "Zombie Volunteers"
|
LANGUAGE.zombie_volunteers = "Zombie Volunteers"
|
||||||
LANGUAGE.x_will_be_next_boss_zombie = "%s will become a boss zombie soon!"
|
LANGUAGE.x_will_be_y_soon = "%s will become %s soon!"
|
||||||
LANGUAGE.you_will_be_next_boss_zombie = "You will become a boss zombie soon!"
|
LANGUAGE.you_will_be_x_soon = "You will become %s soon!"
|
||||||
LANGUAGE.x_discount_for_buying_between_waves = "%d%% discount for buying between waves!"
|
LANGUAGE.x_discount_for_buying_between_waves = "%d%% discount for buying between waves!"
|
||||||
LANGUAGE.number_of_initial_zombies_this_game = "Number of initial zombies this game (%d%%): %d"
|
LANGUAGE.number_of_initial_zombies_this_game = "Number of initial zombies this game (%d%%): %d"
|
||||||
LANGUAGE.humans_closest_to_spawns_are_zombies = "The humans closest to the zombie spawns will start as zombies."
|
LANGUAGE.humans_closest_to_spawns_are_zombies = "The humans closest to the zombie spawns will start as zombies."
|
||||||
|
|
Loading…
Reference in a new issue