Skip to content

Commit

Permalink
Eggs are now properly converted to forsaken on evac (#5340)
Browse files Browse the repository at this point in the history
# About the pull request
half of #4376 
eggs now become forsaken on hijack, like everything else. tested and it
works.


# Explain why it's good for the game

bugs should be fixed


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl: Private Tristan
fix: Eggs are properly converted to Forsaken hive on evac
/:cl:
  • Loading branch information
private-tristan authored Dec 31, 2023
1 parent 6e0235b commit 192e412
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
11 changes: 11 additions & 0 deletions code/modules/cm_aliens/structures/egg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,21 @@
if (hive)
hivenumber = hive

if(hivenumber == XENO_HIVE_NORMAL)
RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling))

set_hive_data(src, hivenumber)
update_icon()
addtimer(CALLBACK(src, PROC_REF(Grow)), rand(EGG_MIN_GROWTH_TIME, EGG_MAX_GROWTH_TIME))

/obj/effect/alien/egg/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/egg/Destroy()
. = ..()
for(var/obj/effect/egg_trigger/trigger as anything in egg_triggers)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
if(isobj(O))
I = O


wait_time = I.get_applying_acid_time()
if(wait_time == -1)
to_chat(src, SPAN_WARNING("We cannot dissolve \the [I]."))
Expand Down
11 changes: 11 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/egg_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
set_hive_data(src, hivenumber)
. = ..()

if(hivenumber == XENO_HIVE_NORMAL)
RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling))

/obj/item/xeno_egg/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/item/xeno_egg/get_examine_text(mob/user)
. = ..()
if(isxeno(user))
Expand Down

0 comments on commit 192e412

Please sign in to comment.