]> git.lizzy.rs Git - xdecor.git/commitdiff
minor style cleaning
authorkilbith <jeanpatrick.guerrero@gmail.com>
Mon, 24 Aug 2015 20:04:04 +0000 (22:04 +0200)
committerkilbith <jeanpatrick.guerrero@gmail.com>
Mon, 24 Aug 2015 20:12:13 +0000 (22:12 +0200)
README.md
worktable.lua

index 8868d98accad6da8bb5b78d7fcbccaf3e0046508..bfee24708453ba506c91dd545d226f7ae1a428c2 100644 (file)
--- a/README.md
+++ b/README.md
@@ -9,4 +9,4 @@
 ##### Special thanks to Gambit for the textures from PixelBox #####
 
 ![Preview](http://i.imgur.com/q892y2g.png)
-![Preview2](http://i.imgur.com/w9jIRrg.png)
+![Preview2](http://i.imgur.com/M05BqjT.png)
index 9b50256f6b434a98d9e511b400b8c5980b13533b..3bd41a50ee5a142b3aee63e59201ca19e7e7c0aa 100644 (file)
@@ -38,10 +38,10 @@ function worktable.crafting(pos)
 end
 
 function worktable.storage(pos)
-       local meta = minetest.get_meta(pos)
+       local inv = minetest.get_meta(pos):get_inventory()
        local f = "size[8,7]"..xbg..
                "list[context;storage;0,0;8,2;]list[current_player;main;0,3.25;8,4;]"
-       meta:get_inventory():set_size("storage", 8*2)
+       inv:set_size("storage", 8*2)
        return f
 end
 
@@ -73,8 +73,7 @@ end
 
 function worktable.fields(pos, _, fields, sender)
        local player = sender:get_player_name()
-       local meta = minetest.get_meta(pos)
-       local inv = meta:get_inventory()
+       local inv = minetest.get_meta(pos):get_inventory()
 
        if fields.storage then
                minetest.show_formspec(player, "", worktable.storage(pos))
@@ -93,9 +92,7 @@ function worktable.anz(n)
 end
 
 function worktable.dig(pos, _)
-       local meta = minetest.get_meta(pos)
-       local inv = meta:get_inventory()
-
+       local inv = minetest.get_meta(pos):get_inventory()
        if not inv:is_empty("input") or not inv:is_empty("forms") or not
                        inv:is_empty("hammer") or not inv:is_empty("tool") or not
                        inv:is_empty("storage") then