Add icon overlay to shelf inventory slots
authorWuzzy <almikes@aol.com>
Thu, 27 Oct 2016 17:42:47 +0000 (19:42 +0200)
committerAuke Kok <sofar@foo-projects.org>
Sun, 30 Oct 2016 22:32:43 +0000 (15:32 -0700)
mods/default/README.txt
mods/default/nodes.lua
mods/default/textures/default_book_slot.png [new file with mode: 0644]
mods/vessels/README.txt
mods/vessels/init.lua
mods/vessels/textures/vessels_glass_bottle_slot.png [new file with mode: 0644]

index 4536de9aaae1c39ab9aa377962f0ed412cb523d8..3e4f773460a10364b2cfba54e8a08df03f277e16 100644 (file)
@@ -139,6 +139,9 @@ BlockMen (CC BY-SA 3.0):
   bubble.png
   gui_*.png
 
+Wuzzy (CC BY-SA 3.0):
+  default_book_slot.png (based on default_book.png)
+
 sofar (CC BY-SA 3.0):
   default_book_written.png, based on default_book.png
   default_aspen_sapling
index 07e159522f6ed26096be536c3df30da4f6666689..65b9fb9e4a0e1fe920d74de1e6b8aa22f1d50686 100644 (file)
@@ -1800,6 +1800,18 @@ local bookshelf_formspec =
        "listring[current_player;main]" ..
        default.get_hotbar_bg(0,2.85)
 
+-- Inventory slots overlay
+local bx, by = 0, 0.3
+for i = 1, 16 do
+       if i == 9 then
+               bx = 0
+               by = by + 1
+       end
+       bookshelf_formspec = bookshelf_formspec ..
+               "image["..bx..","..by..";1,1;default_book_slot.png]"
+       bx = bx + 1
+end
+
 minetest.register_node("default:bookshelf", {
        description = "Bookshelf",
        tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
diff --git a/mods/default/textures/default_book_slot.png b/mods/default/textures/default_book_slot.png
new file mode 100644 (file)
index 0000000..20b4ef8
Binary files /dev/null and b/mods/default/textures/default_book_slot.png differ
index b81d0e94ad464dc6cdad8b93aeb5818e0df95590..e9f01b846d40ce8f3586eee1141347ece87271e4 100644 (file)
@@ -17,3 +17,6 @@ The following textures were modified by Thomas-S (CC BY-SA 3.0):
   vessels_drinking_glass_inv.png
   vessels_glass_bottle.png
   vessels_steel_bottle.png
+
+The following texture was created by Wuzzy (CC BY-SA 3.0):
+  vessels_glass_bottle_slot.png (based on vessels_glass_bottle.png)
index e56cc2844fb7974b954c2f9bd5a81545dec309fa..f0362568867613dcf1c0560c7957d4b92cc461d2 100644 (file)
@@ -13,6 +13,18 @@ local vessels_shelf_formspec =
        "listring[current_player;main]" ..
        default.get_hotbar_bg(0, 2.85)
 
+-- Inventory slots overlay
+local vx, vy = 0, 0.3
+for i = 1,16 do
+       if i == 9 then
+               vx = 0
+               vy = vy + 1
+       end
+       vessels_shelf_formspec = vessels_shelf_formspec ..
+               "image["..vx..","..vy..";1,1;vessels_glass_bottle_slot.png]"
+       vx = vx + 1
+end
+
 minetest.register_node("vessels:shelf", {
        description = "Vessels Shelf",
        tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
diff --git a/mods/vessels/textures/vessels_glass_bottle_slot.png b/mods/vessels/textures/vessels_glass_bottle_slot.png
new file mode 100644 (file)
index 0000000..63cf795
Binary files /dev/null and b/mods/vessels/textures/vessels_glass_bottle_slot.png differ