From 55efae4bacc342f8f40594d4dd6fe0ad9692f723 Mon Sep 17 00:00:00 2001 From: Guti <32563288+TheCaramelion@users.noreply.github.com> Date: Fri, 19 Dec 2025 03:48:00 +0100 Subject: [PATCH] Anomaly changes (#18902) * Automatic changelog compile [ci skip] * Adds * Improv * TELESCI!!! * Gravity --------- Co-authored-by: vorestation-ci[bot] <199609141+vorestation-ci[bot]@users.noreply.github.com> --- .../effects/anomalies/anomalies_flux.dm | 2 +- .../effects/anomalies/anomalies_gravity.dm | 14 ++++++--- .../anomalies/anomalies_hallucination.dm | 2 ++ .../effects/anomalies/anomaly_placer.dm | 31 ++++++++++++------- code/modules/telesci/telesci_computer.dm | 9 +++++- 5 files changed, 41 insertions(+), 17 deletions(-) diff --git a/code/game/objects/effects/anomalies/anomalies_flux.dm b/code/game/objects/effects/anomalies/anomalies_flux.dm index 788b84f54c0..cc7f46aad23 100644 --- a/code/game/objects/effects/anomalies/anomalies_flux.dm +++ b/code/game/objects/effects/anomalies/anomalies_flux.dm @@ -41,7 +41,7 @@ . = ..() /obj/effect/anomaly/flux/proc/mobShock(mob/living/M) - if(canshock && istype(M)) + if(canshock && istype(M) && !M.is_incorporeal()) canshock = FALSE M.electrocute_act(shockdamage, name) diff --git a/code/game/objects/effects/anomalies/anomalies_gravity.dm b/code/game/objects/effects/anomalies/anomalies_gravity.dm index 7202b676ef6..bb801561123 100644 --- a/code/game/objects/effects/anomalies/anomalies_gravity.dm +++ b/code/game/objects/effects/anomalies/anomalies_gravity.dm @@ -21,11 +21,17 @@ if(!O.anchored) step_towards(O, src) for(var/mob/living/M in range(0, src)) - if(!M.can_overcome_gravity()) - gravShock(M) + if(ishuman(M)) + var/mob/living/carbon/human/human = M + if(istype(human.shoes, /obj/item/clothing/shoes/magboots) && (human.shoes.item_flags & NOSLIP)) + continue + gravShock(M) for(var/mob/living/M in range(4, src)) - if(!M.can_overcome_gravity()) - step_towards(M, src) + if(ishuman(M)) + var/mob/living/carbon/human/human = M + if(istype(human.shoes, /obj/item/clothing/shoes/magboots) && (human.shoes.item_flags & NOSLIP)) + continue + step_towards(M, src) for(var/obj/O in range(0, src)) if(O.anchored) continue diff --git a/code/game/objects/effects/anomalies/anomalies_hallucination.dm b/code/game/objects/effects/anomalies/anomalies_hallucination.dm index 33e0156a113..7390896a38a 100644 --- a/code/game/objects/effects/anomalies/anomalies_hallucination.dm +++ b/code/game/objects/effects/anomalies/anomalies_hallucination.dm @@ -36,6 +36,7 @@ hallucinator.hallucination += 10 if(prob(20)) to_chat(hallucinator, pick(messages)) + hallucinator.Confuse(10) if(prob(10)) to_chat(hallucinator, span_danger("Your nose bleeds!")) hallucinator.drip(1) @@ -49,6 +50,7 @@ hallucinator.hallucination += 25 to_chat(hallucinator, span_danger("Your nose bleeds!")) hallucinator.drip(1) + hallucinator.Confuse(15) /obj/effect/anomaly/hallucination/proc/generate_decoys() if(!spawn_decoys) diff --git a/code/game/objects/effects/anomalies/anomaly_placer.dm b/code/game/objects/effects/anomalies/anomaly_placer.dm index e9d343db56c..4e1d7ea5701 100644 --- a/code/game/objects/effects/anomalies/anomaly_placer.dm +++ b/code/game/objects/effects/anomalies/anomaly_placer.dm @@ -1,18 +1,11 @@ /datum/anomaly_placer var/static/list/allowed_areas - var/list/excluded = list( - /area/crew_quarters, - /area/shuttle, - /area/space, - /area/solar, - /area/engineering/engine_room, - /area/maintenance, - /area/holodeck, - /area/ai - ) /datum/anomaly_placer/proc/find_valid_area() - var/list/possible_areas = get_station_areas(excluded) + if(!allowed_areas) + generate_allowed_areas() + + var/list/possible_areas = typecache_filter_list(GLOB.areas_by_type, allowed_areas) if(!length(possible_areas)) CRASH("No valid areas for anomaly found.") @@ -43,3 +36,19 @@ if(isopenspace(tested)) return FALSE return TRUE + +/datum/anomaly_placer/proc/generate_allowed_areas() + var/static/list/safe_area_types = typecacheof(list( + /area/crew_quarters, + /area/shuttle, + /area/space, + /area/solar, + /area/engineering, + /area/maintenance, + /area/holodeck, + /area/ai + )) + + var/static/list/unsafe_area_subtypes = typecacheof(list(/area/engineering/break_room)) + + allowed_areas = GLOB.areas_by_type - safe_area_types + unsafe_area_subtypes diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 02753375e3f..7c09f96b783 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -189,10 +189,17 @@ /obj/machinery/computer/telescience/proc/telefail() switch(rand(99)) - if(0 to 85) + if(0 to 80) sparks() visible_message(span_warning("The telepad weakly fizzles.")) return + if(81 to 85) + sparks() + var/anomaly = pick(FLUX_ANOMALY, GRAVITATIONAL_ANOMALY, PYRO_ANOMALY, HALLUCINATION_ANOMALY, BIOSCRAMBLER_ANOMALY, DIMENSIONAL_ANOMALY) + generate_anomaly(get_turf(telepad), anomaly, 1, FALSE) + for(var/mob/living/carbon/human/human in viewers(telepad, null)) + to_chat(human, span_warning("The telepad crackles with energy, as a tear in reality is created!")) + return if(86 to 90) // Irradiate everyone in telescience! for(var/obj/machinery/telepad/E in GLOB.machines)