remove whitespaces (#12)

This commit is contained in:
CrazyladMT 2026-02-19 23:02:56 -05:00 committed by GitHub
commit fc1407feff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 90 additions and 90 deletions

View file

@ -50,10 +50,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({
@ -61,6 +61,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
@ -69,10 +70,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({
@ -87,7 +88,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:]
@ -95,9 +96,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({
@ -195,13 +196,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")

View file

@ -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({

View file

@ -46,7 +46,6 @@ function place_map(map)
map_data.classes.class_3.name = "Short-range" map_data.classes.class_3.name = "Short-range"
end end
return map_data return map_data
end end

View file

@ -12,11 +12,11 @@ local map_data = {
start_time = 15, start_time = 15,
scripts = { scripts = {
on_start = "for x=0, 40 do\nfor y=0, 17 do\nfor z=0, 37 do\ncore.set_node({x=x,y=31+y,z=z}, {name=\"default:glass\"})\nend\nend\nend", on_start = "for x=0, 40 do\nfor y=0, 17 do\nfor z=0, 37 do\ncore.set_node({x=x,y=31+y,z=z}, {name=\"default:glass\"})\nend\nend\nend",
on_barrier_remove = "", on_barrier_remove = "",
on_end = "" on_end = ""
} }
} }
return map_data return map_data

View file

@ -1,22 +1,22 @@
local map_data = { local map_data = {
name = "forest-4", name = "forest-4",
size_x = 190, size_x = 190,
size_y = 69, size_y = 69,
size_z = 155, size_z = 155,
barrier_level = 65, barrier_level = 65,
spawn_x = nil, spawn_x = nil,
spawn_y = nil, spawn_y = nil,
spawn_z = nil, spawn_z = nil,
start_time = 30, start_time = 30,
scripts = { scripts = {
on_start = "for x=0, 189 do\nfor y=0, 10 do\nfor z=0, 154 do\ncore.set_node({x=x,y=69+y,z=z}, {name=\"air\"})\nend\nend\nend", on_start = "for x=0, 189 do\nfor y=0, 10 do\nfor z=0, 154 do\ncore.set_node({x=x,y=69+y,z=z}, {name=\"air\"})\nend\nend\nend",
on_barrier_remove = "", on_barrier_remove = "",
on_end = "" on_end = ""
}, },
classes = { classes = {
class_1 = { class_1 = {

View file

@ -12,11 +12,11 @@ local map_data = {
start_time = 15, start_time = 15,
scripts = { scripts = {
on_start = "", on_start = "",
on_barrier_remove = "", on_barrier_remove = "",
on_end = "" on_end = ""
} }
} }
return map_data return map_data