summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-25 03:29:34 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-25 03:29:34 -0400
commitb469368fb75f3fe8db6b24463202ba03a79bdb85 (patch)
treec0146c467d039233a0a47b76ac11874e1ab610db
parentf32ae653c6eeeff163b0b052ce85e1c10437fa86 (diff)
downloaddreambuilder_modpack-b469368fb75f3fe8db6b24463202ba03a79bdb85.tar
dreambuilder_modpack-b469368fb75f3fe8db6b24463202ba03a79bdb85.tar.gz
dreambuilder_modpack-b469368fb75f3fe8db6b24463202ba03a79bdb85.tar.bz2
dreambuilder_modpack-b469368fb75f3fe8db6b24463202ba03a79bdb85.tar.xz
dreambuilder_modpack-b469368fb75f3fe8db6b24463202ba03a79bdb85.zip
update unified inventory and stainedglass mods
-rw-r--r--stained_glass/init.lua2
-rw-r--r--unified_inventory/bags.lua22
2 files changed, 22 insertions, 2 deletions
diff --git a/stained_glass/init.lua b/stained_glass/init.lua
index 64e36ca..b5c2a7a 100644
--- a/stained_glass/init.lua
+++ b/stained_glass/init.lua
@@ -65,7 +65,6 @@ minetest.register_node("stained_glass:stained_glass", {
minetest.override_item("moreblocks:super_glow_glass", {
palette = "unifieddyes_palette_extended.png",
- place_param2 = 240,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3, ud_param2_colorable = 1},
ud_replacement_node = "stained_glass:stained_glass",
after_place_node = unifieddyes.recolor_on_place
@@ -97,7 +96,6 @@ minetest.register_node("stained_glass:stained_trap_glass", {
minetest.override_item("moreblocks:trap_super_glow_glass", {
palette = "unifieddyes_palette_extended.png",
- place_param2 = 240,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
ud_replacement_node = "stained_glass:stained_trap_glass",
after_place_node = unifieddyes.recolor_on_place
diff --git a/unified_inventory/bags.lua b/unified_inventory/bags.lua
index 3923dab..6d0842f 100644
--- a/unified_inventory/bags.lua
+++ b/unified_inventory/bags.lua
@@ -56,6 +56,28 @@ for i = 1, 4 do
formspec = (formspec.."background[6.06,0;0.92,0.92;ui_bags_trash.png]"
.."list[detached:trash;main;6,0.1;1,1;]")
end
+ local inv = player:get_inventory()
+ for i = 1, 4 do
+ local def = inv:get_stack("bag"..i, 1):get_definition()
+ local button
+ if def.groups.bagslots then
+ local list_name = "bag"..i.."contents"
+ local size = inv:get_size(list_name)
+ local used = 0
+ for si = 1, size do
+ local stk = inv:get_stack(list_name, si)
+ if not stk:is_empty() then
+ used = used + 1
+ end
+ end
+ local img = def.inventory_image
+ local label = F("Bag @1", i).."\n"..used.."/"..size
+ button = "image_button["..(i+1)..",0;1,1;"..img..";bag"..i..";"..label.."]"
+ else
+ button = ""
+ end
+ formspec = formspec..button
+ end
return {formspec=formspec}
end,
})