From df75514318c1e9192b08f5a14a2ed85403fedcf7 Mon Sep 17 00:00:00 2001 From: "elly1989@rocketmail.com" Date: Thu, 9 Aug 2012 12:40:17 +0000 Subject: [PATCH] Preparations for minds - Part3. Replaced mob/var/original_name with datum/mind/var/name. Halved the speak-chances of every simple-animal because that constant squeaking was insufferable. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4346 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/mind.dm | 8 ++++---- code/defines/obj.dm | 1 - code/defines/procs/helpers.dm | 4 ++-- code/game/gamemodes/wizard/soulstone.dm | 1 - code/game/machinery/cloning.dm | 1 - code/game/machinery/hydroponics.dm | 1 - code/modules/admin/admin.dm | 2 +- code/modules/admin/verbs/adminhelp.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 1 - code/modules/mob/dead/observer/observer.dm | 5 ++--- code/modules/mob/living/simple_animal/behemoth.dm | 1 - code/modules/mob/living/simple_animal/constructs.dm | 3 --- code/modules/mob/living/simple_animal/life.dm | 2 +- code/modules/mob/living/simple_animal/shade.dm | 1 - code/modules/mob/mob_defines.dm | 2 +- code/modules/mob/mob_transformation_simple.dm | 5 +---- code/modules/mob/new_player/preferences.dm | 1 - code/modules/mob/say.dm | 10 ++++++---- 18 files changed, 19 insertions(+), 32 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 821514d7402..aa800de4e47 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -31,7 +31,7 @@ datum/mind var/key - var/name //TODO: this will replace mob.original_name + var/name //replaces mob/var/original_name var/mob/living/current var/mob/living/original var/active = 0 @@ -91,7 +91,7 @@ datum/mind alert("Not before round-start!", "Alert") return - var/out = "[current.real_name]
" + var/out = "[name][(curent&&(current.real_name!=name))?" (as [current.real_name])":""]
" out += "Assigned role: [assigned_role]. Edit
" out += "Factions and special roles:
" @@ -1100,8 +1100,8 @@ datum/mind if(ticker) ticker.minds += mind else - world.log << "## No ticker ready yet! Please inform Carn" - mind.name = real_name + world.log << "## DEBUG: mind_initialize(): No ticker ready yet! Please inform Carn" + if(!mind.name) mind.name = real_name mind.current = src //HUMAN diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 45f7c304dfc..a940ae262b3 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -1057,7 +1057,6 @@ brainmob = new(src) brainmob.name = H.real_name brainmob.real_name = H.real_name - brainmob.original_name = H.original_name brainmob.dna = H.dna brainmob.timeofhostdeath = H.timeofdeath if(H.mind) diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index 7331481a96e..16360649ec9 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -278,7 +278,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return M.real_name = newname M.name = newname - M.original_name = newname + M.mind.name = newname //Handles givving the Clown his/her name /proc/clname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea @@ -309,7 +309,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return clname(M) M.real_name = newname M.name = newname - M.original_name = newname + M.mind.name = newname for (var/obj/item/device/pda/pda in M.contents) if (pda.owner == oldname) diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 9288a01a8ba..d9a4ff69845 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -128,7 +128,6 @@ S.canmove = 0//Can't move out of the soul stone S.name = "Shade of [T.real_name]" S.real_name = "Shade of [T.real_name]" - S.original_name = "Shade of [T.real_name]" if (T.client) T.client.mob = S S.cancel_camera() diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 209dba79f37..54e4cad896c 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -149,7 +149,6 @@ if(!clonename) //to prevent null names clonename = "clone ([rand(0,999)])" H.real_name = clonename - H.original_name = clonename //we don't want random ghost names should we die again. src.icon_state = "pod_1" //Get the clone body ready diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm index 11b3c2ee12f..55f6529fa02 100644 --- a/code/game/machinery/hydroponics.dm +++ b/code/game/machinery/hydroponics.dm @@ -889,7 +889,6 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob) podman.real_name = realName else podman.real_name = "Pod Person [rand(0,999)]" - podman.original_name = podman.real_name mind.transfer_to(podman) // -- Mode/mind specific stuff goes here. TODO! Broken :( Should be merged into mob/living/Login diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index e06f8bac38d..60525cdfa71 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1206,7 +1206,7 @@ var/global/BSACooldown = 0 // world <<"Displaying info about the mob..." src.owner << "Info about [M.name]: " src.owner << "Mob type = [M.type]; Damage = [health_description]" - src.owner << "Name = [M.name]; Real_name = [M.real_name]; Original_name = [M.original_name]; Key = [M.key];" + src.owner << "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];" src.owner << "Location = [location_description];" src.owner << "[special_role_description]" src.owner << "(PM) (PP) (VV) (SM) (JMP) (CA)" diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 08dcd4b01c8..79c430f20bd 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -64,7 +64,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali ai_found = 1 continue for(var/mob/M in mobs) - var/list/namelist = dd_text2list("[M.name] [M.real_name] [M.original_name] [M.ckey] [M.key]", " ") + var/list/namelist = dd_text2list("[M.name] [M.real_name] [(M.mind)?"[M.mind.name]":""] [M.ckey] [M.key]", " ") var/word_is_match = 0 //Used to break from this mob for loop if a match is found for(var/namepart in namelist) if( lowertext(word) == lowertext(namepart) ) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 7aceac04219..5ae3a636521 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -361,7 +361,6 @@ Traitors and the like can also be revived with the previous role mostly intact. else new_character.real_name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) new_character.name = new_character.real_name - new_character.original_name = new_character.real_name if(G_found.mind && !G_found.mind.active) G_found.mind.transfer_to(new_character) //be careful when doing stuff like this! I've already checked the mind isn't in use diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index b455b48e0ba..cc3078c8cd6 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -15,8 +15,8 @@ attack_log = body.attack_log //preserve our attack logs by copying them to our ghost gender = body.gender - if(body.original_name) - name = body.original_name + if(body.mind && body.mind.name) + name = body.mind.name else if(body.real_name) name = body.real_name @@ -34,7 +34,6 @@ if(!name) //To prevent nameless ghosts name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) real_name = name - original_name = name return /mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) diff --git a/code/modules/mob/living/simple_animal/behemoth.dm b/code/modules/mob/living/simple_animal/behemoth.dm index 3dc76b7b166..7a44ab20fdd 100644 --- a/code/modules/mob/living/simple_animal/behemoth.dm +++ b/code/modules/mob/living/simple_animal/behemoth.dm @@ -1,7 +1,6 @@ /mob/living/simple_animal/constructbehemoth name = "Behemoth" real_name = "Behemoth" - original_name = "Behemoth" desc = "The pinnacle of occult technology, Behemoths are the ultimate weapon in the Cult of Nar-Sie's arsenal." icon = 'icons/mob/mob.dmi' icon_state = "behemoth" diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index ad832a28d31..f0d9a52dcab 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -4,7 +4,6 @@ /mob/living/simple_animal/constructarmoured name = "Juggernaut" real_name = "Juggernaut" - original_name = "Juggernaut" desc = "A possessed suit of armour driven by the will of the restless dead" icon = 'icons/mob/mob.dmi' icon_state = "behemoth" @@ -142,7 +141,6 @@ /mob/living/simple_animal/constructwraith name = "Wraith" real_name = "Wraith" - original_name = "Wraith" desc = "A wicked bladed shell contraption piloted by a bound spirit" icon = 'icons/mob/mob.dmi' icon_state = "floating" @@ -268,7 +266,6 @@ /mob/living/simple_animal/constructbuilder name = "Artificer" real_name = "Artificer" - original_name = "Artificer" desc = "A bulbous construct dedicated to building and maintaining The Cult of Nar-Sie's armies" icon = 'icons/mob/mob.dmi' icon_state = "artificer" diff --git a/code/modules/mob/living/simple_animal/life.dm b/code/modules/mob/living/simple_animal/life.dm index 6a02b9e0031..2cf1c861292 100644 --- a/code/modules/mob/living/simple_animal/life.dm +++ b/code/modules/mob/living/simple_animal/life.dm @@ -131,7 +131,7 @@ //Speaking if(speak_chance) - if(prob(speak_chance)) + if(rand(0,200) < speak_chance) if(speak && speak.len) if((emote_hear && emote_hear.len) || (emote_see && emote_see.len)) var/length = speak.len diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm index a2d7bfb9c0f..6ec96400568 100644 --- a/code/modules/mob/living/simple_animal/shade.dm +++ b/code/modules/mob/living/simple_animal/shade.dm @@ -1,7 +1,6 @@ /mob/living/simple_animal/shade name = "Shade" real_name = "Shade" - original_name = "Shade" desc = "A bound spirit" icon = 'icons/mob/mob.dmi' icon_state = "shade" diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 391d985969c..8280df8bf26 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -66,7 +66,7 @@ var/ear_damage = null //Carbon var/stuttering = null //Carbon var/real_name = null - var/original_name = null //Original name is only used in ghost chat! It is not to be edited by anything! +// var/original_name = null //Original name is only used in ghost chat! Depracated, now used bb var/blinded = null var/bhunger = 0 //Carbon var/ajourn = 0 diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index 0e9b0c6a08c..f854e92791f 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -30,22 +30,19 @@ if(!M || !ismob(M)) usr << "Type path is not a mob (new_type = [new_type]) in change_mob_type(). Contact a coder." - del(M) + del(M) return if( istext(new_name) ) M.name = new_name - M.original_name = new_name M.real_name = new_name else M.name = src.name - M.original_name = src.original_name M.real_name = src.real_name M.dna = src.dna M.UI = src.UI - if(mind) mind.transfer_to(M) else diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index f7eab2917a2..3b6b98d767b 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -713,7 +713,6 @@ datum/preferences real_name += "[pick(last_names)]" character.real_name = real_name - character.original_name = real_name //Original name is only used in ghost chat! It is not to be edited by anything! character.gender = gender diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 8652806f473..1a0c033ece8 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -26,10 +26,12 @@ var/name = src.real_name var/alt_name = "" - if(original_name) //Original name is only used in ghost chat! It is not to be edited by anything! - name = src.original_name - if( original_name != real_name ) - alt_name = " (died as [src.real_name])" + if(mind && mind.name) + name = "[mind.name]" + else + name = real_name + if(name != real_name) + alt_name = " (died as [real_name])" message = src.say_quote(message) var/rendered = "DEAD: [name][alt_name] [message]"