- Useless settings
+ The player gets teleported back in the glass after 1 second + Exschem failed to load/save schematic log + Set default player speed to 1.5master
parent
5c520052f5
commit
0ab898f1c2
14
SETTINGS.lua
14
SETTINGS.lua
|
@ -30,7 +30,7 @@ skywars_settings.celebration_time = 5
|
|||
skywars_settings.prefix = "Skywars > "
|
||||
|
||||
-- The players walking speed when ther're playing a match
|
||||
skywars_settings.player_speed = 1
|
||||
skywars_settings.player_speed = 1.5
|
||||
|
||||
-- The match duration in seconds
|
||||
skywars_settings.timer = 600
|
||||
|
@ -56,14 +56,6 @@ For X and Y, 0.0 and 1.0 represent opposite edges of the game window, for exampl
|
|||
-- The texture background for the kit menu
|
||||
skywars_settings.hud__kit_background = "Kits.png"
|
||||
|
||||
-- The width of the bacgkround texture in real coordinates,
|
||||
-- a unit of measurement which is roughly around 64 pixels, but
|
||||
-- varies based on the screen density and scaling settings of the client
|
||||
skywars_settings.background_width = 8
|
||||
|
||||
-- The height of the bacgkround texture in real coordinates
|
||||
skywars_settings.background_height = 8
|
||||
|
||||
-- The x position of the first buttons row
|
||||
skywars_settings.starting_x = 1.7
|
||||
|
||||
|
@ -79,7 +71,9 @@ skywars_settings.distance_y = 3
|
|||
-- The amount of buttons in a row
|
||||
skywars_settings.buttons_per_row = 3
|
||||
|
||||
-- The buttons width in real coordinates
|
||||
-- The buttons width in real coordinates,
|
||||
-- a unit of measurement which is roughly around 64 pixels, but
|
||||
-- varies based on the screen density and scaling settings of the client
|
||||
skywars_settings.buttons_width = 2
|
||||
|
||||
-- The buttons height in real coordinates
|
||||
|
|
|
@ -9,6 +9,7 @@ arena_lib.on_load("skywars", function(arena)
|
|||
|
||||
for pl_name in pairs(arena.players) do
|
||||
local player = minetest.get_player_by_name(pl_name)
|
||||
local pl_pos = player:get_pos()
|
||||
|
||||
-- preventing players with noclip to fall when placing blocks
|
||||
if minetest.check_player_privs(pl_name, {noclip=true}) then
|
||||
|
@ -43,6 +44,11 @@ arena_lib.on_load("skywars", function(arena)
|
|||
player:set_physics_override({gravity=0, jump=0})
|
||||
player:add_player_velocity(vector.multiply(player:get_player_velocity(), -1))
|
||||
end)
|
||||
|
||||
-- teleports the player back to in the glass
|
||||
minetest.after(1, function()
|
||||
player:set_pos(pl_pos)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
@ -2,13 +2,19 @@ function skywars.create_exschem_schematic(sender, pos1, pos2, name, arena)
|
|||
local path = minetest.get_worldpath() .."/schems/".. name
|
||||
path = path:gsub("//", "/")
|
||||
|
||||
exschem.save(pos1, pos2, false, 10, name, 0)
|
||||
local _,_, result = exschem.save(pos1, pos2, false, 10, name, 0)
|
||||
if result then
|
||||
minetest.log("error", "Skywars > " .. result)
|
||||
return
|
||||
end
|
||||
skywars.print_msg(sender, skywars.T("Schematic @1 created! (Saved in @2)", name, path))
|
||||
end
|
||||
|
||||
|
||||
|
||||
function skywars.load_exschem_schematic(pos1, schematic)
|
||||
minetest.log("action", "Skywars > Loading " .. schematic .. " at pos1:" .. minetest.serialize(pos1))
|
||||
exschem.load(pos1, pos1, 0, {}, schematic, 0)
|
||||
local _, _, result = exschem.load(pos1, pos1, 0, {}, schematic, 0)
|
||||
if result then
|
||||
minetest.log("error", "Skywars > " .. result)
|
||||
end
|
||||
end
|
|
@ -17,10 +17,9 @@ local function create_formspec(arena)
|
|||
"anchor[0.5,0.5]",
|
||||
"no_prepend[]",
|
||||
"bgcolor[#00000000;]",
|
||||
"background[0,0;"..skywars_settings.background_width..","..skywars_settings.background_height..";"..skywars_settings.hud__kit_background..";true]",
|
||||
"background[0,0;1,1;"..skywars_settings.hud__kit_background..";true]",
|
||||
"style_type[image_button;border=false]"
|
||||
}
|
||||
|
||||
local buttons_per_row = skywars_settings.buttons_per_row
|
||||
local distance_x = skywars_settings.distance_x
|
||||
local distance_y = skywars_settings.distance_y
|
||||
|
|
Loading…
Reference in New Issue