mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Fixes completing a bounty and not getting paid. (#52363)
* Fixes completing a bounty and not getting paid. * Oh right that thing that I didn't commit * Cleans up the parenthesis in the proc. * Linter BEGONE * Apply suggestions from code review Co-authored-by: Rohesie <rohesie@gmail.com> Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
committed by
SkyratBot
co-authored by
Rohesie
parent
41c6428ca6
commit
d93f5b7c2e
@@ -78,6 +78,11 @@
|
||||
return FALSE
|
||||
var/datum/bounty/curr_bounty = inserted_scan_id.registered_account.civilian_bounty
|
||||
var/active_stack = 0
|
||||
var/datum/bank_account/dept_account = SSeconomy.get_dep_account(inserted_scan_id.registered_account.account_job.paycheck_department)
|
||||
if(!dept_account?.has_money(curr_bounty.reward))
|
||||
playsound(loc, 'sound/machines/synth_no.ogg', 50 , TRUE)
|
||||
stop_sending("Not enough funds to submit bounty at this time, please try again later.")
|
||||
return FALSE
|
||||
for(var/atom/movable/AM in get_turf(pad))
|
||||
if(AM == pad)
|
||||
continue
|
||||
@@ -92,7 +97,7 @@
|
||||
stop_sending()
|
||||
if(curr_bounty.can_claim())
|
||||
//Pay for the bounty with the ID's department funds.
|
||||
inserted_scan_id.registered_account.transfer_money(SSeconomy.get_dep_account(inserted_scan_id.registered_account.account_job.paycheck_department), curr_bounty.reward)
|
||||
inserted_scan_id.registered_account.transfer_money(dept_account, curr_bounty.reward)
|
||||
status_report += "Bounty Completed! [curr_bounty.reward] credits have been paid out. "
|
||||
inserted_scan_id.registered_account.reset_bounty()
|
||||
pad.visible_message("<span class='notice'>[pad] activates!</span>")
|
||||
|
||||
@@ -153,19 +153,6 @@
|
||||
required_count = 8
|
||||
wanted_types = list(/obj/item/kirbyplants)
|
||||
|
||||
/datum/bounty/item/assistant/earmuffs
|
||||
name = "Earmuffs"
|
||||
description = "Central Command is getting tired of your station's messages. They've ordered that you ship some earmuffs to lessen the annoyance."
|
||||
reward = 1000
|
||||
wanted_types = list(/obj/item/clothing/ears/earmuffs)
|
||||
|
||||
/datum/bounty/item/assistant/handcuffs
|
||||
name = "Handcuffs"
|
||||
description = "A large influx of escaped convicts have arrived at Central Command. Now is the perfect time to ship out spare handcuffs (or restraints)."
|
||||
reward = 1000
|
||||
required_count = 5
|
||||
wanted_types = list(/obj/item/restraints/handcuffs)
|
||||
|
||||
/datum/bounty/item/assistant/monkey_cubes
|
||||
name = "Monkey Cubes"
|
||||
description = "Due to a recent genetics accident, Central Command is in serious need of monkeys. Your mission is to ship monkey cubes."
|
||||
|
||||
@@ -386,11 +386,13 @@
|
||||
pad.icon_state = pad.warmup_state
|
||||
sending_timer = addtimer(CALLBACK(src,.proc/send),warmup_time, TIMER_STOPPABLE)
|
||||
|
||||
/obj/machinery/computer/piratepad_control/proc/stop_sending()
|
||||
/obj/machinery/computer/piratepad_control/proc/stop_sending(custom_report)
|
||||
if(!sending)
|
||||
return
|
||||
sending = FALSE
|
||||
status_report = "Ready for delivery."
|
||||
if(custom_report)
|
||||
status_report = custom_report
|
||||
pad.icon_state = pad.idle_state
|
||||
deltimer(sending_timer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user