From ea13fb4e1ed65c448210c691679f31a69efb1e4f Mon Sep 17 00:00:00 2001 From: Asbestos Gremlin Date: Wed, 14 Jun 2023 12:47:46 -0700 Subject: [PATCH 1/7] Forsaken being spawned now swaps all groundside resin to forsaken hive. --- code/__DEFINES/dcs/signals/signals_global.dm | 3 ++ code/game/turfs/walls/wall_types.dm | 11 ++++++ code/modules/cm_aliens/XenoStructures.dm | 38 ++++++++++++++++++++ code/modules/cm_aliens/structures/trap.dm | 11 ++++++ code/modules/cm_aliens/weeds.dm | 10 ++++++ 5 files changed, 73 insertions(+) diff --git a/code/__DEFINES/dcs/signals/signals_global.dm b/code/__DEFINES/dcs/signals/signals_global.dm index c3d51b2d65cd..8f25b8a9df02 100644 --- a/code/__DEFINES/dcs/signals/signals_global.dm +++ b/code/__DEFINES/dcs/signals/signals_global.dm @@ -50,3 +50,6 @@ /// From /datum/admins/proc/force_predator_round() #define COMSIG_GLOB_PREDATOR_ROUND_TOGGLED "!predator_round_toglged" + +// Used to convert all groundside weeds, etc to Forsaken hive. +#define COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING "!groundside_forsaken_handling" diff --git a/code/game/turfs/walls/wall_types.dm b/code/game/turfs/walls/wall_types.dm index 702cbd35560c..04c5a0735824 100644 --- a/code/game/turfs/walls/wall_types.dm +++ b/code/game/turfs/walls/wall_types.dm @@ -710,6 +710,17 @@ for(var/obj/effect/alien/weeds/node/weed_node in contents) qdel(weed_node) + if(hivenumber == XENO_HIVE_NORMAL) + RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling)) + +/turf/closed/wall/resin/proc/forsaken_handling() + SIGNAL_HANDLER + if(is_ground_level(z)) + hivenumber = XENO_HIVE_FORSAKEN + set_hive_data(src, XENO_HIVE_FORSAKEN) + + UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) + /turf/closed/wall/resin/pillar name = "resin pillar segment" hull = TRUE diff --git a/code/modules/cm_aliens/XenoStructures.dm b/code/modules/cm_aliens/XenoStructures.dm index f21cd6498615..a26398dfe007 100644 --- a/code/modules/cm_aliens/XenoStructures.dm +++ b/code/modules/cm_aliens/XenoStructures.dm @@ -154,6 +154,8 @@ if (hive) hivenumber = hive set_hive_data(src, hivenumber) + if(hivenumber == XENO_HIVE_NORMAL) + RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling)) /obj/effect/alien/resin/sticky/Crossed(atom/movable/AM) . = ..() @@ -166,6 +168,14 @@ X.next_move_slowdown = X.next_move_slowdown + slow_amt return . +/obj/effect/alien/resin/sticky/proc/forsaken_handling() + SIGNAL_HANDLER + if(is_ground_level(z)) + hivenumber = XENO_HIVE_FORSAKEN + set_hive_data(src, XENO_HIVE_FORSAKEN) + + UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) + /obj/effect/alien/resin/spike name = "resin spike" desc = "A small cluster of bone spikes. Ouch." @@ -193,6 +203,8 @@ hivenumber = hive set_hive_data(src, hivenumber) setDir(pick(alldirs)) + if(hivenumber == XENO_HIVE_NORMAL) + RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling)) /obj/effect/alien/resin/spike/Crossed(atom/movable/AM) . = ..() @@ -206,6 +218,14 @@ H.apply_armoured_damage(damage, penetration = penetration, def_zone = pick(target_limbs)) H.last_damage_data = construction_data +/obj/effect/alien/resin/spike/proc/forsaken_handling() + SIGNAL_HANDLER + if(is_ground_level(z)) + hivenumber = XENO_HIVE_FORSAKEN + set_hive_data(src, XENO_HIVE_FORSAKEN) + + UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) + // Praetorian Sticky Resin spit uses this. /obj/effect/alien/resin/sticky/thin name = "thin sticky resin" @@ -348,6 +368,9 @@ set_hive_data(src, hivenumber) + if(hivenumber == XENO_HIVE_NORMAL) + RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling)) + /obj/structure/mineral_door/resin/flamer_fire_act(dam = BURN_LEVEL_TIER_1) health -= dam healthcheck() @@ -479,6 +502,13 @@ visible_message(SPAN_NOTICE("[src] collapses from the lack of support.")) qdel(src) +/obj/structure/mineral_door/resin/proc/forsaken_handling() + SIGNAL_HANDLER + if(is_ground_level(z)) + hivenumber = XENO_HIVE_FORSAKEN + set_hive_data(src, XENO_HIVE_FORSAKEN) + + UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) /obj/structure/mineral_door/resin/thick name = "thick resin door" icon_state = "thick resin" @@ -510,6 +540,8 @@ hivenumber = hive set_hive_data(src, hivenumber) START_PROCESSING(SSprocessing, src) + if(hivenumber == XENO_HIVE_NORMAL) + RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling)) /obj/effect/alien/resin/acid_pillar/proc/can_target(mob/living/carbon/current_mob, position_to_get = 0) @@ -599,6 +631,12 @@ /obj/effect/alien/resin/acid_pillar/get_projectile_hit_boolean(obj/item/projectile/P) return TRUE +/obj/effect/alien/resin/acid_pillar/proc/forsaken_handling() + SIGNAL_HANDLER + UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) + if(is_ground_level(z)) + Destroy() + /obj/effect/alien/resin/acid_pillar/strong name = "acid pillar" desc = "A resin pillar that is oozing with acid." diff --git a/code/modules/cm_aliens/structures/trap.dm b/code/modules/cm_aliens/structures/trap.dm index 1b3d4d414d48..5e1c51538ce6 100644 --- a/code/modules/cm_aliens/structures/trap.dm +++ b/code/modules/cm_aliens/structures/trap.dm @@ -29,6 +29,8 @@ cause_data = create_cause_data("resin trap", X) set_hive_data(src, hivenumber) + if(hivenumber == XENO_HIVE_NORMAL) + RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling)) /obj/effect/alien/resin/trap/Initialize() . = ..() @@ -53,6 +55,14 @@ if(RESIN_TRAP_ACID1, RESIN_TRAP_ACID2, RESIN_TRAP_ACID3) . += "It's filled with pressurised acid." +/obj/effect/alien/resin/trap/proc/forsaken_handling() + SIGNAL_HANDLER + if(is_ground_level(z)) + hivenumber = XENO_HIVE_FORSAKEN + set_hive_data(src, XENO_HIVE_FORSAKEN) + + UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) + /obj/effect/alien/resin/trap/proc/facehugger_die() var/obj/item/clothing/mask/facehugger/FH = new (loc) FH.die() @@ -159,6 +169,7 @@ trap_type_name = "hugger" var/obj/item/clothing/mask/facehugger/FH = new (loc) FH.hivenumber = hivenumber + set_hive_data(FH, hivenumber) set_state() visible_message(SPAN_WARNING("[FH] gets out of [src]!")) sleep(15) diff --git a/code/modules/cm_aliens/weeds.dm b/code/modules/cm_aliens/weeds.dm index 0be2220994d8..cfe8d599648e 100644 --- a/code/modules/cm_aliens/weeds.dm +++ b/code/modules/cm_aliens/weeds.dm @@ -82,6 +82,8 @@ COMSIG_ATOM_TURF_CHANGE, COMSIG_MOVABLE_TURF_ENTERED ), PROC_REF(set_turf_weeded)) + if(hivenumber == XENO_HIVE_NORMAL) + RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling)) /obj/effect/alien/weeds/proc/set_turf_weeded(datum/source, turf/T) SIGNAL_HANDLER @@ -90,6 +92,14 @@ T.weeds = src +/obj/effect/alien/weeds/proc/forsaken_handling() + SIGNAL_HANDLER + if(is_ground_level(z)) + hivenumber = XENO_HIVE_FORSAKEN + set_hive_data(src, XENO_HIVE_FORSAKEN) + + UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) + /obj/effect/alien/weeds/initialize_pass_flags(datum/pass_flags_container/PF) . = ..() if (PF) From 598b5545a61058c3ca707632ced87a18e8c9f6b9 Mon Sep 17 00:00:00 2001 From: Asbestos Gremlin Date: Wed, 14 Jun 2023 13:05:56 -0700 Subject: [PATCH 2/7] oopsei woopisie --- code/game/gamemodes/colonialmarines/colonialmarines.dm | 1 + code/modules/cm_aliens/XenoStructures.dm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/colonialmarines/colonialmarines.dm b/code/game/gamemodes/colonialmarines/colonialmarines.dm index 6fae17b6aac9..81e802e14d68 100644 --- a/code/game/gamemodes/colonialmarines/colonialmarines.dm +++ b/code/game/gamemodes/colonialmarines/colonialmarines.dm @@ -273,6 +273,7 @@ if(groundside_humans > (groundside_xenos * GROUNDSIDE_XENO_MULTIPLIER)) SSticker.mode.get_specific_call("Xenomorphs Groundside (Forsaken)", FALSE, FALSE) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) TIMER_COOLDOWN_START(src, COOLDOWN_HIJACK_GROUND_CHECK, 1 MINUTES) diff --git a/code/modules/cm_aliens/XenoStructures.dm b/code/modules/cm_aliens/XenoStructures.dm index a26398dfe007..594c2e98695c 100644 --- a/code/modules/cm_aliens/XenoStructures.dm +++ b/code/modules/cm_aliens/XenoStructures.dm @@ -635,7 +635,7 @@ SIGNAL_HANDLER UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) if(is_ground_level(z)) - Destroy() + qdel(src) /obj/effect/alien/resin/acid_pillar/strong name = "acid pillar" From b8f0c68912e70074e3ff2be800e34ba460099e6c Mon Sep 17 00:00:00 2001 From: NewyearnewmeUwu <70115628+NewyearnewmeUwu@users.noreply.github.com> Date: Wed, 14 Jun 2023 17:38:52 -0700 Subject: [PATCH 3/7] Update code/__DEFINES/dcs/signals/signals_global.dm Co-authored-by: fira --- code/__DEFINES/dcs/signals/signals_global.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__DEFINES/dcs/signals/signals_global.dm b/code/__DEFINES/dcs/signals/signals_global.dm index 8f25b8a9df02..0b7727c44c3b 100644 --- a/code/__DEFINES/dcs/signals/signals_global.dm +++ b/code/__DEFINES/dcs/signals/signals_global.dm @@ -51,5 +51,5 @@ /// From /datum/admins/proc/force_predator_round() #define COMSIG_GLOB_PREDATOR_ROUND_TOGGLED "!predator_round_toglged" -// Used to convert all groundside weeds, etc to Forsaken hive. +/// From /datum/game_mode/colonialmarines/proc/check_ground_humans() #define COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING "!groundside_forsaken_handling" From ebf727a68f27598f23dffb9a8efde5306ed96b1b Mon Sep 17 00:00:00 2001 From: Morrow Date: Sat, 17 Jun 2023 10:29:51 -0400 Subject: [PATCH 4/7] griefing your PR --- code/game/gamemodes/colonialmarines/colonialmarines.dm | 1 - code/modules/mob/living/carbon/xenomorph/xeno_defines.dm | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/colonialmarines/colonialmarines.dm b/code/game/gamemodes/colonialmarines/colonialmarines.dm index 81e802e14d68..6fae17b6aac9 100644 --- a/code/game/gamemodes/colonialmarines/colonialmarines.dm +++ b/code/game/gamemodes/colonialmarines/colonialmarines.dm @@ -273,7 +273,6 @@ if(groundside_humans > (groundside_xenos * GROUNDSIDE_XENO_MULTIPLIER)) SSticker.mode.get_specific_call("Xenomorphs Groundside (Forsaken)", FALSE, FALSE) - SEND_GLOBAL_SIGNAL(COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) TIMER_COOLDOWN_START(src, COOLDOWN_HIJACK_GROUND_CHECK, 1 MINUTES) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index b5431720e14a..0aa376b9ed5b 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -911,6 +911,8 @@ hivecore_cooldown = FALSE xeno_message(SPAN_XENOBOLDNOTICE("The weeds have recovered! A new hive core can be built!"),3,hivenumber) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) + /datum/hive_status/proc/free_respawn(client/C) stored_larva++ if(!hive_location || !hive_location.spawn_burrowed_larva(C.mob)) From 0c457c72676cc5c16897610c02125cb5f9064572 Mon Sep 17 00:00:00 2001 From: Morrow Date: Tue, 20 Jun 2023 19:20:55 -0400 Subject: [PATCH 5/7] Merge remote-tracking branch 'github-desktop-NewyearnewmeUwu/forsakenswap' into forsaken-handling From e7a07d75d3f9fdc4f9fd9ff032dde9661143d583 Mon Sep 17 00:00:00 2001 From: Morrow Date: Tue, 20 Jun 2023 19:22:06 -0400 Subject: [PATCH 6/7] on arrival now --- code/modules/mob/living/carbon/xenomorph/xeno_defines.dm | 2 -- code/modules/shuttle/shuttles/dropship.dm | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 0aa376b9ed5b..b5431720e14a 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -911,8 +911,6 @@ hivecore_cooldown = FALSE xeno_message(SPAN_XENOBOLDNOTICE("The weeds have recovered! A new hive core can be built!"),3,hivenumber) - SEND_GLOBAL_SIGNAL(COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) - /datum/hive_status/proc/free_respawn(client/C) stored_larva++ if(!hive_location || !hive_location.spawn_burrowed_larva(C.mob)) diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index 12f33d779661..303d4c0494ed 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -278,6 +278,8 @@ // shake_camera(affected_mob, 10, 1) affected_mob.apply_effect(3, WEAKEN) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) + /datum/map_template/shuttle/alamo name = "Alamo" shuttle_id = DROPSHIP_ALAMO From c805e31d1612b9f68a3b6e42ad45d4485e3ba582 Mon Sep 17 00:00:00 2001 From: Morrow Date: Wed, 5 Jul 2023 10:42:30 -0400 Subject: [PATCH 7/7] Weeds must be linked --- code/modules/cm_aliens/weeds.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/cm_aliens/weeds.dm b/code/modules/cm_aliens/weeds.dm index cfe8d599648e..9a6989472db8 100644 --- a/code/modules/cm_aliens/weeds.dm +++ b/code/modules/cm_aliens/weeds.dm @@ -97,6 +97,7 @@ if(is_ground_level(z)) hivenumber = XENO_HIVE_FORSAKEN set_hive_data(src, XENO_HIVE_FORSAKEN) + linked_hive = GLOB.hive_datum[XENO_HIVE_FORSAKEN] UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING)