From b995581a1119c6971add95e5373eebfaffcf4aab Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 23 Aug 2020 05:33:19 -0700 Subject: [PATCH] changes --- code/__DEFINES/research/anomalies.dm | 3 +++ code/game/objects/effects/anomalies.dm | 14 ++++++++++---- code/modules/cargo/packs/science.dm | 10 +++++----- code/modules/power/supermatter/supermatter.dm | 8 ++++---- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/code/__DEFINES/research/anomalies.dm b/code/__DEFINES/research/anomalies.dm index 2b23ca24c4..35d99a982d 100644 --- a/code/__DEFINES/research/anomalies.dm +++ b/code/__DEFINES/research/anomalies.dm @@ -16,3 +16,6 @@ #define MAX_CORES_FLUX 8 #define MAX_CORES_VORTEX 8 #define MAX_CORES_PYRO 8 + +/// chance supermatter anomalies drop real cores +#define SUPERMATTER_ANOMALY_DROP_CHANCE 20 diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 41270bb09e..e61be117e7 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -17,11 +17,15 @@ var/countdown_colour var/obj/effect/countdown/anomaly/countdown -/obj/effect/anomaly/Initialize(mapload, new_lifespan) + /// chance we drop a core when neutralized + var/core_drop_chance = 100 + +/obj/effect/anomaly/Initialize(mapload, new_lifespan, core_drop_chance = 100) . = ..() GLOB.poi_list |= src START_PROCESSING(SSobj, src) impact_area = get_area(src) + src.core_drop_chance = core_drop_chance if (!impact_area) return INITIALIZE_HINT_QDEL @@ -54,6 +58,8 @@ GLOB.poi_list.Remove(src) STOP_PROCESSING(SSobj, src) qdel(countdown) + if(aSignal) + QDEL_NULL(aSignal) return ..() /obj/effect/anomaly/proc/anomalyEffect() @@ -70,12 +76,12 @@ /obj/effect/anomaly/proc/anomalyNeutralize() new /obj/effect/particle_effect/smoke/bad(loc) - for(var/atom/movable/O in src) - O.forceMove(drop_location()) + if(prob(core_drop_chance)) + aSignal.forceMove(drop_location()) + aSignal = null qdel(src) - /obj/effect/anomaly/attackby(obj/item/I, mob/user, params) if(I.tool_behaviour == TOOL_ANALYZER) //revert if runtimed to_chat(user, "Analyzing... [src]'s unstable field is fluctuating along frequency [format_frequency(aSignal.frequency)], code [aSignal.code].") diff --git a/code/modules/cargo/packs/science.dm b/code/modules/cargo/packs/science.dm index 4edf7f3bd2..125bfe2034 100644 --- a/code/modules/cargo/packs/science.dm +++ b/code/modules/cargo/packs/science.dm @@ -198,7 +198,7 @@ name = "Raw Flux Anomaly" desc = "The raw core of a flux anomaly, ready to be implosion-compressed into a powerful artifact." cost = 5000 - access = ACCESS_TOXINS + access = ACCESS_TOX contains = list(/obj/item/raw_anomaly_core/flux) crate_name = "raw flux anomaly" crate_type = /obj/structure/closet/crate/secure/science @@ -207,7 +207,7 @@ name = "Raw Gravitational Anomaly" desc = "The raw core of a gravitational anomaly, ready to be implosion-compressed into a powerful artifact." cost = 5000 - access = ACCESS_TOXINS + access = ACCESS_TOX contains = list(/obj/item/raw_anomaly_core/grav) crate_name = "raw pyro anomaly" crate_type = /obj/structure/closet/crate/secure/science @@ -216,7 +216,7 @@ name = "Raw Vortex Anomaly" desc = "The raw core of a vortex anomaly, ready to be implosion-compressed into a powerful artifact." cost = 5000 - access = ACCESS_TOXINS + access = ACCESS_TOX contains = list(/obj/item/raw_anomaly_core/vortex) crate_name = "raw vortex anomaly" crate_type = /obj/structure/closet/crate/secure/science @@ -225,7 +225,7 @@ name = "Raw Bluespace Anomaly" desc = "The raw core of a bluespace anomaly, ready to be implosion-compressed into a powerful artifact." cost = 5000 - access = ACCESS_TOXINS + access = ACCESS_TOX contains = list(/obj/item/raw_anomaly_core/bluespace) crate_name = "raw bluespace anomaly" crate_type = /obj/structure/closet/crate/secure/science @@ -234,7 +234,7 @@ name = "Raw Pyro Anomaly" desc = "The raw core of a pyro anomaly, ready to be implosion-compressed into a powerful artifact." cost = 5000 - access = ACCESS_TOXINS + access = ACCESS_TOX contains = list(/obj/item/raw_anomaly_core/pyro) crate_name = "raw pyro anomaly" crate_type = /obj/structure/closet/crate/secure/science diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index fd8f900552..37a2adddcf 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -639,7 +639,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) if(produces_gas) env.merge(removed) air_update_turf() - + /********* END CITADEL CHANGES *********/ @@ -1026,12 +1026,12 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) if(L) switch(type) if(FLUX_ANOMALY) - var/obj/effect/anomaly/flux/A = new(L, 300, FALSE) + var/obj/effect/anomaly/flux/A = new(L, 300, SUPERMATTER_ANOMALY_DROP_CHANCE) A.explosive = FALSE if(GRAVITATIONAL_ANOMALY) - new /obj/effect/anomaly/grav(L, 250, FALSE) + new /obj/effect/anomaly/grav(L, 250, SUPERMATTER_ANOMALY_DROP_CHANCE) if(PYRO_ANOMALY) - new /obj/effect/anomaly/pyro(L, 200, FALSE) + new /obj/effect/anomaly/pyro(L, 200, SUPERMATTER_ANOMALY_DROP_CHANCE) /obj/machinery/power/supermatter_crystal/proc/supermatter_zap(atom/zapstart = src, range = 5, zap_str = 4000, zap_flags = ZAP_SUPERMATTER_FLAGS, list/targets_hit = list()) if(QDELETED(zapstart))