mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Fixes the civilian bounty computer not properly giving new bounties (#63965)
The boolean logic was wrong. Also, updated the cooldown to use our macros since it looked like crap.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user