Aaron Suen 5f277cfad1 Switch to hard-coded list names.
It seems that inv:get_lists() returns a list of userdata, instead
of names, at least in 5.0+, and can't necessarily be relied upon
for this purpose.
2019-04-10 08:33:34 -04:00

26 lines
680 B
Lua

-- LUALOCALS < ---------------------------------------------------------
local minetest
= minetest
-- LUALOCALS > ---------------------------------------------------------
minetest.register_on_joinplayer(function(player)
local inv = player:get_inventory()
inv:set_size("main", 8)
inv:set_size("craft", 0)
inv:set_size("craftpreview", 0)
inv:set_size("craftresult", 0)
player:set_physics_override({speed = 1.25})
player:set_properties({
makes_footstep_sound = true,
-- Allow slight zoom for screenshots
zoom_fov = 60
})
end)
minetest.register_allow_player_inventory_action(function(_, action)
return action == "move" and 0 or 1000000
end)