mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
[MIRROR] Fixes up addictions reporting on scanners, and admin full heal (#1073)
* Fixes up addictions reporting on scanners, and admin full heal (#54056) * Fixes up addictions reporting on scanners, and admin full heal Co-authored-by: NightRed <nightred@gmail.com>
This commit is contained in:
@@ -859,10 +859,6 @@
|
||||
update_mobility()
|
||||
|
||||
/mob/living/carbon/fully_heal(admin_revive = FALSE)
|
||||
if(reagents)
|
||||
reagents.clear_reagents()
|
||||
for(var/addi in reagents.addiction_list)
|
||||
reagents.remove_addiction(addi)
|
||||
for(var/O in internal_organs)
|
||||
var/obj/item/organ/organ = O
|
||||
organ.setOrganDamage(0)
|
||||
@@ -881,8 +877,7 @@
|
||||
for(var/obj/item/restraints/R in contents) //actually remove cuffs from inventory
|
||||
qdel(R)
|
||||
update_handcuffed()
|
||||
if(reagents)
|
||||
reagents.addiction_list = list()
|
||||
clear_addictions()
|
||||
cure_all_traumas(TRAUMA_RESILIENCE_MAGIC)
|
||||
..()
|
||||
|
||||
|
||||
@@ -168,6 +168,46 @@
|
||||
/mob/living/proc/get_reagent_amount(reagent)
|
||||
return reagents.get_reagent_amount(reagent)
|
||||
|
||||
/**
|
||||
* Get a list of all chems the mob has that they are addicted to.
|
||||
*
|
||||
* This creates a ist of all chems the mob has within its body that it is addicted to.
|
||||
* Returns list of reagents
|
||||
*/
|
||||
/mob/living/proc/get_addiction_list()
|
||||
var/list/addictions = list()
|
||||
var/obj/item/organ/stomach/belly = getorganslot(ORGAN_SLOT_STOMACH)
|
||||
if(reagents.addiction_list.len)
|
||||
for(var/datum/reagent/reagent in reagents.addiction_list)
|
||||
addictions += reagent
|
||||
if(belly?.reagents.addiction_list.len)
|
||||
for(var/bile in belly.reagents.addiction_list)
|
||||
addictions += bile
|
||||
return addictions
|
||||
|
||||
/**
|
||||
* Removes an addiction from the mob
|
||||
*
|
||||
* This will remove addiction to the passeed in chem from the mob
|
||||
* vars:
|
||||
* * addiction (reagent) the reagent to remove
|
||||
*/
|
||||
/mob/living/proc/remove_addiction(addiction)
|
||||
reagents.remove_addiction(addiction)
|
||||
var/obj/item/organ/stomach/belly = getorganslot(ORGAN_SLOT_STOMACH)
|
||||
if(belly)
|
||||
belly.reagents.remove_addiction(addiction)
|
||||
|
||||
/**
|
||||
* Removes all addictions from the mob
|
||||
*
|
||||
* This will remove all addictions from the mob
|
||||
*/
|
||||
/mob/living/proc/clear_addictions()
|
||||
var/list/addictions = get_addiction_list()
|
||||
for(var/reagent in addictions)
|
||||
remove_addiction(reagent)
|
||||
|
||||
//this updates all special effects: knockdown, druggy, stuttering, etc..
|
||||
/mob/living/proc/handle_status_effects()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user