From 93e48df39ac5b1501346ed1fb96cf33d925db814 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Thu, 23 Feb 2023 01:17:16 -0600 Subject: [PATCH] Add passive income to business till if players are on --- scripts/server/timers.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/server/timers.js b/scripts/server/timers.js index 807cbcbe..b8e70458 100644 --- a/scripts/server/timers.js +++ b/scripts/server/timers.js @@ -312,7 +312,12 @@ function checkPayDays() { for (let i in getServerData().businesses) { if (getBusinessData(i).ownerType != V_BIZ_OWNER_NONE && getBusinessData(i).ownerType != V_BIZ_OWNER_PUBLIC && getBusinessData(i).ownerType != V_BIZ_OWNER_FACTION) { - getBusinessData(i).till += 1000; + let addToTill = getGlobalConfig().economy.passiveIncomePerPayDay; + if (isDoubleBonusActive()) { + addToTill = addToTill * 2; + } + getBusinessData(i).till = getBusinessData(i).till + addToTill; + getBusinessData(i).needsSaved = true; } } }