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:
Cameron Lennox
2026-03-22 12:29:09 -04:00
committed by GitHub
parent d91baf9c9f
commit cbc4151bfb
113 changed files with 2044 additions and 551 deletions
+2 -2
View File
@@ -641,7 +641,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
gas_analyzing += "Temperature: [round(environment.temperature-T0C,0.1)]°C ([round(environment.temperature,0.1)]K)"
gas_analyzing += "Heat Capacity: [round(environment.heat_capacity(),0.1)]"
to_chat(src, span_notice("[jointext(gas_analyzing, "<br>")]"))
/*
/mob/observer/dead/verb/check_radiation()
set name = "Check Radiation"
set category = "Ghost.Game"
@@ -650,7 +650,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(t)
var/rads = SSradiation.get_rads_at_turf(t)
to_chat(src, span_notice("Radiation level: [rads ? rads : "0"] Bq."))
*/
/mob/observer/dead/verb/view_manfiest()
set name = "Show Crew Manifest"
set category = "Ghost.Game"
+4 -2
View File
@@ -6,13 +6,13 @@
if(.)
return
if (radiation)
if (radiation > 100)
throw_alert("irradiated", /atom/movable/screen/alert/irradiated)
if(radiation > 100)
radiation = 100
if(!container)//If it's not in an MMI
to_chat(src, span_red("You feel weak."))
else//Fluff-wise, since the brain can't detect anything itself, the MMI handles thing like that
to_chat(src, span_red("STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED."))
switch(radiation)
if(1 to 49)
radiation--
@@ -35,6 +35,8 @@
radiation -= 3
adjustToxLoss(3)
updatehealth()
else
clear_alert("irradiated")
/mob/living/carbon/brain/handle_environment(datum/gas_mixture/environment)
@@ -251,7 +251,7 @@
/mob/living/carbon/human/inStasisNow()
var/stasisValue = getStasis()
if(stasisValue && (life_tick % stasisValue))
if(stasisValue && (life_tick % stasisValue) || HAS_TRAIT(src, TRAIT_STASIS))
return 1
return 0
@@ -610,3 +610,11 @@ emp_act
return TRUE
return FALSE
///Get all the clothing on a specific body part
/mob/living/carbon/human/proc/get_clothing_on_part(obj/item/organ/external/def_zone)
var/list/covering_part = list()
for(var/obj/item/clothing/equipped in get_equipped_items(INCLUDE_ABSTRACT))
if(equipped.body_parts_covered & def_zone.body_part)
covering_part += equipped
return covering_part
+24 -21
View File
@@ -47,37 +47,38 @@
voice = GetVoice()
var/stasis = inStasisNow()
var/stasis = (inStasisNow())
if(getStasis() > 2)
Sleeping(20)
//No need to update all of these procs if the guy is dead.
fall() //Prevents people from floating
if(stat != DEAD && !stasis)
//Updates the number of stored chemicals for powers
handle_changeling()
if(!stasis)
if(stat != DEAD)
//Updates the number of stored chemicals for powers
handle_changeling()
//Organs and blood
handle_organs()
stabilize_body_temperature() //Body temperature adjusts itself (self-regulation)
weightgain()
handle_shock()
//Organs and blood
handle_organs()
stabilize_body_temperature() //Body temperature adjusts itself (self-regulation)
weightgain()
handle_shock()
handle_pain()
handle_pain()
SEND_SIGNAL(src,COMSIG_HANDLE_ALLERGENS, chem_effects[CE_ALLERGEN])
SEND_SIGNAL(src,COMSIG_HANDLE_ALLERGENS, chem_effects[CE_ALLERGEN])
handle_medical_side_effects()
handle_medical_side_effects()
handle_heartbeat()
handle_nif()
if(phobias)
handle_phobias()
if(!client)
species.handle_npc(src)
handle_heartbeat()
handle_nif()
if(phobias)
handle_phobias()
if(!client)
species.handle_npc(src)
else if(stat == DEAD && !stasis)
handle_defib_timer()
else if(stat == DEAD)
handle_defib_timer()
//Handle any species related components we may have. Ex: Shadekin, Xenochimera, etc. Not STAT checked because those do statchecks in their own code.
handle_species_components()
@@ -262,11 +263,12 @@
accumulated_rads = CLAMP(accumulated_rads,0,RADIATION_CAP) //Max of 100Gy as well. You should never get higher than this. You will be dead before you can reach this.
var/obj/item/organ/internal/I = null //Used for further down below when an organ is picked.
if(!radiation)
clear_alert("irradiated")
if(accumulated_rads)
accumulated_rads -= RADIATION_SPEED_COEFFICIENT //Accumulated rads slowly dissipate very slowly. Get to medical to get it treated!
else if(((life_tick % 5 == 0) && radiation) || (radiation > 600)) //Radiation is a slow, insidious killer. Unless you get a massive dose, then the onset is sudden!
if(reagents.has_reagent(REAGENT_ID_PRUSSIANBLUE)) //Prussian Blue temporarily stops radiation effects.
if(HAS_TRAIT(src, TRAIT_HALT_RADIATION_EFFECTS)) //If we have a trait that halts radiation effects, then we just stop here. No need to do any of the checks below.
return
var/damage = 0
@@ -334,6 +336,7 @@
else if (radiation >= GLOB.radiation_levels[species.rad_levels]["danger_3"] && radiation < GLOB.radiation_levels[species.rad_levels]["danger_4"]) //Equivalent of 8.0 to 30 Gy.
throw_alert("irradiated", /atom/movable/screen/alert/irradiated)
damage = 10
radiation -= 100 * RADIATION_SPEED_COEFFICIENT * species.rad_removal_mod
accumulated_rads += 100 * RADIATION_SPEED_COEFFICIENT
@@ -206,13 +206,6 @@
else
return ..()
/mob/living/simple_mob/slime/promethean/rad_act(severity)
rad_glow += severity
rad_glow = CLAMP(rad_glow,0,250)
if(rad_glow > 1)
set_light(max(1,min(5,rad_glow/15)), max(1,min(10,rad_glow/25)), color)
update_icon()
/mob/living/simple_mob/slime/promethean/bullet_act(obj/item/projectile/P)
if(humanform)
return humanform.bullet_act(P)
@@ -307,14 +307,6 @@
else
return ..()
/mob/living/simple_mob/protean_blob/rad_act(severity)
if(istype(loc, /obj/item/rig))
return //Don't irradiate us while we're in rig mode
if(humanform)
return humanform.rad_act(severity)
else
return ..()
/mob/living/simple_mob/protean_blob/bullet_act(obj/item/projectile/P)
if(humanform)
return humanform.bullet_act(P)
@@ -442,6 +442,14 @@
hidden = FALSE
activation_message="Your body feels mundane."
/datum/trait/positive/rad_immune/apply(var/datum/species/S,var/mob/living/carbon/human/H)
..()
ADD_TRAIT(H, TRAIT_RADIMMUNE, ROUNDSTART_TRAIT)
/datum/trait/positive/rad_immune/unapply(var/datum/species/S,var/mob/living/carbon/human/H)
..()
REMOVE_TRAIT(H, TRAIT_RADIMMUNE, ROUNDSTART_TRAIT)
/datum/trait/positive/vibration_sense
name = "Vibration Sense"
desc = "Allows you to sense subtle vibrations nearby, even if the source cannot be seen."
-1
View File
@@ -32,7 +32,6 @@
return name
/mob/living/Destroy()
SSradiation.listeners -= src
remove_all_modifiers(TRUE)
QDEL_NULL(say_list)
@@ -522,8 +522,14 @@
..()
/mob/living/simple_mob/slime/xenobio/green/proc/irradiate()
SSradiation.radiate(src, rads)
radiation_pulse(
src,
max_range = 5,
threshold = RAD_LIGHT_INSULATION,
chance = rads * 0.5,
minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME,
strength = rads
)
/mob/living/simple_mob/slime/xenobio/pink