From a4e1131a3e05da76b239d4d7cbc0afaeb6524915 Mon Sep 17 00:00:00 2001
From: CampinKiller24 <136183573+CampinKiller24@users.noreply.github.com>
Date: Fri, 1 Sep 2023 13:06:17 -0500
Subject: [PATCH] Radiation Storm Rework (#16515)
* kneel before me sneaky
* vending update
* conflict
* conflict fix take 2?
* radiation buff (and changes)
* nuking comments I forgot to remove
---
code/game/gamemodes/events.dm | 24 -------------------
code/game/machinery/vending_types.dm | 3 ++-
code/modules/events/radiation_storm.dm | 5 ++--
code/modules/mob/living/announcer.dm | 3 ---
code/modules/mob/living/carbon/human/human.dm | 24 -------------------
code/modules/mob/living/carbon/human/life.dm | 9 +++----
code/modules/mob/living/living.dm | 10 --------
.../mob/living/simple_animal/friendly/cat.dm | 5 ----
.../CampinKiller24-Radstorm-Rework.yml | 9 +++++++
9 files changed, 19 insertions(+), 73 deletions(-)
create mode 100644 html/changelogs/CampinKiller24-Radstorm-Rework.yml
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index bb2ae679153..3f8637d16b7 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -1,30 +1,6 @@
var/eventchance = 10 // Percent chance per 5 minutes.
var/hadevent = 0
-/proc/high_radiation_event()
-
- for(var/mob/living/carbon/human/H in living_mob_list)
- var/turf/T = get_turf(H)
- if(!T)
- continue
- if(isNotStationLevel(T.z))
- continue
-
- H.apply_damage((rand(15,75)), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
- if (prob(5))
- H.apply_damage((rand(90,150)), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
- if (prob(25))
- if (prob(75))
- randmutb(H)
- domutcheck(H,null,MUTCHK_FORCED)
- else
- randmutg(H)
- domutcheck(H,null,MUTCHK_FORCED)
- sleep(100)
- command_announcement.Announce("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
-
-
-
//Changing this to affect the main station. Blame Urist. --Pete
/proc/prison_break() // -- Callagan
diff --git a/code/game/machinery/vending_types.dm b/code/game/machinery/vending_types.dm
index 1be7baaaa54..96f5e938980 100644
--- a/code/game/machinery/vending_types.dm
+++ b/code/game/machinery/vending_types.dm
@@ -1103,7 +1103,8 @@
/obj/item/airalarm_electronics = 10,
/obj/item/firealarm_electronics = 10,
/obj/item/cell/high = 10,
- /obj/item/grenade/chem_grenade/antifuel = 5
+ /obj/item/grenade/chem_grenade/antifuel = 5,
+ /obj/item/device/geiger = 5
)
contraband = list(
/obj/item/cell/potato = 3
diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm
index f94338eaab7..b78d6165c08 100644
--- a/code/modules/events/radiation_storm.dm
+++ b/code/modules/events/radiation_storm.dm
@@ -42,8 +42,9 @@
lights()
/datum/event/radiation_storm/proc/radiate()
- for(var/mob/living/C in living_mob_list)
- C.apply_radiation_effects()
+ var/radiation_level = rand(20, 40)
+ for(var/z in affecting_z)
+ SSradiation.z_radiate(locate(1, 1, z), radiation_level, TRUE)
/datum/event/radiation_storm/end(var/faked)
..()
diff --git a/code/modules/mob/living/announcer.dm b/code/modules/mob/living/announcer.dm
index 727440700a1..c066a1d93c6 100755
--- a/code/modules/mob/living/announcer.dm
+++ b/code/modules/mob/living/announcer.dm
@@ -91,9 +91,6 @@
/mob/living/announcer/InStasis()
return FALSE
-/mob/living/announcer/apply_radiation_effects()
- return FALSE
-
/mob/living/announcer/flash_act(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, ignore_inherent = FALSE, type = /obj/screen/fullscreen/flash, length = 2.5 SECONDS)
return FALSE
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index f6298c1c770..d9cb3cb81b3 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -2028,30 +2028,6 @@
var/matrix/M = new()
B.transform = M.Scale(scale)
-/mob/living/carbon/human/apply_radiation_effects()
- . = ..()
- if(. == TRUE)
- if(src.is_diona())
- var/damage = rand(15, 30)
- src.adjustToxLoss(-damage)
- if(prob(5))
- damage = rand(20, 60)
- src.adjustToxLoss(-damage)
- to_chat(src, SPAN_NOTICE("You can feel flow of energy which makes you regenerate."))
-
- if(species.radiation_mod <= 0)
- return
-
- apply_damage((rand(15,30)), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
- if(prob(4))
- apply_damage((rand(20,60)), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
- if (prob(75))
- randmutb(src) // Applies bad mutation
- domutcheck(src,null,MUTCHK_FORCED)
- else
- randmutg(src) // Applies good mutation
- domutcheck(src,null,MUTCHK_FORCED)
-
/mob/living/carbon/human/get_accent_icon(var/datum/language/speaking, var/mob/hearer, var/force_accent)
var/used_accent = accent //starts with the mob's default accent
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index f0342b6e686..287cbdf20a0 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -227,10 +227,10 @@
var/damage = 0
total_radiation -= 1 * RADIATION_SPEED_COEFFICIENT
if(prob(25))
- damage = 1
+ damage = 2
if (total_radiation > 50)
- damage = 1
+ damage = 3
total_radiation -= 1 * RADIATION_SPEED_COEFFICIENT
if(prob(5) && prob(100 * RADIATION_SPEED_COEFFICIENT))
src.apply_radiation(-5 * RADIATION_SPEED_COEFFICIENT)
@@ -247,9 +247,10 @@
if (total_radiation > 75)
src.apply_radiation(-1 * RADIATION_SPEED_COEFFICIENT)
- damage = 3
+ damage = 7
if(prob(5))
- take_overall_damage(0, 5 * RADIATION_SPEED_COEFFICIENT, used_weapon = "Radiation Burns")
+ take_overall_damage(0, 10 * RADIATION_SPEED_COEFFICIENT, used_weapon = "Radiation Burns")
+ to_chat(src, "You feel a burning sensation!")
if(prob(1))
to_chat(src, "You feel strange!")
adjustCloneLoss(5 * RADIATION_SPEED_COEFFICIENT)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 864df0910ed..b801debc110 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -995,16 +995,6 @@ default behaviour is:
update_icon()
return TRUE
-/mob/living/proc/apply_radiation_effects()
- var/area/A = get_area(src)
- if(!A)
- return FALSE
- if(isNotStationLevel(A.z))
- return FALSE
- if(A.flags & RAD_SHIELDED)
- return FALSE
- . = TRUE
-
/mob/living/proc/needs_wheelchair()
return FALSE
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index 0ba0eb72e95..7606165da6f 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -156,11 +156,6 @@
. = ..()
handle_radiation_light()
-/mob/living/simple_animal/cat/apply_radiation_effects()
- . = ..()
- if(.)
- apply_damage((rand(30,60)), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
-
/mob/living/simple_animal/cat/proc/handle_flee_target()
//see if we should stop fleeing
if (flee_target && !(flee_target.loc in view(src)))
diff --git a/html/changelogs/CampinKiller24-Radstorm-Rework.yml b/html/changelogs/CampinKiller24-Radstorm-Rework.yml
new file mode 100644
index 00000000000..b13a2a56586
--- /dev/null
+++ b/html/changelogs/CampinKiller24-Radstorm-Rework.yml
@@ -0,0 +1,9 @@
+author: CampinKiller24
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+changes:
+ - rscadd: "Ports how radiation storms work from Bay. Geiger counters can now detect radiation during storms, and radiation-resistant clothing (such as radsuits) now block radiation during storms."
+ - rscadd: "Adds geiger counters to Engi-Vend."
+ - rscadd: "Exposure to extreme radiation is now much more harmful than before."