Adds a visual and audio cue when the sleeper cures addiction (#17604)

* Adds a visible and audio cue when the sleeper cures addiction

* Removes implied src

* Changes visible_message to atom_say

Co-authored-by: Vicacrov <fe.adelina@gmail.com>
This commit is contained in:
Adri
2022-04-20 13:24:02 +02:00
committed by GitHub
parent 68974e46c9
commit ef25aee3e5
+3 -1
View File
@@ -5,7 +5,7 @@
////////////
/obj/machinery/sleeper
name = "Sleeper"
name = "sleeper"
icon = 'icons/obj/cryogenic2.dmi'
icon_state = "sleeper-open"
var/base_icon = "sleeper"
@@ -127,6 +127,8 @@
if(world.timeofday > (R.last_addiction_dose + ADDICTION_SPEEDUP_TIME)) // 2.5 minutes
addiction_removal_chance = 10
if(prob(addiction_removal_chance))
atom_say("Patient's addiction was cured.")
playsound(get_turf(src), 'sound/machines/ping.ogg', 50, 0)
to_chat(occupant, "<span class='boldnotice'>You no longer feel reliant on [R.name]!</span>")
occupant.reagents.addiction_list.Remove(R)
qdel(R)