add .luacheckrc and fix common errors
This commit is contained in:
parent
39bd36cc17
commit
3136adbe00
19
.luacheckrc
Normal file
19
.luacheckrc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
globals = {
|
||||||
|
"lightning"
|
||||||
|
}
|
||||||
|
|
||||||
|
read_globals = {
|
||||||
|
-- Stdlib
|
||||||
|
string = {fields = {"split"}},
|
||||||
|
table = {fields = {"copy", "getn"}},
|
||||||
|
"PcgRandom",
|
||||||
|
|
||||||
|
-- Minetest
|
||||||
|
"minetest",
|
||||||
|
"vector", "ItemStack",
|
||||||
|
"dump",
|
||||||
|
|
||||||
|
-- mods
|
||||||
|
"default", "fire"
|
||||||
|
}
|
4
init.lua
4
init.lua
@ -34,7 +34,7 @@ local revertsky = function()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
for key, entry in pairs(ps) do
|
for _, entry in pairs(ps) do
|
||||||
local sky = entry.sky
|
local sky = entry.sky
|
||||||
entry.p:set_sky(sky.bgcolor, sky.type, sky.textures)
|
entry.p:set_sky(sky.bgcolor, sky.type, sky.textures)
|
||||||
end
|
end
|
||||||
@ -217,7 +217,7 @@ minetest.register_node("lightning:dying_flame", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- if other mods disable auto lightning during initialization, don't trigger the first lightning.
|
-- if other mods disable auto lightning during initialization, don't trigger the first lightning.
|
||||||
minetest.after(5, function(dtime)
|
minetest.after(5, function()
|
||||||
if lightning.auto then
|
if lightning.auto then
|
||||||
minetest.after(rng:next(lightning.interval_low,
|
minetest.after(rng:next(lightning.interval_low,
|
||||||
lightning.interval_high), lightning.strike)
|
lightning.interval_high), lightning.strike)
|
||||||
|
Loading…
Reference in New Issue
Block a user