diff --git a/scripts/server/economy.js b/scripts/server/economy.js index 07d0801b..67069306 100644 --- a/scripts/server/economy.js +++ b/scripts/server/economy.js @@ -25,4 +25,40 @@ function applyServerInflationMultiplier(value) { return toInteger(Math.round(value*getServerConfig().inflationMultiplier)) } +// =========================================================================== + +function playerPayDay(client) { + let wealth = calculateWealth(client); + let taxAmount = calculateTax(wealth); + let grossIncome = getPlayerData(client).payDayAmount; + + // Public Beta Bonus + taxAmount = 0; + grossIncome = grossIncome*2; + grossIncome = grossIncome + 2000; + + let netIncome = grossIncome-taxAmount; + + messagePlayerAlert(client, "== Payday! ============================="); + messagePlayerInfo(client, `Your paycheck: [#AAAAAA]$${grossIncome}`); + messagePlayerInfo(client, `Taxes: [#AAAAAA]$${taxAmount}`); + messagePlayerInfo(client, `You receive: [#AAAAAA]$${netIncome}`); + + givePlayerCash(client, netIncome); +} + +// =========================================================================== + +function calculateWealth(client) { + // To-do + return 0; +} + +// =========================================================================== + +function calculateTax(client) { + // To-do + return 0; +} + // =========================================================================== \ No newline at end of file