Zepha/assets/base/script/game/inventory.lua

26 lines
601 B
Lua
Raw Normal View History

-- Register hand item
2021-09-06 18:33:01 -07:00
zepha.register_item(':hand', {
name = 'Hand (you broke the game)',
2021-09-06 18:33:01 -07:00
textures = { 'zepha:base:hand' },
tool_props = {
interval = 0.25,
damage_groups = { grab = 1, _other = 0 }
}
})
-- Register main and hand inventories
if zepha.server then
2021-09-06 18:33:01 -07:00
zepha.bind('new_player', function(p)
local inv = p:get_inventory()
2021-09-06 18:33:01 -07:00
local main = inv:add_list('main', 30, 10)
inv:set_default_list(main)
2021-09-06 18:33:01 -07:00
local hand = inv:add_list('hand', 1, 1)
hand:add_stack({ 'zepha:base:hand', 1 })
p:set_hand_list(hand)
end)
end