Skip to content

Commit

Permalink
Add forsaken handling to weed_food corpses
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Jan 3, 2024
1 parent 787d5fe commit 3ee8dea
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions code/datums/components/weed_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
RegisterSignal(parent_mob, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
RegisterSignal(parent_mob, list(COMSIG_LIVING_REJUVENATED, COMSIG_HUMAN_REVIVED), PROC_REF(on_rejuv))
RegisterSignal(parent_mob, COMSIG_HUMAN_SET_UNDEFIBBABLE, PROC_REF(on_update))
RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(on_forsaken))
if(parent_turf)
RegisterSignal(parent_turf, COMSIG_WEEDNODE_GROWTH, PROC_REF(on_update))

Expand All @@ -109,6 +110,7 @@
UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE)
if(parent_nest)
UnregisterSignal(parent_nest, COMSIG_PARENT_QDELETING)
UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING)

/// SIGNAL_HANDLER for COMSIG_MOVABLE_MOVED
/datum/component/weed_food/proc/on_move()
Expand Down Expand Up @@ -178,6 +180,20 @@
UnregisterSignal(parent_nest, COMSIG_PARENT_QDELETING)
parent_nest = null

/// SIGNAL_HANDLER for COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING
/datum/component/weed_food/proc/on_forsaken()
SIGNAL_HANDLER

UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING)

if(!merged)
return
if(!is_ground_level(parent_mob.z))
return

var/datum/hive_status/hive = GLOB.hive_datum[XENO_HIVE_FORSAKEN]
weed_appearance.color = hive.color

/**
* Try to start the process to turn into weeds
* Returns TRUE if started successfully
Expand Down

0 comments on commit 3ee8dea

Please sign in to comment.