Allergen CE Conversion (#8431)

* WIP allergen conversion

* allergen CE conversion

* allergen CE conversion

inap now actually stops reactions properly

* add brute/burn allergen reactions

* recommended changes
This commit is contained in:
Killian
2022-04-03 02:28:25 +01:00
committed by GitHub
parent 4780b1efe5
commit e39f24b49e
8 changed files with 54 additions and 32 deletions

View File

@@ -27,7 +27,7 @@
var/affects_robots = 0 // Does this chem process inside a Synth?
var/allergen_type // What potential allergens does this contain?
var/allergen_factor = 1 // 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/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
var/cup_name = null
@@ -166,25 +166,7 @@
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!
var/damage_severity = M.species.allergen_damage_severity*allergen_factor
var/disable_severity = M.species.allergen_disable_severity*allergen_factor
if(M.species.allergen_reaction & AG_TOX_DMG)
M.adjustToxLoss(damage_severity * removed)
if(M.species.allergen_reaction & AG_OXY_DMG)
M.adjustOxyLoss(damage_severity * removed)
if(prob(2*disable_severity))
M.emote(pick("cough","gasp","choke"))
if(M.species.allergen_reaction & AG_EMOTE)
if(prob(2*disable_severity))
M.emote(pick("pale","shiver","twitch"))
if(M.species.allergen_reaction & AG_PAIN)
M.adjustHalLoss(disable_severity)
if(M.species.allergen_reaction & AG_WEAKEN)
M.Weaken(disable_severity)
if(M.species.allergen_reaction & AG_BLURRY)
M.eye_blurry = max(M.eye_blurry, disable_severity)
if(M.species.allergen_reaction & AG_SLEEPY)
M.drowsyness = max(M.drowsyness, disable_severity)
M.add_chemical_effect(CE_ALLERGEN,allergen_factor)
remove_self(removed)
return

View File

@@ -92,7 +92,7 @@
glass_name = "ethanol"
glass_desc = "A well-known alcohol with a variety of applications."
allergen_factor = 0.5 //simulates mixed drinks containing less of the allergen, as they have only a single actual reagent unlike food
allergen_factor = 1 //simulates mixed drinks containing less of the allergen, as they have only a single actual reagent unlike food
/datum/reagent/ethanol/touch_mob(var/mob/living/L, var/amount)
..()

View File

@@ -3,7 +3,7 @@
/datum/reagent/inaprovaline
name = "Inaprovaline"
id = "inaprovaline"
description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients."
description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients. Also counteracts allergic reactions."
taste_description = "bitterness"
reagent_state = LIQUID
color = "#00BFFF"
@@ -15,6 +15,7 @@
if(alien != IS_DIONA)
M.add_chemical_effect(CE_STABLE, 15)
M.add_chemical_effect(CE_PAINKILLER, 10 * M.species.chem_strength_pain)
M.remove_chemical_effect(CE_ALLERGEN)
/datum/reagent/inaprovaline/topical
name = "Inaprovalaze"