diff --git a/code/game/machinery/civilian_bounties.dm b/code/game/machinery/civilian_bounties.dm index e7d167b73be..e4cbeda0e57 100644 --- a/code/game/machinery/civilian_bounties.dm +++ b/code/game/machinery/civilian_bounties.dm @@ -115,8 +115,8 @@ if(!inserted_scan_id || !inserted_scan_id.registered_account) return var/datum/bank_account/pot_acc = inserted_scan_id.registered_account - if((pot_acc.civilian_bounty && ((world.time) < pot_acc.bounty_timer + 5 MINUTES)) || pot_acc.bounties) - var/curr_time = round(((pot_acc.bounty_timer + (5 MINUTES))-world.time)/ (1 MINUTES), 0.01) + if((pot_acc.civilian_bounty || pot_acc.bounties) && !COOLDOWN_FINISHED(pot_acc, bounty_timer)) + var/curr_time = round((COOLDOWN_TIMELEFT(pot_acc, bounty_timer)) / (1 MINUTES), 0.01) say("Internal ID network spools coiling, try again in [curr_time] minutes!") return FALSE if(!pot_acc.account_job) @@ -125,7 +125,7 @@ var/list/datum/bounty/crumbs = list(random_bounty(pot_acc.account_job.bounty_types), // We want to offer 2 bounties from their appropriate job catagories random_bounty(pot_acc.account_job.bounty_types), // and 1 guarenteed assistant bounty if the other 2 suck. random_bounty(CIV_JOB_BASIC)) - pot_acc.bounty_timer = world.time + COOLDOWN_START(pot_acc, bounty_timer, 5 MINUTES) pot_acc.bounties = crumbs /obj/machinery/computer/piratepad_control/civilian/proc/pick_bounty(choice) diff --git a/code/modules/economy/account.dm b/code/modules/economy/account.dm index 37185531761..f95aa36fa79 100644 --- a/code/modules/economy/account.dm +++ b/code/modules/economy/account.dm @@ -11,7 +11,7 @@ var/being_dumped = FALSE //pink levels are rising var/datum/bounty/civilian_bounty var/list/datum/bounty/bounties - var/bounty_timer = 0 + COOLDOWN_DECLARE(bounty_timer) /datum/bank_account/New(newname, job, modifier = 1) account_holder = newname @@ -172,7 +172,7 @@ */ /datum/bank_account/proc/reset_bounty() civilian_bounty = null - bounty_timer = 0 + COOLDOWN_RESET(src, bounty_timer) /datum/bank_account/department account_holder = "Guild Credit Agency"