mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-09 20:36:15 +00:00
Merge branch 'main' into main
This commit is contained in:
commit
cdeeca752a
6 changed files with 37 additions and 36 deletions
|
|
@ -64,10 +64,10 @@ function set_player_mode(player, mode) -- Set player mode (spectator, pre-match,
|
||||||
playertag.set(player, playertag.TYPE_ENTITY, {a = 255, r = 255, g = 255, b = 255})
|
playertag.set(player, playertag.TYPE_ENTITY, {a = 255, r = 255, g = 255, b = 255})
|
||||||
|
|
||||||
player:set_inventory_formspec([[
|
player:set_inventory_formspec([[
|
||||||
size[8,4]
|
size[8,4]
|
||||||
list[current_player;main;0,0;8,1;]
|
list[current_player;main;0,0;8,1;]
|
||||||
list[current_player;main;0,1.25;8,3;8]
|
list[current_player;main;0,1.25;8,3;8]
|
||||||
listring[current_player;main]
|
listring[current_player;main]
|
||||||
]])
|
]])
|
||||||
|
|
||||||
player:hud_set_flags({
|
player:hud_set_flags({
|
||||||
|
|
@ -75,6 +75,7 @@ function set_player_mode(player, mode) -- Set player mode (spectator, pre-match,
|
||||||
healthbar = true,
|
healthbar = true,
|
||||||
breathbar = true,
|
breathbar = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
elseif mode == "spectator" then
|
elseif mode == "spectator" then
|
||||||
privs.noclip, privs.fast, privs.fly, privs.interact, privs.debug = true, true, true, false, true
|
privs.noclip, privs.fast, privs.fly, privs.interact, privs.debug = true, true, true, false, true
|
||||||
|
|
||||||
|
|
@ -83,10 +84,10 @@ function set_player_mode(player, mode) -- Set player mode (spectator, pre-match,
|
||||||
core.chat_send_player(player_name, core.colorize("#0574fc", "You are now a spectator."))
|
core.chat_send_player(player_name, core.colorize("#0574fc", "You are now a spectator."))
|
||||||
|
|
||||||
player:set_inventory_formspec([[
|
player:set_inventory_formspec([[
|
||||||
size[8,4]
|
size[8,4]
|
||||||
list[current_player;main;0,0;8,1;]
|
list[current_player;main;0,0;8,1;]
|
||||||
list[current_player;main;0,1.25;8,3;8]
|
list[current_player;main;0,1.25;8,3;8]
|
||||||
listring[current_player;main]
|
listring[current_player;main]
|
||||||
]])
|
]])
|
||||||
|
|
||||||
player:hud_set_flags({
|
player:hud_set_flags({
|
||||||
|
|
@ -101,7 +102,7 @@ function set_player_mode(player, mode) -- Set player mode (spectator, pre-match,
|
||||||
make_player_invisible(player)
|
make_player_invisible(player)
|
||||||
|
|
||||||
player:set_inventory_formspec([[
|
player:set_inventory_formspec([[
|
||||||
size[8,6]
|
size[8,6]
|
||||||
|
|
||||||
label[3,0.1;Change class:]
|
label[3,0.1;Change class:]
|
||||||
|
|
||||||
|
|
@ -109,9 +110,9 @@ function set_player_mode(player, mode) -- Set player mode (spectator, pre-match,
|
||||||
button[2.8,1;2.5,1;class_assault;]] .. map_data.classes.class_2.name .. [[]
|
button[2.8,1;2.5,1;class_assault;]] .. map_data.classes.class_2.name .. [[]
|
||||||
button[5.3,1;2.5,1;class_shotgun;]] .. map_data.classes.class_3.name .. [[]
|
button[5.3,1;2.5,1;class_shotgun;]] .. map_data.classes.class_3.name .. [[]
|
||||||
|
|
||||||
list[current_player;main;0,2;8,1;]
|
list[current_player;main;0,2;8,1;]
|
||||||
list[current_player;main;0,3.25;8,3;8]
|
list[current_player;main;0,3.25;8,3;8]
|
||||||
listring[current_player;main]
|
listring[current_player;main]
|
||||||
]])
|
]])
|
||||||
|
|
||||||
player:hud_set_flags({
|
player:hud_set_flags({
|
||||||
|
|
@ -239,13 +240,12 @@ function end_match() -- End the match
|
||||||
player:get_inventory():set_list("main", {})
|
player:get_inventory():set_list("main", {})
|
||||||
|
|
||||||
player:set_inventory_formspec([[
|
player:set_inventory_formspec([[
|
||||||
size[8,4]
|
size[8,4]
|
||||||
list[current_player;main;0,0;8,1;]
|
list[current_player;main;0,0;8,1;]
|
||||||
list[current_player;main;0,1.25;8,3;8]
|
list[current_player;main;0,1.25;8,3;8]
|
||||||
listring[current_player;main]
|
listring[current_player;main]
|
||||||
]])
|
]])
|
||||||
|
|
||||||
|
|
||||||
player:set_properties({pointable = false})
|
player:set_properties({pointable = false})
|
||||||
|
|
||||||
set_player_mode(player, "normal")
|
set_player_mode(player, "normal")
|
||||||
|
|
|
||||||
|
|
@ -38,11 +38,12 @@ core.register_on_joinplayer(function(player)
|
||||||
player:get_inventory():set_list("main", {})
|
player:get_inventory():set_list("main", {})
|
||||||
|
|
||||||
player:set_inventory_formspec([[
|
player:set_inventory_formspec([[
|
||||||
size[8,4]
|
size[8,4]
|
||||||
list[current_player;main;0,0;8,1;]
|
list[current_player;main;0,0;8,1;]
|
||||||
list[current_player;main;0,1.25;8,3;8]
|
list[current_player;main;0,1.25;8,3;8]
|
||||||
listring[current_player;main]
|
listring[current_player;main]
|
||||||
]])
|
]])
|
||||||
|
|
||||||
player:set_properties({pointable = false})
|
player:set_properties({pointable = false})
|
||||||
|
|
||||||
player:hud_set_flags({
|
player:hud_set_flags({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue