mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
[MIRROR] Addiction rework (#3445)
* Addiction rework * a Co-authored-by: Qustinnus <Floydje123@hotmail.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
co-authored by
Qustinnus
Gandalf2k15
parent
43febe3145
commit
3b85cf1430
@@ -284,8 +284,8 @@ Works together with spawning an observer, noted above.
|
||||
SStgui.on_transfer(src, ghost) // Transfer NanoUIs.
|
||||
ghost.can_reenter_corpse = can_reenter_corpse
|
||||
ghost.key = key
|
||||
ghost.client.init_verbs()
|
||||
if(!can_reenter_corpse) // Disassociates observer mind from the body mind
|
||||
ghost.client?.init_verbs()
|
||||
if(!can_reenter_corpse)// Disassociates observer mind from the body mind
|
||||
ghost.mind = null
|
||||
return ghost
|
||||
|
||||
|
||||
@@ -898,8 +898,9 @@
|
||||
/mob/living/carbon/fully_heal(admin_revive = FALSE)
|
||||
if(reagents)
|
||||
reagents.clear_reagents()
|
||||
for(var/addi in reagents.addiction_list)
|
||||
reagents.remove_addiction(addi)
|
||||
if(mind)
|
||||
for(var/addiction_type in subtypesof(/datum/addiction))
|
||||
mind.remove_addiction_points(addiction_type, MAX_ADDICTION_POINTS) //Remove the addiction!
|
||||
for(var/O in internal_organs)
|
||||
var/obj/item/organ/organ = O
|
||||
organ.setOrganDamage(0)
|
||||
@@ -918,8 +919,6 @@
|
||||
for(var/obj/item/restraints/R in contents) //actually remove cuffs from inventory
|
||||
qdel(R)
|
||||
update_handcuffed()
|
||||
if(reagents)
|
||||
reagents.addiction_list = list()
|
||||
cure_all_traumas(TRAUMA_RESILIENCE_MAGIC)
|
||||
..()
|
||||
|
||||
|
||||
@@ -33,12 +33,7 @@
|
||||
*/
|
||||
/mob/living/carbon/proc/on_nometabolism_trait_gain(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
for(var/addiction_type in subtypesof(/datum/addiction))
|
||||
mind.remove_addiction_points(addiction_type, MAX_ADDICTION_POINTS) //Remove the addiction!
|
||||
|
||||
if(reagents.addiction_list)
|
||||
to_chat(source, "<span class='notice'>You feel like you've gotten over your need for drugs.</span>")
|
||||
for(var/a in reagents.addiction_list)
|
||||
var/datum/reagent/R = a
|
||||
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose")
|
||||
LAZYREMOVE(reagents.addiction_list, R)
|
||||
qdel(R)
|
||||
reagents.end_metabolization(keep_liverless = TRUE)
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
if(STAMINA_THRESHOLD_MESSAGE_OHGOD to INFINITY)
|
||||
to_chat(src, "<span class='warning'>You feel fatigued!</span>")
|
||||
//SKYRAT EDIT END
|
||||
if(mind)
|
||||
for(var/key in mind.addiction_points)
|
||||
var/datum/addiction/addiction = SSaddiction.all_addictions[key]
|
||||
addiction.process_addiction(src)
|
||||
if(stat != DEAD)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -479,11 +479,11 @@
|
||||
for(var/listed_type in slowdown_type)
|
||||
if(ispath(listed_type))
|
||||
listed_type = "[listed_type]" //Path2String
|
||||
LAZYADDASSOC(movespeed_mod_immunities, listed_type, source)
|
||||
LAZYADDASSOCLIST(movespeed_mod_immunities, listed_type, source)
|
||||
else
|
||||
if(ispath(slowdown_type))
|
||||
slowdown_type = "[slowdown_type]" //Path2String
|
||||
LAZYADDASSOC(movespeed_mod_immunities, slowdown_type, source)
|
||||
LAZYADDASSOCLIST(movespeed_mod_immunities, slowdown_type, source)
|
||||
if(update)
|
||||
update_movespeed()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user