mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-13 08:04:22 +01:00
Radiation Refactor (#19270)
* Part 1 * WIP * The rest of these * More stuff * Whoops, did that wrong * typo * gweeen * This all works * SHOWER * Rads * awa * rad * Update life.dm * edits * Makes lvl 3 rads give you a warning. You should already know by this point, but this makes it EXTRA clear you're getting fucked * Update vorestation.dme * aaa * propagate * gwah * more fixes * AAA * Update radiation.dm * Update radiation.dm * mobs rads * rads * fix this * Update _reagents.dm * these * Get rid of these * rad * Update config.txt * fixed * Update radiation_effects.dm
This commit is contained in:
@@ -70,6 +70,8 @@
|
||||
total_volume = 0
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
if(R.volume < MINIMUM_CHEMICAL_VOLUME)
|
||||
if(isliving(R.holder.my_atom))
|
||||
R.on_mob_end_metabolize(R.holder.my_atom, src)
|
||||
del_reagent(R.id)
|
||||
else
|
||||
total_volume += R.volume
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
var/wiki_flag = 0 // Bitflags for secret/food/drink reagent sorting
|
||||
var/supply_conversion_value = null
|
||||
var/industrial_use = null // unique description for export off station
|
||||
/// A list of traits to apply while the reagent is being metabolized.
|
||||
var/list/metabolized_traits
|
||||
|
||||
|
||||
var/coolant_modifier = -0.5 // this is multiplied by the volume of the reagent. Most things are not good coolant. EX: Water is 1, coolant is 2. -1 would be a bad reagent for cooling.
|
||||
|
||||
@@ -186,6 +189,7 @@
|
||||
affect_ingest(M, alien, removed * ingest_abs_mult)
|
||||
if(CHEM_TOUCH)
|
||||
affect_touch(M, alien, removed)
|
||||
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!
|
||||
@@ -241,3 +245,14 @@
|
||||
/// Called by [/datum/reagents/proc/conditional_update]
|
||||
/datum/reagent/proc/on_update(atom/A)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_mob_metabolize(mob/living/affected_mob, datum/reagents/metabolism/location)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
if(metabolized_traits)
|
||||
affected_mob.add_traits(metabolized_traits, "metabolize_location:[location]reagent:[type]")
|
||||
|
||||
/// Called when this reagent stops being metabolized (due to running out)
|
||||
/// Has the args 'affected_mob' and 'location' which allows us to remove any traits that is only being added by that reagent holder location. I.e stomach, bloodstream, dermal, etc.
|
||||
/datum/reagent/proc/on_mob_end_metabolize(mob/living/affected_mob, datum/reagents/location)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
REMOVE_TRAITS_IN(affected_mob, "metabolize_location:[location]reagent:[type]")
|
||||
|
||||
@@ -4132,6 +4132,19 @@
|
||||
|
||||
allergen_type = ALLERGEN_FRUIT|ALLERGEN_GRAINS //Made from vodka(grains) and orange juice(fruit)
|
||||
|
||||
/datum/reagent/ethanol/screwdrivercocktail/on_mob_life(mob/living/carbon/drinker, seconds_per_tick, metabolization_ratio)
|
||||
. = ..()
|
||||
// var/obj/item/organ/internal/liver/liver = drinker.internal_organs_by_name[O_LIVER]
|
||||
// if(HAS_TRAIT(liver, TRAIT_ENGINEER_METABOLISM))
|
||||
ADD_TRAIT(drinker, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
|
||||
if (HAS_TRAIT(drinker, TRAIT_IRRADIATED))
|
||||
if(drinker.adjustToxLoss(-2 * metabolization_ratio * seconds_per_tick))
|
||||
return //UPDATE_MOB_HEALTH
|
||||
|
||||
/datum/reagent/ethanol/screwdrivercocktail/on_mob_end_metabolize(mob/living/drinker)
|
||||
. = ..()
|
||||
REMOVE_TRAIT(drinker, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
|
||||
|
||||
/datum/reagent/ethanol/silencer
|
||||
name = REAGENT_SILENCER
|
||||
id = REAGENT_ID_SILENCER
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
scannable = SCANNABLE_BENEFICIAL
|
||||
supply_conversion_value = REFINERYEXPORT_VALUE_COMMON
|
||||
industrial_use = REFINERYEXPORT_REASON_DRUG
|
||||
metabolized_traits = list(TRAIT_HALT_RADIATION_EFFECTS)
|
||||
|
||||
/datum/reagent/prussian_blue/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien == IS_DIONA)
|
||||
|
||||
@@ -1098,7 +1098,7 @@
|
||||
industrial_use = REFINERYEXPORT_REASON_BIOHAZARD
|
||||
|
||||
/datum/reagent/irradiated_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
SSradiation.radiate(get_turf(M), 20) // Irradiate people around you.
|
||||
//SSradiation.radiate(get_turf(M), 20) // Irradiate people around you. //TODO
|
||||
M.radiation = max(M.radiation + 5 * removed, 0) // Irradiate you. Because it's inside you.
|
||||
|
||||
/datum/reagent/neurophage_nanites
|
||||
|
||||
Reference in New Issue
Block a user