From 0a9dc33ce1071d068882aa9d21c5bd200ae48417 Mon Sep 17 00:00:00 2001 From: Artur Date: Wed, 8 Jul 2020 23:42:47 +0300 Subject: [PATCH] Reverts cloning changes --- code/game/machinery/cloning.dm | 74 +++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index c78281da5e..3391458817 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -26,6 +26,7 @@ var/efficiency var/datum/mind/clonemind + var/get_clone_mind = CLONEPOD_GET_MIND var/grab_ghost_when = CLONER_MATURE_CLONE var/internal_radio = TRUE @@ -108,44 +109,45 @@ /obj/machinery/clonepod/attack_ai(mob/user) return examine(user) -//Start growing a human clone in the pod! -/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, mutation_index, mindref, datum/species/mrace, list/features, factions, list/quirks, datum/bank_account/insurance, list/traumas) +//Start growing a clone in the pod! +/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, mutation_index, mindref, blood_type, datum/species/mrace, list/features, factions, list/quirks, datum/bank_account/insurance, list/traumas) if(panel_open) return FALSE if(mess || attempting) return FALSE - clonemind = locate(mindref) in SSticker.minds - if(!istype(clonemind)) //not a mind - return FALSE - if(!QDELETED(clonemind.current)) - if(clonemind.current.stat != DEAD) //mind is associated with a non-dead body + if(get_clone_mind == CLONEPOD_GET_MIND) + clonemind = locate(mindref) in SSticker.minds + if(!istype(clonemind)) //not a mind return FALSE - if(clonemind.current.suiciding) // Mind is associated with a body that is suiciding. + if(!QDELETED(clonemind.current)) + if(clonemind.current.stat != DEAD) //mind is associated with a non-dead body + return FALSE + if(clonemind.current.suiciding) // Mind is associated with a body that is suiciding. + return FALSE + if(AmBloodsucker(clonemind.current)) //If the mind is a bloodsucker + return FALSE + if(clonemind.active) //somebody is using that mind + if( ckey(clonemind.key)!=ckey ) + return FALSE + else + // get_ghost() will fail if they're unable to reenter their body + var/mob/dead/observer/G = clonemind.get_ghost() + if(!G) + return FALSE + if(G.suiciding) // The ghost came from a body that is suiciding. + return FALSE + if(clonemind.damnation_type) //Can't clone the damned. + INVOKE_ASYNC(src, .proc/horrifyingsound) + mess = TRUE + update_icon() return FALSE - if(AmBloodsucker(clonemind.current)) //If the mind is a bloodsucker - return FALSE - if(clonemind.active) //somebody is using that mind - if( ckey(clonemind.key)!=ckey ) - return FALSE - else - // get_ghost() will fail if they're unable to reenter their body - var/mob/dead/observer/G = clonemind.get_ghost() - if(!G) - return FALSE - if(G.suiciding) // The ghost came from a body that is suiciding. - return FALSE - if(clonemind.damnation_type) //Can't clone the damned. - INVOKE_ASYNC(src, .proc/horrifyingsound) - mess = TRUE - update_icon() - return FALSE current_insurance = insurance attempting = TRUE //One at a time!! countdown.start() var/mob/living/carbon/human/H = new /mob/living/carbon/human(src) - H.hardset_dna(ui, mutation_index, H.real_name, null, mrace, features) + H.hardset_dna(ui, mutation_index, H.real_name, blood_type, mrace, features) H.easy_randmut(NEGATIVE+MINOR_NEGATIVE) //100% bad mutation. Can be cured with mutadone. @@ -167,7 +169,14 @@ ADD_TRAIT(H, TRAIT_NOCRITDAMAGE, CLONING_POD_TRAIT) H.Unconscious(80) - clonemind.transfer_to(H) + if(clonemind) + clonemind.transfer_to(H) + + else if(get_clone_mind == CLONEPOD_POLL_MIND) + var/list/candidates = pollCandidatesForMob("Do you want to play as [clonename]'s defective clone? (Don't ERP without permission from the original)", null, null, null, 100, H, POLL_IGNORE_CLONE) + if(LAZYLEN(candidates)) + var/mob/C = pick(candidates) + H.key = C.key if(grab_ghost_when == CLONER_FRESH_CLONE) H.grab_ghost() @@ -524,6 +533,17 @@ . += "cover-on" . += "panel" +//Experimental cloner; clones a body regardless of the owner's status, letting a ghost control it instead +/obj/machinery/clonepod/experimental + name = "experimental cloning pod" + desc = "An ancient cloning pod. It seems to be an early prototype of the experimental cloners used in Nanotrasen Stations." + icon = 'icons/obj/machines/cloning.dmi' + icon_state = "pod_0" + req_access = null + circuit = /obj/item/circuitboard/machine/clonepod/experimental + internal_radio = FALSE + get_clone_mind = CLONEPOD_POLL_MIND + /* * Manual -- A big ol' manual. */