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

Fix spicy weed_food fires #5488

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 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(parent_mob, COMSIG_LIVING_PREIGNITION, PROC_REF(on_preignition))
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 @@ -101,6 +102,7 @@
COMSIG_LIVING_REJUVENATED,
COMSIG_HUMAN_REVIVED,
COMSIG_HUMAN_SET_UNDEFIBBABLE,
COMSIG_LIVING_PREIGNITION,
))
if(absorbing_weeds)
UnregisterSignal(absorbing_weeds, COMSIG_PARENT_QDELETING)
Expand Down Expand Up @@ -194,6 +196,13 @@
var/datum/hive_status/hive = GLOB.hive_datum[XENO_HIVE_FORSAKEN]
weed_appearance.color = hive.color

/// SIGNAL_HANDLER for COMSIG_LIVING_PREIGNITION of weeds
/datum/component/weed_food/proc/on_preignition()
SIGNAL_HANDLER

if(merged)
return COMPONENT_CANCEL_IGNITION

/**
* Try to start the process to turn into weeds
* Returns TRUE if started successfully
Expand Down Expand Up @@ -304,6 +313,7 @@
if(!parent_nest)
parent_mob.plane = FLOOR_PLANE
parent_mob.remove_from_all_mob_huds()
parent_mob.ExtinguishMob()

if(!weed_appearance) // Make a new sprite if we aren't re-merging
var/is_flipped = parent_mob.transform.b == -1 // Technically we should check if d is 1 too, but corpses can only be rotated 90 or 270 (1/-1 or -1/1)
Expand Down
Loading