Add passive income to business till if players are on

This commit is contained in:
Vortrex
2023-02-23 01:17:16 -06:00
parent 52e8d6c1db
commit 93e48df39a

View File

@@ -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;
}
}
}