]> git.lizzy.rs Git - xdecor.git/commitdiff
Minor style cleaning
authorkilbith <jeanpatrick.guerrero@gmail.com>
Fri, 15 Jan 2016 16:18:11 +0000 (17:18 +0100)
committerkilbith <jeanpatrick.guerrero@gmail.com>
Fri, 15 Jan 2016 16:33:04 +0000 (17:33 +0100)
enchanting.lua
worktable.lua
xwall.lua

index 441a6310ecca4da27f49582a6608a6d3daafed16..44ecd7deaa4f586dea988ba59b240dd64b77da4f 100644 (file)
@@ -191,7 +191,7 @@ for enchant in tooldef[3]:gmatch("[%w_]+") do
                                description = "Enchanted "..cap(material).." "..cap(tool).." ("..cap(enchant)..")",
                                inventory_image = original_tool.inventory_image.."^[colorize:violet:50",
                                wield_image = original_tool.wield_image,
-                               groups = {not_in_creative_inventory=0},
+                               groups = {not_in_creative_inventory=1},
                                tool_capabilities = {
                                        groupcaps = groupcaps, damage_groups = {fleshy = fleshy},
                                        full_punch_interval = full_punch_interval, max_drop_level = max_drop_level
index 4ece094364d9510715e4988511f845b5734ba3df..2a4cab850eb56be741df0cb6db87d6ab96636ddf 100644 (file)
@@ -26,19 +26,19 @@ local nodes = { -- Nodes allowed to be cut. Registration format: [mod name] = [[
        ]],
 }
 
-local def = { -- Nodebox name, yield, definition.
-       {"nanoslab", 16, {-.5,-.5,-.5,0,-.4375,0}},
-       {"micropanel", 16, {-.5,-.5,-.5,.5,-.4375,0}},
-       {"microslab", 8, {-.5,-.5,-.5,.5,-.4375,.5}},
-       {"thinstair", 8, {{-.5,-.0625,-.5,.5,0,0},{-.5,.4375,0,.5,.5,.5}}},
-       {"cube", 4, {-.5,-.5,0,0,0,.5}},
-       {"panel", 4, {-.5,-.5,-.5,.5,0,0}},
-       {"slab", 2, {-.5,-.5,-.5,.5,0,.5}},
-       {"doublepanel", 2, {{-.5,-.5,-.5,.5,0,0},{-.5,0,0,.5,.5,.5}}},
-       {"halfstair", 2, {{-.5,-.5,-.5,0,0,.5},{-.5,0,0,0,.5,.5}}},
-       {"outerstair", 1, {{-.5,-.5,-.5,.5,0,.5},{-.5,0,0,0,.5,.5}}},
-       {"stair", 1, {{-.5,-.5,-.5,.5,0,.5},{-.5,0,0,.5,.5,.5}}},
-       {"innerstair", 1, {{-.5,-.5,-.5,.5,0,.5},{-.5,0,0,.5,.5,.5},{-.5,0,-.5,0,.5,0}}}
+local defs = { -- Nodebox name, yield, definition.
+       {"nanoslab",    16, {-.5,-.5,-.5,0,-.4375,0}},
+       {"micropanel",  16, {-.5,-.5,-.5,.5,-.4375,0}},
+       {"microslab",   8,  {-.5,-.5,-.5,.5,-.4375,.5}},
+       {"thinstair",   8,  {{-.5,-.0625,-.5,.5,0,0},{-.5,.4375,0,.5,.5,.5}}},
+       {"cube",        4,  {-.5,-.5,0,0,0,.5}},
+       {"panel",       4,  {-.5,-.5,-.5,.5,0,0}},
+       {"slab",        2,  {-.5,-.5,-.5,.5,0,.5}},
+       {"doublepanel", 2,  {{-.5,-.5,-.5,.5,0,0},{-.5,0,0,.5,.5,.5}}},
+       {"halfstair",   2,  {{-.5,-.5,-.5,0,0,.5},{-.5,0,0,0,.5,.5}}},
+       {"outerstair",  1,  {{-.5,-.5,-.5,.5,0,.5},{-.5,0,0,0,.5,.5}}},
+       {"stair",       1,  {{-.5,-.5,-.5,.5,0,.5},{-.5,0,0,.5,.5,.5}}},
+       {"innerstair",  1,  {{-.5,-.5,-.5,.5,0,.5},{-.5,0,0,.5,.5,.5},{-.5,0,-.5,0,.5,0}}}
 }
 
 function worktable.get_recipe(item)
@@ -330,7 +330,7 @@ function worktable.get_output(inv, stack)
        end
 
        local input, output = inv:get_stack("input", 1), {}
-       for _, n in pairs(def) do
+       for _, n in pairs(defs) do
                local count = math.min(n[2] * input:get_count(), input:get_stack_max())
                output[#output+1] = stack:get_name().."_"..n[1].." "..count
        end
@@ -356,7 +356,7 @@ function worktable.on_take(pos, listname, index, stack)
                        inv:set_list("forms", {})
                end
        elseif listname == "forms" then
-               inputstack:take_item(math.ceil(stack:get_count() / def[index][2]))
+               inputstack:take_item(math.ceil(stack:get_count() / defs[index][2]))
                inv:set_stack("input", 1, inputstack)
                worktable.get_output(inv, inputstack)
        end
@@ -382,7 +382,7 @@ xdecor.register("worktable", {
        allow_metadata_inventory_move = worktable.move
 })
 
-for _, d in pairs(def) do
+for _, d in pairs(defs) do
 for mod, n in pairs(nodes) do
 for name in n:gmatch("[%w_]+") do
        local ndef = minetest.registered_nodes[mod..":"..name]
index a6a7a6ab05d102d9f63033c2788e8810f8bcd001..f150b2fed5dba344657061c95874c4f2e377ac97 100644 (file)
--- a/xwall.lua
+++ b/xwall.lua
@@ -7,9 +7,9 @@ screwdriver = screwdriver or {}
 
 xwall.get_candidate = {}
 local profiles = {
-       {0, "_c0", 0}, {1, "_c1", 1}, {2, "_c1", 0}, {4, "_c1", 3},
-       {8, "_c1", 2}, {5, "_ln", 1}, {10, "_ln", 0}, {3, "_c2", 0},
-       {6, "_c2", 3}, {12, "_c2", 2}, {9, "_c2", 1}, {7, "_c3", 3},
+       {0, "_c0", 0},  {1, "_c1", 1},  {2, "_c1", 0},  {4, "_c1", 3},
+       {8, "_c1", 2},  {5, "_ln", 1},  {10, "_ln", 0}, {3, "_c2", 0},
+       {6, "_c2", 3},  {12, "_c2", 2}, {9, "_c2", 1},  {7, "_c3", 3},
        {11, "_c3", 0}, {13, "_c3", 1}, {14, "_c3", 2}, {15, "_c4", 1}
 }
 
@@ -18,7 +18,7 @@ for _, p in pairs(profiles) do
 end
 
 local directions = {
-       {x=1, y=0, z=0}, {x=0, y=0, z=1},
+       {x=1, y=0, z=0},  {x=0, y=0, z=1},
        {x=-1, y=0, z=0}, {x=0, y=0, z=-1}
 }