Added some checks to pos2/pos2 and createschematic cmds
+ Modified HUD proportionsmaster
parent
20717ba6ee
commit
f54a7ea507
|
@ -67,7 +67,7 @@ skywars_settings.background_height = 12
|
|||
skywars_settings.starting_x = 2.2
|
||||
|
||||
-- The y position of the first buttons row
|
||||
skywars_settings.starting_y = 6.8
|
||||
skywars_settings.starting_y = 7
|
||||
|
||||
-- The horizontal distance betweek buttons in real coordinates
|
||||
skywars_settings.distance_x = 3
|
||||
|
|
23
commands.lua
23
commands.lua
|
@ -581,7 +581,12 @@ function(cmd)
|
|||
|
||||
cmd:sub("pos1", function(sender)
|
||||
local player = minetest.get_player_by_name(sender)
|
||||
local looking_dir = player:get_look_dir()
|
||||
|
||||
if looking_dir.z <= 0 then
|
||||
skywars.print_error(sender, skywars.T("You have to look to the north!"))
|
||||
return
|
||||
end
|
||||
player:get_meta():set_string("pos1", minetest.serialize(player:get_pos()))
|
||||
skywars.print_msg(sender, skywars.T("Position saved!"))
|
||||
end)
|
||||
|
@ -590,9 +595,14 @@ function(cmd)
|
|||
|
||||
cmd:sub("pos2", function(sender)
|
||||
local player = minetest.get_player_by_name(sender)
|
||||
local looking_dir = player:get_look_dir()
|
||||
|
||||
if looking_dir.z <= 0 then
|
||||
skywars.print_error(sender, skywars.T("You have to look to the north!"))
|
||||
return
|
||||
end
|
||||
|
||||
player:get_meta():set_string("pos2", minetest.serialize(player:get_pos()))
|
||||
|
||||
skywars.print_msg(sender, skywars.T("Position saved!"))
|
||||
end)
|
||||
|
||||
|
@ -608,16 +618,15 @@ function(cmd)
|
|||
if arena == nil then
|
||||
skywars.print_error(sender, skywars.T("Arena not found!"))
|
||||
return
|
||||
end
|
||||
|
||||
if arena.enabled == true then
|
||||
elseif arena.enabled == true then
|
||||
skywars.print_error(sender, skywars.T("@1 must be disabled!", arena_name))
|
||||
return
|
||||
end
|
||||
|
||||
if pos1 == "" or pos2 == "" then
|
||||
elseif pos1 == "" or pos2 == "" then
|
||||
skywars.print_error(sender, skywars.T("Pos1 or pos2 are not set!"))
|
||||
return
|
||||
elseif pos1.z > pos2.z then
|
||||
skywars.print_error(sender, skywars.T("Pos1 Z has to be smaller than pos2!"))
|
||||
return
|
||||
end
|
||||
|
||||
skywars.create_schematic(sender, {x = pos1.x, y = pos1.y, z = pos1.z}, {x = pos2.x, y = pos2.y, z = pos2.z}, name, arena)
|
||||
|
|
|
@ -23,6 +23,8 @@ Chest not found!=Cassa non trovata!
|
|||
Chest list:=Lista delle casse:
|
||||
ID: @1 - POSITION: @2=ID: @1 - POSIZIONE: @2
|
||||
Position saved!=Posizione salvata
|
||||
You have to look to the north!=Devi guardare a nord!
|
||||
Pos1 Z has to be smaller than pos2!=La Z di pos1 deve essere minore di quella di pos2
|
||||
Schematic @1 created! You can use /skywars info @2 to know its folder (see schematic@=PATH)=Schematica @1 creata! Puoi usare /skywars info @2 per sapere dove è salvata (vedi schematic@=PERCORSO)
|
||||
@1 wasn't configured properly!=@1 non è stata configurata correttamente
|
||||
@1 must be disabled!=@1 deve essere disabilitata!
|
||||
|
|
|
@ -25,6 +25,8 @@ Chest not found!=
|
|||
Chest list:=
|
||||
ID: @1 - POSITION: @2=
|
||||
Position saved!=
|
||||
You have to look to the north!=
|
||||
Pos1 Z has to be smaller than pos2!=
|
||||
Schematic @1 created! You can use /skywars info @2 to know its folder (see schematic@=PATH)=
|
||||
@1 wasn't configured properly!=
|
||||
@1 must be disabled!=
|
||||
|
|
Loading…
Reference in New Issue