Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add icon overlay to shelf inventory slots
  • Loading branch information
Wuzzy authored and sofar committed Oct 30, 2016
1 parent 02a82c9 commit 0acd9a2
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mods/default/README.txt
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions mods/default/nodes.lua
Expand Up @@ -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",
Expand Down
Binary file added mods/default/textures/default_book_slot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions mods/vessels/README.txt
Expand Up @@ -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)
12 changes: 12 additions & 0 deletions mods/vessels/init.lua
Expand Up @@ -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",
Expand Down
Binary file added mods/vessels/textures/vessels_glass_bottle_slot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0acd9a2

Please sign in to comment.