]> git.lizzy.rs Git - xdecor.git/commitdiff
Style cleaning
authorkilbith <jeanpatrick.guerrero@gmail.com>
Sat, 16 Jan 2016 13:39:06 +0000 (14:39 +0100)
committerkilbith <jeanpatrick.guerrero@gmail.com>
Sat, 16 Jan 2016 15:32:17 +0000 (16:32 +0100)
nodes.lua
worktable.lua

index 4553f76dfcd42ba7caa7fd4c075eada9f125feaa..f9afb97f817f3391350a57b9fe9819035869e30b 100644 (file)
--- a/nodes.lua
+++ b/nodes.lua
@@ -181,7 +181,7 @@ local door_types = {
 
 for _, d in pairs(door_types) do
        doors.register_door("xdecor:"..d[1].."_door", {
-               description = string.gsub(d[1]:gsub("^%l", string.upper), "_r", " R").." Door",
+               description = string.gsub(" "..d[1], "%W%l", string.upper):sub(2):gsub("_", " ").." Door",
                inventory_image = "xdecor_"..d[1].."_door_inv.png",
                groups = {choppy=3, cracky=3, oddly_breakable_by_hand=1, flammable=2, door=1},
                tiles_bottom = {"xdecor_"..d[1].."_door_b.png", "xdecor_"..d[2]..".png"},
index 11dcf3b312795a7fb1dca536c55c22a90f6c8b5c..630367d884162545d5f08c8af9437dc0dd7055b3 100644 (file)
@@ -27,26 +27,26 @@ local nodes = { -- Nodes allowed to be cut. Registration format: [mod name] = [[
 }
 
 local defs = {
-       --  Name       Yield   X   Y   Z   W   H   L
-       {"nanoslab",    16, {{ 0,  0,  0,  8,  1,  8  }}},
-       {"micropanel",  16, {{ 0,  0,  0,  16, 1,  8  }}},
-       {"microslab",   8,  {{ 0,  0,  0,  16, 1,  16 }}},
-       {"thinstair",   8,  {{ 0,  7,  0,  16, 8,  8  },{
-                              0,  15, 8,  16, 16, 16 }}},
-       {"cube",        4,  {{ 0,  0,  8,  8,  8,  16 }}},
-       {"panel",       4,  {{ 0,  0,  0,  16, 8,  8  }}},
-       {"slab",        2,  {{ 0,  0,  0,  16, 8,  16 }}},
-       {"doublepanel", 2,  {{ 0,  0,  0,  16, 8,  8  },{
-                              0,  8,  8,  16, 16, 16 }}},
-       {"halfstair",   2,  {{ 0,  0,  0,  8,  8,  16 },{
-                              0,  8,  8,  8,  16, 16 }}},
-       {"outerstair",  1,  {{ 0,  0,  0,  16, 8,  16 },{
-                              0,  8,  8,  8,  16, 16 }}},
-       {"stair",       1,  {{ 0,  0,  0,  16, 8,  16 },{
-                              0,  8,  8,  16, 16, 16 }}},
-       {"innerstair",  1,  {{ 0,  0,  0,  16, 8,  16 },{
-                              0,  8,  8,  16, 16, 16 },{
-                              0,  8,  0,  8,  16, 8  }}}
+       -- Name       Yield   X   Y   Z   W   H   L
+       {"nanoslab",    16, { 0,  0,  0,  8,  1,  8  }},
+       {"micropanel",  16, { 0,  0,  0,  16, 1,  8  }},
+       {"microslab",   8,  { 0,  0,  0,  16, 1,  16 }},
+       {"thinstair",   8,  { 0,  7,  0,  16, 8,  8  },
+                           { 0,  15, 8,  16, 16, 16 }},
+       {"cube",        4,  { 0,  0,  8,  8,  8,  16 }},
+       {"panel",       4,  { 0,  0,  0,  16, 8,  8  }},
+       {"slab",        2,  { 0,  0,  0,  16, 8,  16 }},
+       {"doublepanel", 2,  { 0,  0,  0,  16, 8,  8  },
+                           { 0,  8,  8,  16, 16, 16 }},
+       {"halfstair",   2,  { 0,  0,  0,  8,  8,  16 },
+                           { 0,  8,  8,  8,  16, 16 }},
+       {"outerstair",  1,  { 0,  0,  0,  16, 8,  16 },
+                           { 0,  8,  8,  8,  16, 16 }},
+       {"stair",       1,  { 0,  0,  0,  16, 8,  16 },
+                           { 0,  8,  8,  16, 16, 16 }},
+       {"innerstair",  1,  { 0,  0,  0,  16, 8,  16 },
+                           { 0,  8,  8,  16, 16, 16 },
+                           { 0,  8,  0,  8,  16, 8  }}
 }
 
 function worktable.get_recipe(item)
@@ -395,7 +395,7 @@ for mod, n in pairs(nodes) do
 for name in n:gmatch("[%w_]+") do
        local ndef = minetest.registered_nodes[mod..":"..name]
        if ndef then
-               local groups, tiles, light = {}, {}
+               local groups, tiles, light = {}, {}, 0
                groups.not_in_creative_inventory = 1
 
                for k, v in pairs(ndef.groups) do
@@ -423,7 +423,7 @@ for name in n:gmatch("[%w_]+") do
                        sounds = ndef.sounds,
                        tiles = tiles,
                        groups = groups,
-                       node_box = xdecor.pixelnodebox(16, d[3]),
+                       node_box = xdecor.pixelnodebox(16, {d[3], d[4], d[5]}),
                        sunlight_propagates = true,
                        on_place = minetest.rotate_node
                })