Skip to content

Commit

Permalink
Experimental Cloner Won't Spit out a Body if it has no Ghost (#1956)
Browse files Browse the repository at this point in the history
* Update exp_cloner.dm

* Hopefully fixes check

* Reduces code
  • Loading branch information
Uristthedorf authored May 31, 2024
1 parent 7b5e5c4 commit e445d43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions monkestation/code/game/machinery/cloning.dm
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@

if(!mob_occupant)
return

exp_clone_check(mob_occupant)

current_insurance = null
REMOVE_TRAIT(mob_occupant, TRAIT_STABLEHEART, CLONING_POD_TRAIT)
REMOVE_TRAIT(mob_occupant, TRAIT_STABLELIVER, CLONING_POD_TRAIT)
Expand Down Expand Up @@ -412,6 +415,9 @@
unattached_flesh.Cut()

occupant = null

/obj/machinery/clonepod/proc/exp_clone_check(mob_occupant)
return

/obj/machinery/clonepod/proc/malfunction()
var/mob/living/mob_occupant = occupant
Expand Down
3 changes: 3 additions & 0 deletions monkestation/code/game/machinery/exp_cloner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
attempting = FALSE
return CLONING_SUCCESS //so that we don't spam clones with autoprocess unless we leave a body in the scanner

/obj/machinery/clonepod/experimental/exp_clone_check(mob/living/carbon/human/mob_occupant)
if(!mob_occupant?.mind) //When experimental cloner fails to get a ghost, it won't spit out a body, so we don't get an army of brainless rejects.
qdel(mob_occupant)

/obj/machinery/clonepod/experimental/proc/get_clone_preview(datum/dna/clone_dna)
RETURN_TYPE(/image)
Expand Down

0 comments on commit e445d43

Please sign in to comment.