[MIRROR] Addiction Withdrawal Shown On Body Scanners (#11690)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-18 17:32:09 -07:00
committed by GitHub
parent 607c748648
commit 8b5fdf32f0
4 changed files with 25 additions and 1 deletions

View File

@@ -192,6 +192,13 @@
else else
// Using another species as base, doctors should know this to avoid some meds // Using another species as base, doctors should know this to avoid some meds
occupantData["species"] = "[H.custom_species] \[Similar biology to [H.species.name]\]" occupantData["species"] = "[H.custom_species] \[Similar biology to [H.species.name]\]"
var/has_withdrawl = FALSE
for(var/addic in H.get_all_addictions())
if(H.get_addiction_to_reagent(addic) > 0 && H.get_addiction_to_reagent(addic) < 80)
has_withdrawl = TRUE
break
occupantData["stat"] = H.stat occupantData["stat"] = H.stat
occupantData["health"] = H.health occupantData["health"] = H.health
occupantData["maxHealth"] = H.getMaxHealth() occupantData["maxHealth"] = H.getMaxHealth()
@@ -212,6 +219,8 @@
occupantData["bodyTempF"] = (((H.bodytemperature-T0C) * 1.8) + 32) occupantData["bodyTempF"] = (((H.bodytemperature-T0C) * 1.8) + 32)
occupantData["hasBorer"] = H.has_brain_worms() occupantData["hasBorer"] = H.has_brain_worms()
occupantData["hasWithdrawl"] = has_withdrawl
occupantData["colourblind"] = null occupantData["colourblind"] = null
for(var/datum/modifier/M in H.modifiers) for(var/datum/modifier/M in H.modifiers)
if(!isnull(M.wire_colors_replace)) if(!isnull(M.wire_colors_replace))
@@ -397,6 +406,7 @@
dat = span_blue(span_bold("Occupant Statistics:")) + "<br>" //Blah obvious dat = span_blue(span_bold("Occupant Statistics:")) + "<br>" //Blah obvious
if(istype(occupant)) //is there REALLY someone in there? if(istype(occupant)) //is there REALLY someone in there?
var/has_withdrawl = ""
if(ishuman(occupant)) if(ishuman(occupant))
var/mob/living/carbon/human/H = occupant var/mob/living/carbon/human/H = occupant
var/speciestext = H.species.name var/speciestext = H.species.name
@@ -408,6 +418,11 @@
else else
speciestext = "[H.custom_species] \[Similar biology to [H.species.name]\]" speciestext = "[H.custom_species] \[Similar biology to [H.species.name]\]"
dat += span_blue("Sapient Species: [speciestext]") + "<BR>" dat += span_blue("Sapient Species: [speciestext]") + "<BR>"
for(var/addic in H.get_all_addictions())
if(H.get_addiction_to_reagent(addic) > 0 && H.get_addiction_to_reagent(addic) < 80)
var/datum/reagent/R = SSchemistry.chemical_reagents[addic]
has_withdrawl = R.name
break
var/t1 var/t1
switch(occupant.stat) // obvious, see what their status is switch(occupant.stat) // obvious, see what their status is
if(0) if(0)
@@ -612,6 +627,8 @@
if(hasMalignants != "") if(hasMalignants != "")
dat += span_red("Unknown anatomy detected!") + "<BR>[hasMalignants]" dat += span_red("Unknown anatomy detected!") + "<BR>[hasMalignants]"
//CHOMPedit end //CHOMPedit end
if(has_withdrawl != "")
dat += span_red("Experiencing withdrawal symptoms!") + "<BR>[has_withdrawl]"
if(HUSK in occupant.mutations) // VOREstation edit if(HUSK in occupant.mutations) // VOREstation edit
dat += span_red("Anatomical structure lost, resuscitation not possible!") + "<BR>" dat += span_red("Anatomical structure lost, resuscitation not possible!") + "<BR>"
else else

View File

@@ -13,7 +13,8 @@ export const BodyScannerMainAbnormalities = (props: { occupant: occupant }) => {
occupant.nearsighted || occupant.nearsighted ||
occupant.brokenspine || occupant.brokenspine ||
occupant.hasVirus || occupant.hasVirus ||
occupant.husked; occupant.husked ||
occupant.hasWithdrawl;
hasAbnormalities = hasAbnormalities =
hasAbnormalities || hasAbnormalities ||

View File

@@ -49,6 +49,11 @@ export const abnormalities: (string | ((occupant: occupant) => string))[][] = [
'bad', 'bad',
(occupant) => 'Anatomical structure lost, resuscitation not possible!', (occupant) => 'Anatomical structure lost, resuscitation not possible!',
], ],
[
'hasWithdrawl',
'bad',
(occupant) => 'Experiencing withdrawal! Inaprovaline can reduce symptoms.',
],
]; ];
export const damages: string[][] = [ export const damages: string[][] = [

View File

@@ -38,6 +38,7 @@ export type occupant = {
objectPrey: number; objectPrey: number;
weight: number; weight: number;
husked: BooleanLike; husked: BooleanLike;
hasWithdrawl: BooleanLike;
}; };
type reagent = { name: string; amount: number; overdose: BooleanLike }; type reagent = { name: string; amount: number; overdose: BooleanLike };