diff --git a/code/__DEFINES/~skyrat_defines/economy.dm b/code/__DEFINES/~skyrat_defines/economy.dm new file mode 100644 index 00000000000..3a1f3fc8024 --- /dev/null +++ b/code/__DEFINES/~skyrat_defines/economy.dm @@ -0,0 +1,2 @@ +#define PAYCHECK_CYCLE_WAIT 6 //How many cycles of SSeconomy firing we're waiting till we get a paycheck. Each cycle is 5 minutes. +#define PAYCHECK_CYCLE_AMOUNT 4 //How many paychecks we get when we finally do get it diff --git a/code/controllers/subsystem/economy.dm b/code/controllers/subsystem/economy.dm index 2396934805c..0e884ebd71a 100644 --- a/code/controllers/subsystem/economy.dm +++ b/code/controllers/subsystem/economy.dm @@ -36,6 +36,7 @@ SUBSYSTEM_DEF(economy) /// Contains the message to send to newscasters about price inflation and earnings, updated on price_update() var/earning_report var/market_crashing = FALSE + var/fire_counter_for_paycheck = 0 //SKYRAT EDIT ADDITION /datum/controller/subsystem/economy/Initialize(timeofday) var/budget_to_hand_out = round(budget_pool / department_accounts.len) @@ -44,16 +45,25 @@ SUBSYSTEM_DEF(economy) return ..() /datum/controller/subsystem/economy/fire(resumed = 0) + fire_counter_for_paycheck++ //SKYRAT EDIT ADDITION var/temporary_total = 0 departmental_payouts() station_total = 0 station_target_buffer += STATION_TARGET_BUFFER for(var/account in bank_accounts_by_id) var/datum/bank_account/bank_account = bank_accounts_by_id[account] + //SKYRAT EDIT ADDITION BEGIN + if(fire_counter_for_paycheck >= PAYCHECK_CYCLE_WAIT) + bank_account.payday(PAYCHECK_CYCLE_AMOUNT) + //SKYRAT EDIT ADDITION END if(bank_account?.account_job) temporary_total += (bank_account.account_job.paycheck * STARTING_PAYCHECKS) if(!istype(bank_account, /datum/bank_account/department)) station_total += bank_account.account_balance + //SKYRAT EDIT ADDITION BEGIN + if(fire_counter_for_paycheck >= PAYCHECK_CYCLE_WAIT) //30 minutes per each paycheck + fire_counter_for_paycheck = 0 + //SKYRAT EDIT ADDITION END station_target = max(round(temporary_total / max(bank_accounts_by_id.len * 2, 1)) + station_target_buffer, 1) if(!market_crashing) price_update() diff --git a/tgstation.dme b/tgstation.dme index b7b238ceacb..fe1d654b40a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -136,6 +136,7 @@ #include "code\__DEFINES\~skyrat_defines\ambitions.dm" #include "code\__DEFINES\~skyrat_defines\blueshield.dm" #include "code\__DEFINES\~skyrat_defines\DNA.dm" +#include "code\__DEFINES\~skyrat_defines\economy.dm" #include "code\__DEFINES\~skyrat_defines\faction.dm" #include "code\__DEFINES\~skyrat_defines\jobs.dm" #include "code\__DEFINES\~skyrat_defines\keybindings.dm"