Changed teams color (red -> orange) and HUD positive messages color (sky blue -> green)

master
Zughy 2020-11-30 00:27:15 +01:00
parent 2e8ded1ce6
commit 14e352f1f2
13 changed files with 40 additions and 40 deletions

View File

@ -19,11 +19,11 @@ function block_league.info_panel_create(arena, p_name)
alignment = { x = 0, y = 0 },
text = "bl_hud_panel_playerindicator_teams.png"
},
team_indicator_red = {
team_indicator_orange = {
scale = {x = 44, y = 1.7},
offset = {x = 0, y = -121},
alignment = { x = 0, y = 0 },
text = "bl_hud_panel_teamindicator_red.png"
text = "bl_hud_panel_teamindicator_orange.png"
},
team_indicator_blue = {
scale = {x = 44, y = 1.7},
@ -63,7 +63,7 @@ function block_league.info_panel_update(arena)
-- creo una tabella per avere i giocatori ordinati con nome come KEY
local players_idx = {}
local bar_red = -121
local bar_orange = -121
local bar_blue = -121
local bar_pos = -121 -- posizione Y più alta della barra per evidenziare il giocatore client
@ -83,8 +83,8 @@ function block_league.info_panel_update(arena)
kills_clmn = kills_clmn .. team.kills .. "\n\n"
deaths_clmn = deaths_clmn .. team.deaths .. "\n\n"
if team.name == S("red") then
bar_red = bar_pos
if team.name == S("orange") then
bar_orange = bar_pos
elseif team.name == S("blue") then
bar_blue = bar_pos
end
@ -137,8 +137,8 @@ function block_league.info_panel_update(arena)
{player_indicator = {
offset = { x = 0, y = bar_height }
},
team_indicator_red = {
offset = { x = 0, y = bar_red }
team_indicator_orange = {
offset = { x = 0, y = bar_orange }
},
team_indicator_blue = {
offset = { x = 0, y = bar_blue }

View File

@ -61,7 +61,7 @@ end
function block_league.hud_log_update(arena, action, executor, receiver)
function block_league.hud_log_update(arena, action_img, executor, receiver)
for pl_name, pl_stats in pairs(arena.players) do
@ -92,7 +92,7 @@ function block_league.hud_log_update(arena, action, executor, receiver)
},
action_3 = {
offset = { x = calc_action_offset(receiver), y = row3_height_img },
text = action
text = action_img
}
},

View File

@ -11,7 +11,7 @@ function block_league.scoreboard_create(arena, p_name)
title = "",
sub_txt_elems = {
team_red_score = {
team_orange_score = {
offset = { x = -88, y = 41 },
size = { x = 2 },
number = "0xE6482E",
@ -40,20 +40,20 @@ function block_league.scoreboard_update_score(arena)
for pl_name, stats in pairs(arena.players) do
local panel = panel_lib.get_panel(pl_name, "bl_scoreboard")
local score_red = 0
local score_orange = 0
local score_blue = 0
if arena.mode == 1 then
score_red = arena.teams[1].TDs
score_orange = arena.teams[1].TDs
score_blue = arena.teams[2].TDs
else
score_red = arena.teams[1].kills
score_orange = arena.teams[1].kills
score_blue = arena.teams[2].kills
end
panel:update(nil, {
team_red_score = {
text = score_red
team_orange_score = {
text = score_orange
},
team_blue_score = {
text = score_blue

View File

@ -9,17 +9,17 @@ end)
arena_lib.on_timeout("block_league", function(arena)
local winner_team_ID = 0
local team_red = arena.teams[1]
local team_orange = arena.teams[1]
local team_blue = arena.teams[2]
if team_red.TDs > team_blue.TDs then
if team_orange.TDs > team_blue.TDs then
winner_team_ID = 1
elseif team_blue.TDs > team_red.TDs then
elseif team_blue.TDs > team_orange.TDs then
winner_team_ID = 2
else
if team_red.kills > team_blue.kills then
if team_orange.kills > team_blue.kills then
winner_team_ID = 1
elseif team_blue.kills > team_red.kills then
elseif team_blue.kills > team_orange.kills then
winner_team_ID = 2
end
end

View File

@ -157,7 +157,7 @@ function ball:on_step(d_time, moveresult)
-- se il giocatore è vivo
if w_pos == nil then return end
local goal = self.team_name == S("red") and arena.goal_red or arena.goal_blue
local goal = self.team_name == S("orange") and arena.goal_orange or arena.goal_blue
check_for_touchdown(id, arena, self, wielder, w_pos, goal)
end
@ -303,12 +303,12 @@ function add_point(teamID, arena)
for _, pl_name in pairs(team) do
minetest.sound_play("bl_crowd_cheer", {to_player = pl_name})
block_league.HUD_ball_update(pl_name, S("NICE POINT!"), "0x43e6FF")
block_league.HUD_ball_update(pl_name, S("NICE POINT!"), "0xabf877")
end
for _, pl_name in pairs(enemy_team) do
minetest.sound_play("bl_crowd_ohno", {to_player = pl_name})
block_league.HUD_ball_update(pl_name, S("ENEMY TEAM SCORED..."), "0xFF5D43")
block_league.HUD_ball_update(pl_name, S("ENEMY TEAM SCORED..."), "0xff8e8e")
end
arena.teams[teamID].TDs = arena.teams[teamID].TDs + 1
@ -348,23 +348,23 @@ function announce_ball_possession_change(arena, w_name, is_ball_lost)
if is_ball_lost then
for _, pl_name in pairs(team) do
minetest.sound_play("bl_crowd_ohno", {to_player = pl_name})
block_league.HUD_ball_update(pl_name, S("Your team lost the ball!"), "0xFF5D43")
block_league.HUD_ball_update(pl_name, S("Your team lost the ball!"), "0xff8e8e")
end
for _, pl_name in pairs(enemy_team) do
minetest.sound_play("bl_crowd_cheer", {to_player = pl_name})
block_league.HUD_ball_update(pl_name, S("Enemy team lost the ball!"), "0x43e6FF")
block_league.HUD_ball_update(pl_name, S("Enemy team lost the ball!"), "0xabf877")
end
else
for _, pl_name in pairs(team) do
minetest.sound_play("bl_crowd_cheer", {to_player = pl_name})
block_league.HUD_ball_update(pl_name, S("Your team got the ball!"), "0x43e6FF")
block_league.HUD_ball_update(pl_name, S("Your team got the ball!"), "0xabf877")
end
block_league.HUD_ball_update(w_name, S("You got the ball!"), "0x43e6FF")
block_league.HUD_ball_update(w_name, S("You got the ball!"), "0xabf877")
for _, pl_name in pairs(enemy_team) do
minetest.sound_play("bl_crowd_ohno", {to_player = pl_name})
block_league.HUD_ball_update(pl_name, S("Enemy team got the ball!"), "0xFF5D43")
block_league.HUD_ball_update(pl_name, S("Enemy team got the ball!"), "0xff8e8e")
end
end
end

View File

@ -118,11 +118,11 @@ ChatCmdBuilder.new("bladmin", function(cmd)
minetest.chat_send_player(sender, "Invalid parameter")
return end
if team ~= "red" and team ~= "blue" then
if team ~= "orange" and team ~= "blue" then
minetest.chat_send_player(sender, "Invalid parameter")
return end
local team_goal = team == "red" and "goal_red" or "goal_blue"
local team_goal = team == "orange" and "goal_orange" or "goal_blue"
if option == "set" then
local pos = vector.round(minetest.get_player_by_name(sender):get_pos())
@ -167,11 +167,11 @@ ChatCmdBuilder.new("bladmin", function(cmd)
minetest.chat_send_player(sender, "Invalid parameter")
return end
if team ~= "red" and team ~= "blue" then
if team ~= "orange" and team ~= "blue" then
minetest.chat_send_player(sender, "Invalid parameter")
return end
local w_room = team == "red" and "waiting_room_red" or "waiting_room_blue"
local w_room = team == "orange" and "waiting_room_orange" or "waiting_room_blue"
if option == "set" then
local pos = vector.round(minetest.get_player_by_name(sender):get_pos())

View File

@ -10,8 +10,8 @@ dofile(modpath .. "/GLOBALS.lua")
arena_lib.register_minigame("block_league", {
prefix = "[Block League] ",
teams = { S("red"), S("blue") },
teams_color_overlay = { "red", "blue"},
teams = { S("orange"), S("blue") },
teams_color_overlay = { "orange", "blue"},
hotbar = {
slots = 4,
@ -39,9 +39,9 @@ arena_lib.register_minigame("block_league", {
mode = 1,
score_cap = 10,
immunity_time = 6,
goal_red = {},
goal_orange = {},
goal_blue = {},
waiting_room_red = {},
waiting_room_orange = {},
waiting_room_blue = {},
ball_spawn = {},
min_y = 0

View File

@ -4,7 +4,7 @@
# textdomain: block_league
# init.lua
red=rojo
orange=naranja
blue=azul
# info_panel.lua

View File

@ -4,7 +4,7 @@
# textdomain: block_league
# init.lua
red=rossa
orange=arancione
blue=blu
# info_panel.lua

View File

@ -4,7 +4,7 @@
# textdomain: block_league
# init.lua
red=
orange=
blue=
# info_panel.lua

View File

@ -47,7 +47,7 @@ minetest.register_on_respawnplayer(function(player)
if player:get_meta():get_int("bl_death_delay") == 1 then
if arena.players[p_name].teamID == 1 then
player:set_pos(arena.waiting_room_red)
player:set_pos(arena.waiting_room_orange)
else
player:set_pos(arena.waiting_room_blue)
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B