Skip to content

Commit

Permalink
eggs effect works
Browse files Browse the repository at this point in the history
  • Loading branch information
private-tristan committed Dec 29, 2023
1 parent 33af189 commit c817416
Showing 1 changed file with 11 additions and 0 deletions.
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

0 comments on commit c817416

Please sign in to comment.