mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] Bank machine's process will immediately stop processing if its unpowered/broken. [MDB IGNORE] (#9111)
* Bank machine's process will immediately stop processing if its unpowered/broken. (#62299) It already returns if the bank machine has no money, I don't see why it would continue if its broken/unpowered. Also, to be honest, I only made this to make process early return if it isn't siphoning. * Bank machine's process will immediately stop processing if its unpowered/broken. Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
co-authored by
John Willard
parent
d79a997673
commit
7f46355028
@@ -42,25 +42,27 @@
|
||||
|
||||
/obj/machinery/computer/bank_machine/process(delta_time)
|
||||
..()
|
||||
if(siphoning)
|
||||
if (machine_stat & (BROKEN|NOPOWER))
|
||||
say("Insufficient power. Halting siphon.")
|
||||
end_syphon()
|
||||
var/siphon_am = 100 * delta_time
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(!D.has_money(siphon_am))
|
||||
say("Cargo budget depleted. Halting siphon.")
|
||||
end_syphon()
|
||||
return
|
||||
if(!siphoning)
|
||||
return
|
||||
if (machine_stat & (BROKEN|NOPOWER))
|
||||
say("Insufficient power. Halting siphon.")
|
||||
end_syphon()
|
||||
return
|
||||
var/siphon_am = 100 * delta_time
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(!D.has_money(siphon_am))
|
||||
say("Cargo budget depleted. Halting siphon.")
|
||||
end_syphon()
|
||||
return
|
||||
|
||||
playsound(src, 'sound/items/poster_being_created.ogg', 100, TRUE)
|
||||
syphoning_credits += siphon_am
|
||||
D.adjust_money(-siphon_am)
|
||||
if(next_warning < world.time && prob(15))
|
||||
var/area/A = get_area(loc)
|
||||
var/message = "Unauthorized credit withdrawal underway in [initial(A.name)]!!"
|
||||
radio.talk_into(src, message, radio_channel)
|
||||
next_warning = world.time + minimum_time_between_warnings
|
||||
playsound(src, 'sound/items/poster_being_created.ogg', 100, TRUE)
|
||||
syphoning_credits += siphon_am
|
||||
D.adjust_money(-siphon_am)
|
||||
if(next_warning < world.time && prob(15))
|
||||
var/area/A = get_area(loc)
|
||||
var/message = "Unauthorized credit withdrawal underway in [initial(A.name)]!!"
|
||||
radio.talk_into(src, message, radio_channel)
|
||||
next_warning = world.time + minimum_time_between_warnings
|
||||
|
||||
/obj/machinery/computer/bank_machine/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
|
||||
Reference in New Issue
Block a user