forked from Mirrorlandia_minetest/emeraldbank
income fix
This commit is contained in:
parent
aff751548b
commit
38b8d28105
@ -22,14 +22,12 @@
|
|||||||
|
|
||||||
local S = core.get_translator(core.get_current_modname())
|
local S = core.get_translator(core.get_current_modname())
|
||||||
|
|
||||||
local income_enabled = core.settings:get_bool("emeraldbank.income_enabled", true)
|
|
||||||
local income_count = tonumber(core.settings:get("emeraldbank.income_count")) or 1
|
local income_count = tonumber(core.settings:get("emeraldbank.income_count")) or 1
|
||||||
local income_period = tonumber(core.settings:get("emeraldbank.income_period")) or 1800
|
local income_period = tonumber(core.settings:get("emeraldbank.income_period")) or 1800
|
||||||
|
|
||||||
|
|
||||||
-- income
|
|
||||||
if income_enabled then
|
|
||||||
local timer = 0
|
local timer = 0
|
||||||
|
|
||||||
core.register_globalstep(function(dtime)
|
core.register_globalstep(function(dtime)
|
||||||
timer = timer + dtime;
|
timer = timer + dtime;
|
||||||
if timer >= income_period then
|
if timer >= income_period then
|
||||||
@ -42,4 +40,3 @@ if income_enabled then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
|
||||||
|
Loading…
Reference in New Issue
Block a user