From 43e405c5f7a2e6396924588be0b63ff2fea21438 Mon Sep 17 00:00:00 2001 From: Uristthedorf <40842973+Uristthedorf@users.noreply.github.com> Date: Tue, 21 May 2024 21:27:48 -0700 Subject: [PATCH 1/3] Update exp_cloner.dm --- .../code/game/machinery/exp_cloner.dm | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/monkestation/code/game/machinery/exp_cloner.dm b/monkestation/code/game/machinery/exp_cloner.dm index 3c49c3caf090..b717df51947e 100644 --- a/monkestation/code/game/machinery/exp_cloner.dm +++ b/monkestation/code/game/machinery/exp_cloner.dm @@ -81,6 +81,53 @@ 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/go_out() + countdown.stop() + var/mob/living/mob_occupant = occupant + var/turf/T = get_turf(src) + + if(mess) //Clean that mess and dump those gibs! + for(var/obj/fl in unattached_flesh) + fl.forceMove(T) + unattached_flesh.Cut() + mess = FALSE + new /obj/effect/gibspawner/generic(get_turf(src), mob_occupant) + audible_message("You hear a splat.") + icon_state = "pod_0" + return + + 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) + + if(!mob_occupant) + return + current_insurance = null + REMOVE_TRAIT(mob_occupant, TRAIT_STABLEHEART, CLONING_POD_TRAIT) + REMOVE_TRAIT(mob_occupant, TRAIT_STABLELIVER, CLONING_POD_TRAIT) + REMOVE_TRAIT(mob_occupant, TRAIT_EMOTEMUTE, CLONING_POD_TRAIT) + REMOVE_TRAIT(mob_occupant, TRAIT_MUTE, CLONING_POD_TRAIT) + REMOVE_TRAIT(mob_occupant, TRAIT_NOCRITDAMAGE, CLONING_POD_TRAIT) + REMOVE_TRAIT(mob_occupant, TRAIT_NOBREATH, CLONING_POD_TRAIT) + + if(grab_ghost_when == CLONER_MATURE_CLONE) + mob_occupant.grab_ghost() + to_chat(occupant, "There is a bright flash!
You feel like a new being.
") + mob_occupant.flash_act() + + var/policy = get_policy(POLICY_REVIVAL_CLONER) || get_policy(POLICY_REVIVAL) + if(policy) + to_chat(occupant, policy) + + mob_occupant.adjustOrganLoss(ORGAN_SLOT_BRAIN, mob_occupant.getCloneLoss()) + + occupant.forceMove(T) + icon_state = "pod_0" + mob_occupant.domutcheck(1) //Waiting until they're out before possible monkeyizing. The 1 argument forces powers to manifest. + for(var/fl in unattached_flesh) + qdel(fl) + unattached_flesh.Cut() + + occupant = null /obj/machinery/clonepod/experimental/proc/get_clone_preview(datum/dna/clone_dna) RETURN_TYPE(/image) From 4ab90a4dd858f91b990b801a09ae92a4b5d84157 Mon Sep 17 00:00:00 2001 From: Uristthedorf <40842973+Uristthedorf@users.noreply.github.com> Date: Tue, 21 May 2024 23:44:13 -0700 Subject: [PATCH 2/3] Hopefully fixes check --- monkestation/code/game/machinery/exp_cloner.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkestation/code/game/machinery/exp_cloner.dm b/monkestation/code/game/machinery/exp_cloner.dm index b717df51947e..59e22aaadb1c 100644 --- a/monkestation/code/game/machinery/exp_cloner.dm +++ b/monkestation/code/game/machinery/exp_cloner.dm @@ -96,7 +96,7 @@ icon_state = "pod_0" return - 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. + 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) if(!mob_occupant) From d918feac466081d8f09b51d28c69a4c914bddc3d Mon Sep 17 00:00:00 2001 From: Uristthedorf <40842973+Uristthedorf@users.noreply.github.com> Date: Sun, 26 May 2024 15:30:16 -0700 Subject: [PATCH 3/3] Reduces code --- monkestation/code/game/machinery/cloning.dm | 6 +++ .../code/game/machinery/exp_cloner.dm | 46 +------------------ 2 files changed, 7 insertions(+), 45 deletions(-) diff --git a/monkestation/code/game/machinery/cloning.dm b/monkestation/code/game/machinery/cloning.dm index b1e36308e4a7..d194835204ed 100644 --- a/monkestation/code/game/machinery/cloning.dm +++ b/monkestation/code/game/machinery/cloning.dm @@ -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) @@ -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 diff --git a/monkestation/code/game/machinery/exp_cloner.dm b/monkestation/code/game/machinery/exp_cloner.dm index 59e22aaadb1c..f16bb07afbbc 100644 --- a/monkestation/code/game/machinery/exp_cloner.dm +++ b/monkestation/code/game/machinery/exp_cloner.dm @@ -81,54 +81,10 @@ 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/go_out() - countdown.stop() - var/mob/living/mob_occupant = occupant - var/turf/T = get_turf(src) - - if(mess) //Clean that mess and dump those gibs! - for(var/obj/fl in unattached_flesh) - fl.forceMove(T) - unattached_flesh.Cut() - mess = FALSE - new /obj/effect/gibspawner/generic(get_turf(src), mob_occupant) - audible_message("You hear a splat.") - icon_state = "pod_0" - return - +/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) - if(!mob_occupant) - return - current_insurance = null - REMOVE_TRAIT(mob_occupant, TRAIT_STABLEHEART, CLONING_POD_TRAIT) - REMOVE_TRAIT(mob_occupant, TRAIT_STABLELIVER, CLONING_POD_TRAIT) - REMOVE_TRAIT(mob_occupant, TRAIT_EMOTEMUTE, CLONING_POD_TRAIT) - REMOVE_TRAIT(mob_occupant, TRAIT_MUTE, CLONING_POD_TRAIT) - REMOVE_TRAIT(mob_occupant, TRAIT_NOCRITDAMAGE, CLONING_POD_TRAIT) - REMOVE_TRAIT(mob_occupant, TRAIT_NOBREATH, CLONING_POD_TRAIT) - - if(grab_ghost_when == CLONER_MATURE_CLONE) - mob_occupant.grab_ghost() - to_chat(occupant, "There is a bright flash!
You feel like a new being.
") - mob_occupant.flash_act() - - var/policy = get_policy(POLICY_REVIVAL_CLONER) || get_policy(POLICY_REVIVAL) - if(policy) - to_chat(occupant, policy) - - mob_occupant.adjustOrganLoss(ORGAN_SLOT_BRAIN, mob_occupant.getCloneLoss()) - - occupant.forceMove(T) - icon_state = "pod_0" - mob_occupant.domutcheck(1) //Waiting until they're out before possible monkeyizing. The 1 argument forces powers to manifest. - for(var/fl in unattached_flesh) - qdel(fl) - unattached_flesh.Cut() - - occupant = null - /obj/machinery/clonepod/experimental/proc/get_clone_preview(datum/dna/clone_dna) RETURN_TYPE(/image) if(!istype(clone_dna) || QDELING(clone_dna))