forked from nalc/global_exchange
Supprime l'argent donné pour les nouveaux joueurs
- Ajoute message de chargement du mod dans le journal "action"
This commit is contained in:
parent
d49a7fdc12
commit
0de7a34fcf
13
init.lua
13
init.lua
|
@ -5,24 +5,24 @@ assert(insecure_env,
|
|||
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||
|
||||
local income = tonumber(minetest.setting_get("citizens_income")) or 10
|
||||
--[[local income = tonumber(minetest.setting_get("citizens_income")) or 10
|
||||
local income_interval = 1200
|
||||
local income_msg = "You receive your citizen's income (+" .. income .. ")"
|
||||
|
||||
local next_payout = os.time() + income_interval
|
||||
]]--
|
||||
|
||||
local exchange =
|
||||
assert(loadfile(modpath .. "exchange.lua"))(insecure_env).open_exchange(
|
||||
assert(loadfile(modpath .. "exchange.lua"))(insecure_env).open_exchange(
|
||||
minetest.get_worldpath() .. "/global_exchange.db"
|
||||
)
|
||||
|
||||
|
||||
minetest.register_on_shutdown(function()
|
||||
exchange:close()
|
||||
end)
|
||||
|
||||
|
||||
local function check_giving()
|
||||
--[[local function check_giving()
|
||||
local now = os.time()
|
||||
if now < next_payout then
|
||||
return
|
||||
|
@ -45,9 +45,10 @@ local function check_giving()
|
|||
end
|
||||
|
||||
minetest.after(5, check_giving)
|
||||
|
||||
|
||||
]]--
|
||||
|
||||
assert(loadfile(modpath .. "atm.lua"))(exchange)
|
||||
assert(loadfile(modpath .. "exchange_machine.lua"))(exchange)
|
||||
assert(loadfile(modpath .. "digital_mailbox.lua"))(exchange)
|
||||
|
||||
minetest.log("action", "[global_exchange] loaded.")
|
||||
|
|
Loading…
Reference in New Issue
Block a user