summaryrefslogtreecommitdiff
path: root/hotbar/init.lua
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-04-24 18:59:36 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-04-24 18:59:36 -0400
commita5eef1c5de77fa7770877802e66c3e1c53f9a0da (patch)
tree0f36e64a58e5f5bb7d95be6ae692f58f2ebfe483 /hotbar/init.lua
parentdda854cf06f90a04a03844e19c4d4ad220e38fe4 (diff)
downloaddreambuilder_modpack-a5eef1c5de77fa7770877802e66c3e1c53f9a0da.tar
dreambuilder_modpack-a5eef1c5de77fa7770877802e66c3e1c53f9a0da.tar.gz
dreambuilder_modpack-a5eef1c5de77fa7770877802e66c3e1c53f9a0da.tar.bz2
dreambuilder_modpack-a5eef1c5de77fa7770877802e66c3e1c53f9a0da.tar.xz
dreambuilder_modpack-a5eef1c5de77fa7770877802e66c3e1c53f9a0da.zip
update castles, areas, homedecor, plantlife,
gloopblocks, hotbar, inspector, maptools, mesecons, moreblocks, moreores, technic, teleport_request, and worldedit switched to caverealms_lite (with minor fixes by me) switched to CWz's fork of player_textures The homedecor update brings in the big split, and will require you to re-enable all modpack components in order to avoid loss of content.
Diffstat (limited to 'hotbar/init.lua')
-rw-r--r--hotbar/init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/hotbar/init.lua b/hotbar/init.lua
index 81b0518..a2f4de2 100644
--- a/hotbar/init.lua
+++ b/hotbar/init.lua
@@ -6,6 +6,8 @@ local function validate_size(s)
if (size == 8 or size == 16 or size == 23 or size == 24 or size == 32)
and size <= maxslots then
return size
+ else
+ return 16
end
end
@@ -51,7 +53,7 @@ minetest.register_chatcommand("hotbar", {
params = "[size]",
description = "Sets the size of your hotbar",
func = function(name, slots)
- hotbar_size = validate_size(tonumber(slots))
+ local hotbar_size = validate_size(tonumber(slots))
player_hotbar_settings[name] = hotbar_size
local player = minetest.get_player_by_name(name)
player:hud_set_hotbar_itemcount(hotbar_size)