Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xeno structures/weeds become forsaken after hijack #3685

Merged
merged 9 commits into from
Jul 5, 2023
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@

/// From /datum/admins/proc/force_predator_round()
#define COMSIG_GLOB_PREDATOR_ROUND_TOGGLED "!predator_round_toglged"

/// From /datum/game_mode/colonialmarines/proc/check_ground_humans()
#define COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING "!groundside_forsaken_handling"
11 changes: 11 additions & 0 deletions code/game/turfs/walls/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions code/modules/cm_aliens/XenoStructures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand All @@ -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."
Expand Down Expand Up @@ -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)
. = ..()
Expand All @@ -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"
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))
qdel(src)

/obj/effect/alien/resin/acid_pillar/strong
name = "acid pillar"
desc = "A resin pillar that is oozing with acid."
Expand Down
11 changes: 11 additions & 0 deletions code/modules/cm_aliens/structures/trap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
. = ..()
Expand All @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions code/modules/cm_aliens/weeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -90,6 +92,15 @@

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)
linked_hive = GLOB.hive_datum[XENO_HIVE_FORSAKEN]

UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING)

/obj/effect/alien/weeds/initialize_pass_flags(datum/pass_flags_container/PF)
. = ..()
if (PF)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/shuttle/shuttles/dropship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down