Add .luacheckrc and fix warnings.

This commit is contained in:
Diego Martínez
2017-03-01 01:05:53 -03:00
committed by Auke Kok
parent f5e6a7d181
commit 5caacf3019
6 changed files with 116 additions and 101 deletions

View File

@ -3,19 +3,19 @@
-- 1 = there is one; 0 = there is none
-- y always means y+
box_center = {-1/16, -.5, -1/16, 1/16, -.5+1/16, 1/16}
box_bump1 = { -2/16, -8/16, -2/16, 2/16, -13/32, 2/16 }
box_bump2 = { -3/32, -13/32, -3/32, 3/32, -12/32, 3/32 }
local box_center = {-1/16, -.5, -1/16, 1/16, -.5+1/16, 1/16}
local box_bump1 = { -2/16, -8/16, -2/16, 2/16, -13/32, 2/16 }
local box_bump2 = { -3/32, -13/32, -3/32, 3/32, -12/32, 3/32 }
box_xp = {1/16, -.5, -1/16, 8/16, -.5+1/16, 1/16}
box_zp = {-1/16, -.5, 1/16, 1/16, -.5+1/16, 8/16}
box_xm = {-8/16, -.5, -1/16, -1/16, -.5+1/16, 1/16}
box_zm = {-1/16, -.5, -8/16, 1/16, -.5+1/16, -1/16}
local box_xp = {1/16, -.5, -1/16, 8/16, -.5+1/16, 1/16}
local box_zp = {-1/16, -.5, 1/16, 1/16, -.5+1/16, 8/16}
local box_xm = {-8/16, -.5, -1/16, -1/16, -.5+1/16, 1/16}
local box_zm = {-1/16, -.5, -8/16, 1/16, -.5+1/16, -1/16}
box_xpy = {.5-1/16, -.5+1/16, -1/16, .5, .4999+1/16, 1/16}
box_zpy = {-1/16, -.5+1/16, .5-1/16, 1/16, .4999+1/16, .5}
box_xmy = {-.5, -.5+1/16, -1/16, -.5+1/16, .4999+1/16, 1/16}
box_zmy = {-1/16, -.5+1/16, -.5, 1/16, .4999+1/16, -.5+1/16}
local box_xpy = {.5-1/16, -.5+1/16, -1/16, .5, .4999+1/16, 1/16}
local box_zpy = {-1/16, -.5+1/16, .5-1/16, 1/16, .4999+1/16, .5}
local box_xmy = {-.5, -.5+1/16, -1/16, -.5+1/16, .4999+1/16, 1/16}
local box_zmy = {-1/16, -.5+1/16, -.5, 1/16, .4999+1/16, -.5+1/16}
for xp=0, 1 do
for zp=0, 1 do
@ -25,13 +25,15 @@ for xpy=0, 1 do
for zpy=0, 1 do
for xmy=0, 1 do
for zmy=0, 1 do
if (xpy == 1 and xp == 0) or (zpy == 1 and zp == 0)
if (xpy == 1 and xp == 0) or (zpy == 1 and zp == 0)
or (xmy == 1 and xm == 0) or (zmy == 1 and zm == 0) then break end
local groups
local nodeid = tostring(xp )..tostring(zp )..tostring(xm )..tostring(zm )..
tostring(xpy)..tostring(zpy)..tostring(xmy)..tostring(zmy)
local wiredesc
if nodeid == "00000000" then
groups = {dig_immediate = 3}
wiredesc = "Digiline"
@ -51,6 +53,7 @@ for zmy=0, 1 do
if xmy == 1 then table.insert(nodebox, box_xmy) end
if zmy == 1 then table.insert(nodebox, box_zmy) end
local tiles
if adjx and adjz and (xp + zp + xm + zm > 2) then
table.insert(nodebox, box_bump1)
table.insert(nodebox, box_bump2)
@ -87,16 +90,16 @@ for zmy=0, 1 do
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
digiline =
digiline =
{
wire =
wire =
{
basename = "digilines:wire_std_",
use_autoconnect = true
}
},
selection_box = {
type = "fixed",
type = "fixed",
fixed = {-.5, -.5, -.5, .5, -.5+1/16, .5}
},
node_box = {