mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-01-28 01:42:50 +00:00
Allergen CE Conversion
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#define CE_SPEEDBOOST "gofast" // Hyperzine
|
||||
#define CE_SLOWDOWN "goslow" // Slowdown
|
||||
#define CE_ANTACID "nopuke" // Don't puke.
|
||||
#define CE_ALLERGEN "allergyreaction" // Self explanatory
|
||||
|
||||
#define REAGENTS_PER_SHEET 20
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#define ALLERGEN_STIMULANT 0x1000 // Stimulants are what makes the Tajaran heart go ruh roh - not just coffee!
|
||||
|
||||
// Allergen reactions
|
||||
<<<<<<< HEAD
|
||||
#define AG_TOX_DMG 0x1 // the classic
|
||||
#define AG_OXY_DMG 0x2 // intense airway reactions
|
||||
#define AG_EMOTE 0x4 // general emote reactions based on affect type
|
||||
@@ -48,6 +49,18 @@
|
||||
#define AG_BLURRY 0x20 // blurred vision!
|
||||
#define AG_SLEEPY 0x40 // fatigue/exhaustion
|
||||
#define AG_CONFUSE 0x80 // disorientation - VOREStation addition
|
||||
=======
|
||||
#define AG_PHYS_DMG 0x1 // brute
|
||||
#define AG_BURN_DMG 0x2 // burns
|
||||
#define AG_TOX_DMG 0x4 // the classic
|
||||
#define AG_OXY_DMG 0x8 // intense airway reactions
|
||||
#define AG_EMOTE 0x10 // general emote reactions based on affect type
|
||||
#define AG_PAIN 0x20 // short-lived hurt
|
||||
#define AG_WEAKEN 0x40 // too weak to move, oof
|
||||
#define AG_BLURRY 0x80 // blurred vision!
|
||||
#define AG_SLEEPY 0x100 // fatigue/exhaustion
|
||||
#define AG_CONFUSE 0x200 // disorientation
|
||||
>>>>>>> e39f24b49e3... Allergen CE Conversion (#8431)
|
||||
|
||||
// Species spawn flags
|
||||
#define SPECIES_IS_WHITELISTED 0x1 // Must be whitelisted to play.
|
||||
|
||||
@@ -430,6 +430,10 @@
|
||||
else
|
||||
chem_effects[effect] = magnitude
|
||||
|
||||
/mob/living/carbon/proc/remove_chemical_effect(var/effect, var/magnitude)
|
||||
if(effect in chem_effects)
|
||||
chem_effects[effect] = magnitude ? max(0,chem_effects[effect]-magnitude) : 0
|
||||
|
||||
/mob/living/carbon/get_default_language()
|
||||
if(default_language)
|
||||
if(can_speak(default_language))
|
||||
|
||||
@@ -84,6 +84,8 @@
|
||||
handle_shock()
|
||||
|
||||
handle_pain()
|
||||
|
||||
handle_allergens()
|
||||
|
||||
handle_medical_side_effects()
|
||||
|
||||
@@ -638,6 +640,35 @@
|
||||
breath.update_values()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/handle_allergens()
|
||||
if(chem_effects[CE_ALLERGEN])
|
||||
//first, multiply the basic species-level value by our allergen effect rating, so consuming multiple seperate allergen typess simultaneously hurts more
|
||||
var/damage_severity = species.allergen_damage_severity * chem_effects[CE_ALLERGEN]
|
||||
var/disable_severity = species.allergen_disable_severity * chem_effects[CE_ALLERGEN]
|
||||
if(species.allergen_reaction & AG_PHYS_DMG)
|
||||
adjustBruteLoss(damage_severity)
|
||||
if(species.allergen_reaction & AG_BURN_DMG)
|
||||
adjustFireLoss(damage_severity)
|
||||
if(species.allergen_reaction & AG_TOX_DMG)
|
||||
adjustToxLoss(damage_severity)
|
||||
if(species.allergen_reaction & AG_OXY_DMG)
|
||||
adjustOxyLoss(damage_severity)
|
||||
if(prob(disable_severity/2))
|
||||
emote(pick("cough","gasp","choke"))
|
||||
if(species.allergen_reaction & AG_EMOTE)
|
||||
if(prob(disable_severity/2))
|
||||
emote(pick("pale","shiver","twitch"))
|
||||
if(species.allergen_reaction & AG_PAIN)
|
||||
adjustHalLoss(disable_severity)
|
||||
if(species.allergen_reaction & AG_WEAKEN)
|
||||
Weaken(disable_severity)
|
||||
if(species.allergen_reaction & AG_BLURRY)
|
||||
eye_blurry = max(eye_blurry, disable_severity)
|
||||
if(species.allergen_reaction & AG_SLEEPY)
|
||||
drowsyness = max(drowsyness, disable_severity)
|
||||
if(species.allergen_reaction & AG_CONFUSE)
|
||||
Confuse(disable_severity/4)
|
||||
|
||||
/mob/living/carbon/human/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
return
|
||||
|
||||
@@ -53,9 +53,15 @@
|
||||
|
||||
var/taste_sensitivity = TASTE_NORMAL // How sensitive the species is to minute tastes.
|
||||
var/allergens = null // Things that will make this species very sick
|
||||
<<<<<<< HEAD
|
||||
var/allergen_reaction = AG_TOX_DMG|AG_OXY_DMG|AG_EMOTE|AG_PAIN|AG_BLURRY|AG_CONFUSE // What type of reactions will you have? These the 'main' options and are intended to approximate anaphylactic shock at high doses. VOREStation Edit'd.
|
||||
var/allergen_damage_severity = 4 // How bad are reactions to the allergen? Touch with extreme caution. VOREStation Edit'd.
|
||||
var/allergen_disable_severity = 4 // Whilst this determines how long nonlethal effects last and how common emotes are. VOREStation Edit'd.
|
||||
=======
|
||||
var/allergen_reaction = AG_TOX_DMG|AG_OXY_DMG|AG_EMOTE|AG_PAIN|AG_BLURRY|AG_CONFUSE // What type of reactions will you have? These the 'main' options and are intended to approximate anaphylactic shock at high doses.
|
||||
var/allergen_damage_severity = 2.5 // How bad are reactions to the allergen? Touch with extreme caution.
|
||||
var/allergen_disable_severity = 10 // Whilst this determines how long nonlethal effects last and how common emotes are.
|
||||
>>>>>>> e39f24b49e3... Allergen CE Conversion (#8431)
|
||||
|
||||
var/min_age = 17
|
||||
var/max_age = 70
|
||||
|
||||
@@ -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
|
||||
@@ -171,6 +171,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!
|
||||
<<<<<<< HEAD
|
||||
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)
|
||||
@@ -192,6 +193,9 @@
|
||||
M.drowsyness = max(M.drowsyness, disable_severity)
|
||||
if(M.species.allergen_reaction & AG_CONFUSE) //VOREStation Addition
|
||||
M.Confuse(disable_severity/4) //VOREStation Addition
|
||||
=======
|
||||
M.add_chemical_effect(CE_ALLERGEN,allergen_factor)
|
||||
>>>>>>> e39f24b49e3... Allergen CE Conversion (#8431)
|
||||
remove_self(removed)
|
||||
return
|
||||
|
||||
|
||||
@@ -104,7 +104,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)
|
||||
..()
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user