]> git.lizzy.rs Git - xdecor.git/commitdiff
Enchant. Table : better looking glyphes
authorkilbith <jeanpatrick.guerrero@gmail.com>
Sat, 2 Apr 2016 19:34:00 +0000 (21:34 +0200)
committerkilbith <jeanpatrick.guerrero@gmail.com>
Sat, 2 Apr 2016 20:42:37 +0000 (22:42 +0200)
17 files changed:
enchanting.lua
handlers/registration.lua
textures/xdecor_glyph1.png
textures/xdecor_glyph10.png
textures/xdecor_glyph11.png
textures/xdecor_glyph12.png
textures/xdecor_glyph13.png
textures/xdecor_glyph15.png [new file with mode: 0644]
textures/xdecor_glyph16.png [new file with mode: 0644]
textures/xdecor_glyph17.png [new file with mode: 0644]
textures/xdecor_glyph18.png [new file with mode: 0644]
textures/xdecor_glyph2.png
textures/xdecor_glyph3.png
textures/xdecor_glyph5.png
textures/xdecor_glyph6.png
textures/xdecor_glyph7.png
textures/xdecor_glyph8.png

index 2eb58805b1f57af067d00b5f498f3d3a9ed3a568..362c6b9d1fa261cf0d2a836408231c1d96263478 100644 (file)
@@ -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
index 9c136c221999cd01611bed368de2e7d86b075dee..6b7ab1ff8d5211e8bdafcf8080ba2117f6b8e272 100644 (file)
@@ -1,10 +1,3 @@
---[[ 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)
index da77892eb6cfbc473a42b5b145f07ac000858d33..a5ac3f553eac90a663283dbbd7071ba4e2296426 100644 (file)
Binary files a/textures/xdecor_glyph1.png and b/textures/xdecor_glyph1.png differ
index 27c7c8d07d7d8949ea9dbc83b178fe5a59f5611d..d002147f50c9623f1e7db05d3d933a475f0e2c8a 100644 (file)
Binary files a/textures/xdecor_glyph10.png and b/textures/xdecor_glyph10.png differ
index 76493c91fdfdb86026d1b95f75603dbc1e864264..c9cd9ff5cca8445e032e15f37902c225867a0b23 100644 (file)
Binary files a/textures/xdecor_glyph11.png and b/textures/xdecor_glyph11.png differ
index 72f18fb56ea0de0e5459220cf50f2ce303f35c48..dc5dd1d2020d45f601c6c35d85d3544f1c545eda 100644 (file)
Binary files a/textures/xdecor_glyph12.png and b/textures/xdecor_glyph12.png differ
index 70ca494ae4ee37d6688ac84ad2df3b3cdcfb0b64..45c6d5a638c7400da787ccb7fd9a6e35b940879d 100644 (file)
Binary files a/textures/xdecor_glyph13.png and b/textures/xdecor_glyph13.png differ
diff --git a/textures/xdecor_glyph15.png b/textures/xdecor_glyph15.png
new file mode 100644 (file)
index 0000000..0db3a9e
Binary files /dev/null and b/textures/xdecor_glyph15.png differ
diff --git a/textures/xdecor_glyph16.png b/textures/xdecor_glyph16.png
new file mode 100644 (file)
index 0000000..d10a72b
Binary files /dev/null and b/textures/xdecor_glyph16.png differ
diff --git a/textures/xdecor_glyph17.png b/textures/xdecor_glyph17.png
new file mode 100644 (file)
index 0000000..2b374e8
Binary files /dev/null and b/textures/xdecor_glyph17.png differ
diff --git a/textures/xdecor_glyph18.png b/textures/xdecor_glyph18.png
new file mode 100644 (file)
index 0000000..e762e35
Binary files /dev/null and b/textures/xdecor_glyph18.png differ
index a6da2d187af74bbeb6db2fc5813614a3957f2daf..eb1e74fbcb8e6fca93aaf269e1d5cefa7672a43e 100644 (file)
Binary files a/textures/xdecor_glyph2.png and b/textures/xdecor_glyph2.png differ
index 456e030b0965841211845adf5e4f7594d3691f26..e82145e5c27dfbe25ae08937e6d8534a88b4a4f6 100644 (file)
Binary files a/textures/xdecor_glyph3.png and b/textures/xdecor_glyph3.png differ
index c79537f6124d4025cd6d8f5d757ae99589a086fa..f0635bf2b39cf3fdce8fc7e42516f5392ca5bd55 100644 (file)
Binary files a/textures/xdecor_glyph5.png and b/textures/xdecor_glyph5.png differ
index f73535485addddfecfe4092b195dbaab33969efe..c93976cfba6fd5ce800ea5a08a0b0cd39daeddfc 100644 (file)
Binary files a/textures/xdecor_glyph6.png and b/textures/xdecor_glyph6.png differ
index 3f91a329a1462482ac582b1e51c9f770f044f6d5..1e4ff024898eb70b7e3d7ee370ee36ad456f7e53 100644 (file)
Binary files a/textures/xdecor_glyph7.png and b/textures/xdecor_glyph7.png differ
index 6c6599471745faf67c4c8b93aa24a6ac449c60b2..2f2b86c16525bd26662ac61021db2bb0fb7d7656 100644 (file)
Binary files a/textures/xdecor_glyph8.png and b/textures/xdecor_glyph8.png differ