mirror of
https://github.com/minetest-mods/lightning.git
synced 2024-11-15 23:00:42 +01:00
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
|
||||
end
|
||||
|
||||
for key, entry in pairs(ps) do
|
||||
for _, entry in pairs(ps) do
|
||||
local sky = entry.sky
|
||||
entry.p:set_sky(sky.bgcolor, sky.type, sky.textures)
|
||||
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.
|
||||
minetest.after(5, function(dtime)
|
||||
minetest.after(5, function()
|
||||
if lightning.auto then
|
||||
minetest.after(rng:next(lightning.interval_low,
|
||||
lightning.interval_high), lightning.strike)
|
||||
|
|
Loading…
Reference in New Issue
Block a user