feat: locales

This commit is contained in:
Andyyy7666 committed 2025-08-14 01:13:48 +02:00
1 parent 0bd76ed79f
commit a431a49d8c
9 files changed
+425 -285

No files matched your search

+2 -2
View File
@@ -66,7 +66,7 @@ local function createCharacterTable(info)
function self.depositMoney(amount)
local amount = tonumber(amount)
if not amount or self.cash < amount or amount <= 0 then return end
return self.deductMoney("cash", amount, "Deposit") and self.addMoney("bank", amount, "Deposit")
return self.deductMoney("cash", amount, locale("deposit")) and self.addMoney("bank", amount, locale("deposit"))
end
---@param amount number
@@ -74,7 +74,7 @@ local function createCharacterTable(info)
function self.withdrawMoney(amount)
local amount = tonumber(amount)
if not amount or self.bank < amount or amount <= 0 then return end
return self.deductMoney("bank", amount, "Withdraw") and self.addMoney("cash", amount, "Withdraw")
return self.deductMoney("bank", amount, locale("withdraw")) and self.addMoney("cash", amount, locale("withdraw"))
end
---@param data string