Skip to content

Commit

Permalink
Fix alien egg not being able to can (ParadiseSS13#27537)
Browse files Browse the repository at this point in the history
* Force body eggs to call parent `on_life()`

* Force body eggs to call parent `dead_process()`

* Call parent
  • Loading branch information
m-dzianishchyts authored Dec 8, 2024
1 parent aa140c1 commit 3336bfd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
return S

/obj/item/organ/internal/body_egg/alien_embryo/on_life()
..()
switch(stage)
if(2)
if(prob(2))
Expand Down
4 changes: 4 additions & 0 deletions code/modules/surgery/organs/body_egg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@
. = ..()

/obj/item/organ/internal/body_egg/on_life()
SHOULD_CALL_PARENT(TRUE)
..()
if(!(src in owner.internal_organs)) // I can only presume this is here for a reason, so not touching it.
remove(owner)
return
egg_process()

/obj/item/organ/internal/body_egg/dead_process()
SHOULD_CALL_PARENT(TRUE)
..()
if(!(src in owner.internal_organs)) // I can only presume this is here for a reason, so not touching it.
remove(owner)
return
Expand Down
2 changes: 2 additions & 0 deletions code/modules/surgery/organs/parasites.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
var/stage = 1

/obj/item/organ/internal/body_egg/spider_eggs/on_life()
..()
if(stage < 5 && prob(3))
stage++

Expand Down Expand Up @@ -55,6 +56,7 @@
// Safety first.
if(!owner)
return
..()

// Parasite growth
cycle_num += 1
Expand Down

0 comments on commit 3336bfd

Please sign in to comment.