From 37ca6b2c40ca417176813acb622f799294026784 Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Sat, 5 Feb 2011 04:35:12 +0000 Subject: [PATCH] Mostly a behind-the-scenes change, stuffing someone's brain into a cyborg body now causes the mind datum to transfer over to the new body. This should prevent such shenanigans as cloning a borged guy to suck the player back to the fleshy side of life. Given that the mind datum is where traitors store their objectives (and how assassination targets are tracked), I have gone to some effort to ensure that, much like people currently in the thunderdome, people that are borgs still get counted as being dead. Also, borgs cannot succeed at hijack/escape objectives. If you find this to not be the case, PLEASE REPORT IT. Borging a changeling now ends the round, much like cremating/gibbing them does. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@962 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/mind.dm | 1 + code/game/gamemodes/changeling/changeling.dm | 3 +++ code/game/gamemodes/game_mode.dm | 7 ++++++- code/game/gamemodes/objective.dm | 9 ++++++++- code/game/objects/items/robot_parts.dm | 6 +++--- code/modules/mob/new_player/new_player.dm | 1 + code/modules/mob/transform_procs.dm | 1 + 7 files changed, 23 insertions(+), 5 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 7641d76cd2c..2bf5292aa28 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1,6 +1,7 @@ datum/mind var/key var/mob/current + var/mob/original var/memory diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index e1166784171..1415c2b2a8a 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -186,6 +186,9 @@ if(!changeling.current) return 1 + if(istype(changeling.current,/mob/living/silicon)) + return 1 + if(changeling.current.stat==2) if(changelingdeathticker>=600) return 1 diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 7db3bcb4c6e..fe2792f9fb4 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -27,7 +27,12 @@ var/traitor_name if(traitor.current) - traitor_name = "[traitor.current.real_name] (played by [traitor.key])" + if(traitor.current == traitor.original) + traitor_name = "[traitor.current.real_name] (played by [traitor.key])" + else if (traitor.original) + traitor_name = "[traitor.current.real_name] (originally [traitor.original.real_name]) (played by [traitor.key])" + else + traitor_name = "[traitor.current.real_name] (original character destroyed) (played by [traitor.key])" else traitor_name = "[traitor.key] (character destroyed)" diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index f6ecc96657b..b777c8dfbde 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -48,6 +48,7 @@ datum if(target && target.current) if(target.current.stat == 2 || istype(target.current.loc.loc, /area/tdome)) //Assuming this works, people in the thunderdome now count as dead for traitor objectives. --NeoFite return 1 + else if (istype(target.current,/mob/living/silicon)) //Since I'm planning on making mind datums transfer over when people get borged, make borgs/AIs still count as a successful kill. --NeoFite else return 0 else @@ -57,6 +58,8 @@ datum explanation_text = "Hijack the emergency shuttle by escaping alone." check_completion() + if(istype(owner.current, /mob/living/silicon)) + return 0 if(emergency_shuttle.location<2) return 0 @@ -77,6 +80,8 @@ datum explanation_text = "Escape on the shuttle alive." check_completion() + if(istype(owner.current, /mob/living/silicon)) + return 0 if(emergency_shuttle.location<2) return 0 @@ -98,6 +103,8 @@ datum explanation_text = "Stay alive until the end" check_completion() + if(istype(owner.current, /mob/living/silicon) && owner.current != owner.original) + return 0 if(!owner.current || owner.current.stat == 2) return 0 @@ -124,7 +131,7 @@ datum var/global/list/possible_items_special = list( "nuclear authentication disk" = /obj/item/weapon/disk/nuclear, ) - + proc/set_target(var/target_name as text) src.target_name = target_name src.steal_target = possible_items[target_name] diff --git a/code/game/objects/items/robot_parts.dm b/code/game/objects/items/robot_parts.dm index 9aed4fc2160..78a01fdf69f 100644 --- a/code/game/objects/items/robot_parts.dm +++ b/code/game/objects/items/robot_parts.dm @@ -143,14 +143,14 @@ O.real_name = src.created_name if (src.brain.owner.client) - O.lastKnownIP = src.brain.owner.client.address - src.brain.owner.client.mob = O + src.brain.owner.mind.transfer_to(O) else for(var/mob/dead/observer/G in world) if(G.corpse == src.brain.owner && G.client) - G.client.mob = O + G.corpse.mind.transfer_to(O) del(G) break + if(O.mind.special_role) O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite") O.loc = src.loc O << "You are playing a Robot. The Robot can interact with most electronic objects in its view point." diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 7309c2d1b72..70a32578902 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -413,6 +413,7 @@ mob/new_player new_character.dna.ready_dna(new_character) if(mind) mind.transfer_to(new_character) + mind.original = new_character return new_character diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 29ae55b9274..489b6c6c39a 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -83,6 +83,7 @@ O.lastKnownIP = src.client.address mind.transfer_to(O) + O.mind.original = O var/obj/loc_landmark for(var/obj/landmark/start/sloc in world)