Change code style
This commit is contained in:
parent
88bee36efe
commit
a5314b5005
12
bank.lua
12
bank.lua
|
@ -181,7 +181,7 @@ if minetest.get_modpath('atm') and rawget(_G, 'atm') and atm.balance then
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
elseif minetest.get_modpath('bank_accounts') and rawget(_G, 'accounts') and
|
elseif minetest.get_modpath('bank_accounts') and rawget(_G, 'accounts') and
|
||||||
accounts.balance and accounts.pin and accounts.credit then
|
accounts.balance and accounts.pin and accounts.credit then
|
||||||
-- https://github.com/Tmanyo/bank_accounts
|
-- https://github.com/Tmanyo/bank_accounts
|
||||||
|
|
||||||
lurkcoin.change_bank({
|
lurkcoin.change_bank({
|
||||||
|
@ -194,7 +194,7 @@ elseif minetest.get_modpath('bank_accounts') and rawget(_G, 'accounts') and
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
elseif minetest.get_modpath('economy') and rawget(_G, 'economy') and
|
elseif minetest.get_modpath('economy') and rawget(_G, 'economy') and
|
||||||
economy.balance and economy.accountlog then
|
economy.balance and economy.accountlog then
|
||||||
-- https://github.com/orwell96/economy
|
-- https://github.com/orwell96/economy
|
||||||
-- economy.moneyof() automatically adds non-existent entries, therefore it
|
-- economy.moneyof() automatically adds non-existent entries, therefore it
|
||||||
-- is not used by default.
|
-- is not used by default.
|
||||||
|
@ -239,17 +239,17 @@ elseif rawget(_G, 'money') then
|
||||||
elseif minetest.get_modpath('money2') and money.get then
|
elseif minetest.get_modpath('money2') and money.get then
|
||||||
-- money.add and money.dec have a different return value system.
|
-- money.add and money.dec have a different return value system.
|
||||||
lurkcoin.change_bank({
|
lurkcoin.change_bank({
|
||||||
mod = 'money2',
|
mod = 'money2',
|
||||||
user_exists = money.has_credit,
|
user_exists = money.has_credit,
|
||||||
getbal = money.get,
|
getbal = money.get,
|
||||||
setbal = function(name, ...)
|
setbal = function(name, ...)
|
||||||
if money.has_credit(name) then
|
if money.has_credit(name) then
|
||||||
money.set(name, ...)
|
money.set(name, ...)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end,
|
end,
|
||||||
pay = function(from, to, amount)
|
pay = function(from, to, amount)
|
||||||
local err = money.transfer(from, to, amount)
|
local err = money.transfer(from, to, amount)
|
||||||
return not err, err
|
return not err, err
|
||||||
end
|
end
|
||||||
|
|
|
@ -40,6 +40,6 @@ end)
|
||||||
|
|
||||||
-- Let bank.lua add everything else.
|
-- Let bank.lua add everything else.
|
||||||
lurkcoin.change_bank({
|
lurkcoin.change_bank({
|
||||||
getbal = getbal,
|
getbal = getbal,
|
||||||
setbal = setbal
|
setbal = setbal
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue