Skip to content

Commit 0acd9a2

Browse files
Wuzzysofar
Wuzzy
authored andcommittedOct 30, 2016
Add icon overlay to shelf inventory slots
1 parent 02a82c9 commit 0acd9a2

File tree

6 files changed

+30
-0
lines changed

6 files changed

+30
-0
lines changed
 

‎mods/default/README.txt

+3
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ BlockMen (CC BY-SA 3.0):
139139
bubble.png
140140
gui_*.png
141141

142+
Wuzzy (CC BY-SA 3.0):
143+
default_book_slot.png (based on default_book.png)
144+
142145
sofar (CC BY-SA 3.0):
143146
default_book_written.png, based on default_book.png
144147
default_aspen_sapling

‎mods/default/nodes.lua

+12
Original file line numberDiff line numberDiff line change
@@ -1800,6 +1800,18 @@ local bookshelf_formspec =
18001800
"listring[current_player;main]" ..
18011801
default.get_hotbar_bg(0,2.85)
18021802

1803+
-- Inventory slots overlay
1804+
local bx, by = 0, 0.3
1805+
for i = 1, 16 do
1806+
if i == 9 then
1807+
bx = 0
1808+
by = by + 1
1809+
end
1810+
bookshelf_formspec = bookshelf_formspec ..
1811+
"image["..bx..","..by..";1,1;default_book_slot.png]"
1812+
bx = bx + 1
1813+
end
1814+
18031815
minetest.register_node("default:bookshelf", {
18041816
description = "Bookshelf",
18051817
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
204 Bytes
Loading

‎mods/vessels/README.txt

+3
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ The following textures were modified by Thomas-S (CC BY-SA 3.0):
1717
vessels_drinking_glass_inv.png
1818
vessels_glass_bottle.png
1919
vessels_steel_bottle.png
20+
21+
The following texture was created by Wuzzy (CC BY-SA 3.0):
22+
vessels_glass_bottle_slot.png (based on vessels_glass_bottle.png)

‎mods/vessels/init.lua

+12
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ local vessels_shelf_formspec =
1313
"listring[current_player;main]" ..
1414
default.get_hotbar_bg(0, 2.85)
1515

16+
-- Inventory slots overlay
17+
local vx, vy = 0, 0.3
18+
for i = 1,16 do
19+
if i == 9 then
20+
vx = 0
21+
vy = vy + 1
22+
end
23+
vessels_shelf_formspec = vessels_shelf_formspec ..
24+
"image["..vx..","..vy..";1,1;vessels_glass_bottle_slot.png]"
25+
vx = vx + 1
26+
end
27+
1628
minetest.register_node("vessels:shelf", {
1729
description = "Vessels Shelf",
1830
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
196 Bytes
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.