Fix hud. Need hud image.
parent
10b5f716d5
commit
5c756367ca
|
@ -145,10 +145,6 @@ minetest.register_on_joinplayer(function(player)
|
|||
default.player_set_model(player, "character.x")
|
||||
player:set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, 30)
|
||||
default.player_set_textures(player, {player:get_player_name() .. ".png"})
|
||||
|
||||
-- set GUI
|
||||
player:hud_set_hotbar_image("gui_hotbar.png")
|
||||
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 180 B |
|
@ -3,15 +3,6 @@ inventory = {}
|
|||
inventory.width = 9
|
||||
inventory.height = 1
|
||||
|
||||
minetest.register_chatcommand("inv_test", {
|
||||
func = function()
|
||||
-- Called when command is run.
|
||||
-- Returns boolean success and text output.
|
||||
local inv = minetest.get_inventory({type = "player", name = "singleplayer"})
|
||||
print(dump(inv:get_lists()))
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_on_newplayer(function(player)
|
||||
local invref = player:get_inventory()
|
||||
|
||||
|
@ -33,6 +24,10 @@ minetest.register_on_joinplayer(function(player)
|
|||
if not minetest.setting_getbool("creative_mode") then
|
||||
player:set_inventory_formspec(inventory.craft)
|
||||
end
|
||||
|
||||
player:hud_set_hotbar_image("gui_hotbar.png")
|
||||
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
|
||||
player:hud_set_hotbar_itemcount(inventory.width)
|
||||
end)
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
|
|
Loading…
Reference in New Issue