From 735a85abe8fc5a38f3ea90621006b8dae5598bbc Mon Sep 17 00:00:00 2001 From: uporotiy Date: Fri, 2 Sep 2011 06:01:18 +0000 Subject: [PATCH] Changeling cloning works properly now. Changeling IDs are shown at the end of a round along with their names. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2087 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/gamemodes/changeling/changeling.dm | 3 ++- code/game/machinery/cloning.dm | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index cb4c1784ec..459a56ad91 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -197,7 +197,8 @@ else changeling_name = "[changeling.key] (character destroyed)" - world << "The changeling was [changeling_name]" + world << "The changeling was [changeling_name]." + if(changeling.current) world << "[changeling.current.gender=="male"?"His":"Her"] changeling ID was [changeling.current.gender=="male"?"Mr.":"Mrs."] [changeling.current.changeling.changelingID]." world << "Genomes absorbed: [totalabsorbed]" var/count = 1 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 3863a50b65..1e20435d04 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -282,7 +282,7 @@ //Can't clone without someone to clone. Or a pod. Or if the pod is busy. Or full of gibs. if ((!selected) || (!src.pod1) || (src.pod1.occupant) || (src.pod1.mess)) src.temp = "Unable to initiate cloning cycle." // most helpful error message in THE HISTORY OF THE WORLD - else if (src.pod1.growclone(selected, C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"])) + else if (src.pod1.growclone(selected, C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"],C.fields["changeling"])) src.temp = "Cloning cycle activated." src.records.Remove(C) del(C) @@ -321,6 +321,7 @@ R.fields["id"] = copytext(md5(subject.real_name), 2, 6) R.fields["UI"] = subject.dna.uni_identity R.fields["SE"] = subject.dna.struc_enzymes + R.fields["changeling"] = subject.changeling // Preferences stuff R.fields["interface"] = subject.UI @@ -431,7 +432,7 @@ //Clonepod //Start growing a human clone in the pod! -/obj/machinery/clonepod/proc/growclone(mob/ghost as mob, var/clonename, var/ui, var/se, var/mindref, var/mrace, var/UI) +/obj/machinery/clonepod/proc/growclone(mob/ghost as mob, var/clonename, var/ui, var/se, var/mindref, var/mrace, var/UI, var/datum/changeling/changelingClone) if (((!ghost) || (!ghost.client)) || src.mess || src.attempting) return 0 @@ -492,9 +493,10 @@ if (src.occupant.mind in ticker.mode:cult) ticker.mode:add_cultist(src.occupant.mind) ticker.mode:update_all_cult_icons() //So the icon actually appears - if ("changeling") - if (src.occupant.mind in ticker.mode:changelings) - src.occupant.make_changeling() + + if (changelingClone) + occupant.changeling = changelingClone + src.occupant.make_changeling() // -- End mode specific stuff