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
This commit is contained in:
elly1989@rocketmail.com
2012-08-09 12:40:17 +00:00
parent c02457e70d
commit df75514318
18 changed files with 19 additions and 32 deletions

View File

@@ -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 = "<B>[current.real_name]</B><br>"
var/out = "<B>[name]</B>[(curent&&(current.real_name!=name))?" (as [current.real_name])":""]<br>"
out += "Assigned role: [assigned_role]. <a href='?src=\ref[src];role_edit=1'>Edit</a><br>"
out += "Factions and special roles:<br>"
@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -1206,7 +1206,7 @@ var/global/BSACooldown = 0
// world <<"Displaying info about the mob..."
src.owner << "<b>Info about [M.name]:</b> "
src.owner << "Mob type = [M.type]; Damage = [health_description]"
src.owner << "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Original_name = [M.original_name]; Key = <b>[M.key]</b>;"
src.owner << "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;"
src.owner << "Location = [location_description];"
src.owner << "[special_role_description]"
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?src=\ref[src];adminplayervars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];adminplayersubtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservejump=\ref[M]'>JMP</A>) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"

View File

@@ -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) )

View File

@@ -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

View File

@@ -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)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -35,17 +35,14 @@
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

View File

@@ -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

View File

@@ -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 = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[message]</span></span>"