Skip to content
Snippets Groups Projects
Commit c49978f2 authored by kilbith's avatar kilbith
Browse files

Enchant. Table : better looking glyphes

parent 3dbd30a6
No related branches found
No related tags found
No related merge requests found
Showing with 5 additions and 28 deletions
......@@ -150,7 +150,7 @@ function enchanting.timer(pos)
acceleration = {x=0, y=-2.2, z=0},
expirationtime = 1,
size = 2,
texture = "xdecor_glyph"..math.random(1,14)..".png"
texture = "xdecor_glyph"..math.random(1,18)..".png"
})
end
return true
......
--[[ local default_can_dig = function(pos, _)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return inv:is_empty("main")
end --]]
xbg = default.gui_bg..default.gui_bg_img..default.gui_slots
local default_inventory_size = 32
......@@ -44,24 +37,9 @@ local function get_formspec_by_size(size)
return formspec or default_inventory_formspecs
end
local function drop_stuff()
return function(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
meta:from_table(oldmetadata)
local inv = meta:get_inventory()
for i=1, inv:get_size("main") do
local stack = inv:get_stack("main", i)
if not stack:is_empty() then
local p = {
x = pos.x + math.random(0,5) / 5 - 0.5,
y = pos.y,
z = pos.z + math.random(0,5) / 5 - 0.5
}
minetest.add_item(p, stack)
end
end
end
local default_can_dig = function(pos)
local inv = minetest.get_meta(pos):get_inventory()
return inv:is_empty("main")
end
function xdecor.register(name, def)
......@@ -94,8 +72,7 @@ function xdecor.register(name, def)
inv:set_size("main", size)
meta:set_string("formspec", (inventory.formspec or get_formspec_by_size(size))..xbg)
end
def.after_dig_node = def.after_dig_node or drop_stuff()
--def.can_dig = def.can_dig or default_can_dig
def.can_dig = def.can_dig or default_can_dig
elseif infotext and not def.on_construct then
def.on_construct = function(pos)
local meta = minetest.get_meta(pos)
......
textures/xdecor_glyph1.png

108 B | W: | H:

textures/xdecor_glyph1.png

161 B | W: | H:

textures/xdecor_glyph1.png
textures/xdecor_glyph1.png
textures/xdecor_glyph1.png
textures/xdecor_glyph1.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph10.png

104 B | W: | H:

textures/xdecor_glyph10.png

157 B | W: | H:

textures/xdecor_glyph10.png
textures/xdecor_glyph10.png
textures/xdecor_glyph10.png
textures/xdecor_glyph10.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph11.png

104 B | W: | H:

textures/xdecor_glyph11.png

158 B | W: | H:

textures/xdecor_glyph11.png
textures/xdecor_glyph11.png
textures/xdecor_glyph11.png
textures/xdecor_glyph11.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph12.png

102 B | W: | H:

textures/xdecor_glyph12.png

156 B | W: | H:

textures/xdecor_glyph12.png
textures/xdecor_glyph12.png
textures/xdecor_glyph12.png
textures/xdecor_glyph12.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph13.png

105 B | W: | H:

textures/xdecor_glyph13.png

159 B | W: | H:

textures/xdecor_glyph13.png
textures/xdecor_glyph13.png
textures/xdecor_glyph13.png
textures/xdecor_glyph13.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph15.png

160 B

textures/xdecor_glyph16.png

166 B

textures/xdecor_glyph17.png

145 B

textures/xdecor_glyph18.png

161 B

textures/xdecor_glyph2.png

106 B | W: | H:

textures/xdecor_glyph2.png

159 B | W: | H:

textures/xdecor_glyph2.png
textures/xdecor_glyph2.png
textures/xdecor_glyph2.png
textures/xdecor_glyph2.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph3.png

106 B | W: | H:

textures/xdecor_glyph3.png

159 B | W: | H:

textures/xdecor_glyph3.png
textures/xdecor_glyph3.png
textures/xdecor_glyph3.png
textures/xdecor_glyph3.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph5.png

106 B | W: | H:

textures/xdecor_glyph5.png

161 B | W: | H:

textures/xdecor_glyph5.png
textures/xdecor_glyph5.png
textures/xdecor_glyph5.png
textures/xdecor_glyph5.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph6.png

104 B | W: | H:

textures/xdecor_glyph6.png

159 B | W: | H:

textures/xdecor_glyph6.png
textures/xdecor_glyph6.png
textures/xdecor_glyph6.png
textures/xdecor_glyph6.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph7.png

104 B | W: | H:

textures/xdecor_glyph7.png

157 B | W: | H:

textures/xdecor_glyph7.png
textures/xdecor_glyph7.png
textures/xdecor_glyph7.png
textures/xdecor_glyph7.png
  • 2-up
  • Swipe
  • Onion skin
textures/xdecor_glyph8.png

104 B | W: | H:

textures/xdecor_glyph8.png

158 B | W: | H:

textures/xdecor_glyph8.png
textures/xdecor_glyph8.png
textures/xdecor_glyph8.png
textures/xdecor_glyph8.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment