parent
04038dc288
commit
2b8222cc40
|
@ -34,7 +34,11 @@ arena_lib.on_start("skywars", function(arena)
|
|||
local player = minetest.get_player_by_name(pl_name)
|
||||
|
||||
skywars.generate_HUD(arena, pl_name)
|
||||
player:set_physics_override({speed = skywars_settings.player_speed, gravity=1, jump=1})
|
||||
player:set_physics_override({
|
||||
speed = skywars_settings.player_speed,
|
||||
gravity=1,
|
||||
jump=1
|
||||
})
|
||||
skywars.activate_enderpearl(player, arena)
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -33,7 +33,7 @@ function skywars.generate_HUD(arena, pl_name)
|
|||
players_count_ = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x = x_pos, y = y_pos},
|
||||
offset = {x = distance_x+background_width+39, y = 50+6},
|
||||
offset = {x = distance_x+background_width+39, y = 50+3},
|
||||
text = tostring(arena.players_amount) .. "/" .. tostring(arena.players_original_amount),
|
||||
alignment = {x = 0},
|
||||
scale = {x = 100, y = 100},
|
||||
|
@ -43,7 +43,7 @@ function skywars.generate_HUD(arena, pl_name)
|
|||
players_killed_ = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x = x_pos, y = y_pos},
|
||||
offset = {x = -distance_x+34, y = 50+4},
|
||||
offset = {x = -distance_x+36, y = 50+3},
|
||||
text = 0,
|
||||
alignment = {x = 0},
|
||||
scale = {x = 100, y = 100},
|
||||
|
|
16
commands.lua
16
commands.lua
|
@ -116,8 +116,8 @@ ChatCmdBuilder.new("skywars", function(cmd)
|
|||
-- ! CHEST CMDS ! --
|
||||
--------------------
|
||||
|
||||
cmd:sub("addtreasure :arena :treasure :count:int :rarity:number :preciousness:int",
|
||||
function(sender, arena_name, treasure_name, count, rarity, preciousness )
|
||||
cmd:sub("addtreasure :arena :treasure :count:int :preciousness:int :rarity:number",
|
||||
function(sender, arena_name, treasure_name, count, preciousness, rarity)
|
||||
local arena, arena_name = get_valid_arena(arena_name, sender, true)
|
||||
|
||||
if not arena then
|
||||
|
@ -152,13 +152,13 @@ ChatCmdBuilder.new("skywars", function(cmd)
|
|||
|
||||
|
||||
|
||||
cmd:sub("addtreasure hand :arena :preciousness:int :rarity:number",
|
||||
function(sender, arena_name, rarity, preciousness)
|
||||
cmd:sub("addtreasure hand :arena :rarity:number :preciousness:int",
|
||||
function(sender, arena_name, preciousness, rarity)
|
||||
local arena, arena_name = get_valid_arena(arena_name, sender, true)
|
||||
local treasure_itemstack = get_wielded_item(sender)
|
||||
local wielded_itemstack = get_wielded_item(sender)
|
||||
local treasure = {}
|
||||
|
||||
if not arena or not treasure_itemstack then
|
||||
if not arena or not wielded_itemstack then
|
||||
return
|
||||
elseif rarity < 1 or rarity > 10 then
|
||||
skywars.print_error(sender, skywars.T("Rarity has to be between 1 and 10!"))
|
||||
|
@ -168,9 +168,9 @@ ChatCmdBuilder.new("skywars", function(cmd)
|
|||
local item_id = 1
|
||||
if arena.treasures[#arena.treasures] then item_id = arena.treasures[#arena.treasures].id+1 end
|
||||
treasure = {
|
||||
name = treasure_itemstack.name,
|
||||
name = wielded_itemstack.name,
|
||||
rarity = rarity,
|
||||
count = treasure_itemstack.count,
|
||||
count = wielded_itemstack.count,
|
||||
preciousness = preciousness,
|
||||
id = item_id
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 378 B |
Binary file not shown.
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 345 B |
Loading…
Reference in New Issue