Add a .luacheckrc and some style changes

This commit is contained in:
HybridDog 2021-03-01 18:36:01 +01:00
parent 5acc8640ee
commit 7fdcdc283f
2 changed files with 11 additions and 3 deletions

7
.luacheckrc Normal file
View File

@ -0,0 +1,7 @@
read_globals = {
-- Defined by Minetest
"minetest", "vector", "PseudoRandom", "VoxelArea",
-- Mods
"default",
}

View File

@ -2,8 +2,8 @@ local load_time_start = os.clock()
local ast_hdif_max = 3
local function log(msg, lv, delay)
print("[sun_flowers] "..msg)
local function log(msg)
print("[sun_flowers] " .. msg)
end
local function stem(h, pr)
@ -173,7 +173,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
local t1 = os.clock()
local x0,z0,x1,z1 = minp.x,minp.z,maxp.x,maxp.z -- Assume X and Z lengths are equal
local x0,z0,x1 = minp.x,minp.z,maxp.x
-- Assume X and Z lengths are equal
local divs = (x1-x0)
if not perlinmap then