modMinerTrade = {
	modName = minetest.get_current_modname(),
	modPath = minetest.get_modpath(minetest.get_current_modname()),
	save_compressed = (minetest.settings:get("minertrade.save_compressed") ~= "false"),
	delayConstruct = 300, 
	bank = {
		accounts = 0,
		last_pay = 0,
		player = { },
	},
	salary = {
		enabled = (minetest.settings:get("minertrade.salary.enabled") ~= "false"),
		value = tonumber(minetest.settings:get("minertrade.salary.value") or 1),
		intervalcheck = tonumber(minetest.settings:get("minertrade.salary.intervalcheck") or 1),
	}
}

--dofile(modMinerTrade.modPath.."/config.lua") -- <== Antes de carregar tudo!
dofile(modMinerTrade.modPath.."/translate.lua") -- <== Antes de 'api.lua'!
dofile(modMinerTrade.modPath.."/api.lua")
dofile(modMinerTrade.modPath.."/item_exchange_table.lua")
dofile(modMinerTrade.modPath.."/item_dispensing_machine.lua")

dofile(modMinerTrade.modPath.."/item_atm.lua")
--dofile(modMinerTrade.modPath.."/item_strongbox.lua")
--dofile(modMinerTrade.modPath.."/item_strongbox_old.lua")
dofile(modMinerTrade.modPath.."/item_minercash.lua")
--dofile(path.."/item_rent_door.lua")
dofile(modMinerTrade.modPath.."/api_payday.lua")
--dofile(modMinerTrade.modPath.."/commands.lua")

--if modMinerTrade.doBankLoad ~= nil then
	modMinerTrade.doBankLoad()
--end

minetest.log('action',"["..modMinerTrade.modName:upper().."] Loaded!")
