Medical Allergies (#19400)

* curse of medical

* no benefit

* fix that

* fix

* small fixes

* small tweaks

* fix

* fix

---------

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
Will
2026-04-18 13:50:41 -04:00
committed by GitHub
parent 9fdc02d3f0
commit 239b442bd0
10 changed files with 103 additions and 12 deletions
@@ -102,7 +102,7 @@
subdata["sintering"] = SSinternal_wiki.assemble_sintering(GLOB.reagent_sheets[R.id])
subdata["overdose"] = R.overdose
subdata["flavor"] = R.taste_description
subdata["allergen"] = SSinternal_wiki.assemble_allergens(R.allergen_type)
subdata["allergen"] = SSinternal_wiki.assemble_allergens(R.allergen_type, R.medallergen_type)
subdata["beakerAmount"] = found_reagents[ID]
total_vol += found_reagents[ID]
SSinternal_wiki.assemble_reaction_data(subdata, R)
+6 -1
View File
@@ -24,6 +24,7 @@
var/affects_robots = 0 // Does this chem process inside a Synth?
var/allergen_type // What potential allergens does this contain?
var/medallergen_type // What potential medical allergens does this contain?
var/allergen_factor = 2 // If the potential allergens are mixed and low-volume, they're a bit less dangerous. Needed for drinks because they're a single reagent compared to food which contains multiple seperate reagents.
var/cup_icon_state = null
@@ -179,6 +180,10 @@
removed = min(removed, volume)
max_dose = max(volume, max_dose)
dose = min(dose + removed, max_dose)
if(M.species.medallergens & medallergen_type) // Medical allergies don't gain ANY benefits...
M.add_chemical_effect(CE_ALLERGEN, allergen_factor * removed)
remove_self(removed)
return
switch(active_metab.metabolism_class)
if(CHEM_BLOOD)
affect_blood(M, alien, removed)
@@ -192,7 +197,7 @@
on_mob_metabolize(M, location)
if(overdose && (volume > overdose * M?.species.chemOD_threshold) && (active_metab.metabolism_class != CHEM_TOUCH || can_overdose_touch))
overdose(M, alien, removed)
if(M.species.allergens & allergen_type) //uhoh, we can't handle this!
if((M.species.allergens & allergen_type)) //uhoh, we can't handle this!
M.add_chemical_effect(CE_ALLERGEN, allergen_factor * removed)
remove_self(removed)
return
+1 -1
View File
@@ -176,7 +176,7 @@
if(issmall(M))
removed *= 2
if(!(M.species.allergens & allergen_type) && !(M.isSynthetic())) //assuming it doesn't cause a horrible reaction, we get the nutrition effects - VOREStation Edit (added synth check)
if(!(M.species.allergens & allergen_type) && !(M.species.medallergens & medallergen_type) && !(M.isSynthetic())) //assuming it doesn't cause a horrible reaction, we get the nutrition effects - VOREStation Edit (added synth check)
M.adjust_nutrition(nutriment_factor * removed)
if(M.isSynthetic() && M.nutrition < 500 && M.species.robo_ethanol_proc)
+1
View File
@@ -21,6 +21,7 @@
reagent_state = LIQUID
metabolism = REM * 0.5
ingest_met = REM * 1.5 /// Be very careful with this, ingestion is weird and will spam high/sober messages horribly!
allergen_factor = 3 // Allergic reactions to concentrated medications should be pretty strong
dermal_absorption = 0
mrate_static = TRUE
overdose = REAGENTS_OVERDOSE
@@ -62,7 +62,7 @@
if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume.
//VOREStation Edits Start
if(!M.isSynthetic())
if(!(M.species.allergens & allergen_type)) //assuming it doesn't cause a horrible reaction, we'll be ok!
if(!(M.species.allergens & allergen_type) && !(M.species.medallergens & medallergen_type)) //assuming it doesn't cause a horrible reaction, we'll be ok!
M.heal_organ_damage(0.5 * removed, 0)
M.adjust_nutrition(((nutriment_factor + M.food_preference(allergen_type)) * removed) * M.species.organic_food_coeff) //RS edit
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
@@ -1053,7 +1053,7 @@
return
/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(!(M.species.allergens & allergen_type))
if(!(M.species.allergens & allergen_type) && !(M.species.medallergens & medallergen_type))
var/bonus = M.food_preference(allergen_type)
M.adjust_nutrition((nutrition + bonus) * removed)
M.make_dizzy(adj_dizzy)
@@ -2544,6 +2544,7 @@
glass_name = REAGENT_DOCTORSDELIGHT
glass_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place."
allergen_type = ALLERGEN_FRUIT|ALLERGEN_DAIRY //Made from several fruit juices, and cream.
medallergen_type = MEDALLERGEN_TRICORD // this too!
/datum/reagent/drink/doctor_delight/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
@@ -59,6 +59,7 @@
scannable = SCANNABLE_BENEFICIAL
supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED
industrial_use = REFINERYEXPORT_REASON_DRUG
medallergen_type = MEDALLERGEN_BICARD
/datum/reagent/bicaridine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/chem_effective = 1 * M.species.chem_strength_heal
@@ -98,6 +99,7 @@
can_overdose_touch = TRUE
supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED
industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG
medallergen_type = MEDALLERGEN_BICARD
/datum/reagent/bicaridine/topical/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/chem_effective = 1 * M.species.chem_strength_heal
@@ -148,6 +150,7 @@
scannable = SCANNABLE_BENEFICIAL
supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
industrial_use = REFINERYEXPORT_REASON_DRUG
medallergen_type = MEDALLERGEN_KELOTANE
/datum/reagent/kelotane/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/chem_effective = 1 * M.species.chem_strength_heal
@@ -171,6 +174,7 @@
scannable = SCANNABLE_BENEFICIAL
supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED
industrial_use = REFINERYEXPORT_REASON_DRUG
medallergen_type = MEDALLERGEN_KELOTANE
/datum/reagent/dermaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/chem_effective = 1 * M.species.chem_strength_heal
@@ -193,6 +197,7 @@
can_overdose_touch = TRUE
supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED
industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG
medallergen_type = MEDALLERGEN_KELOTANE
/datum/reagent/dermaline/topical/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/chem_effective = 1 * M.species.chem_strength_heal
@@ -220,6 +225,7 @@
scannable = SCANNABLE_BENEFICIAL
supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
industrial_use = REFINERYEXPORT_REASON_DRUG
medallergen_type = MEDALLERGEN_DYLO
/datum/reagent/dylovene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/chem_effective = 1 * M.species.chem_strength_heal
@@ -339,6 +345,7 @@
scannable = SCANNABLE_BENEFICIAL
supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED
industrial_use = REFINERYEXPORT_REASON_DRUG
medallergen_type = MEDALLERGEN_TRICORD
/datum/reagent/tricordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien != IS_DIONA)
@@ -364,6 +371,7 @@
can_overdose_touch = TRUE
supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED
industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG
medallergen_type = MEDALLERGEN_TRICORD
/datum/reagent/tricorlidaze/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
if(alien != IS_DIONA)
@@ -751,6 +759,7 @@
scannable = SCANNABLE_BENEFICIAL
supply_conversion_value = REFINERYEXPORT_VALUE_HIGHREFINED
industrial_use = REFINERYEXPORT_REASON_SPECIALDRUG
medallergen_type = MEDALLERGEN_PERIDAX
/datum/reagent/peridaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(ishuman(M))
@@ -1218,6 +1227,7 @@
data = 0
supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
industrial_use = REFINERYEXPORT_REASON_DRUG
medallergen_type = MEDALLERGEN_SPACACIL
/datum/reagent/spaceacillin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()