From eefa612e7578b3f3ed736759c6ea4f173d990dd6 Mon Sep 17 00:00:00 2001 From: "bizarre.babel@gmail.com" Date: Mon, 28 Feb 2011 06:42:33 +0000 Subject: [PATCH] An attempt to allow clowns to change their name upon spawning in the way wizards or AIs do. The proc is currently not called when the clown spawns. Here's hoping someone fixes it or I spontaneously come up with a solution in the morning. Here it is to be monkeyed with. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1143 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/procs/helpers.dm | 26 ++++++++++++++++++++++++++ code/game/jobs/jobprocs.dm | 3 +++ code/names.dm | 1 + config/names/clown.txt | 31 +++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 config/names/clown.txt diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index ef46b91e4e8..804cdbb9cb8 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -533,6 +533,32 @@ M.real_name = newname M.name = newname +/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 + var/randomname = pick(clown_names) + var/newname = input(M,"You are the clown. Would you like to change your name to something else?", "Name change",randomname) + + if (length(newname) == 0) + newname = randomname + + if (newname) + if (newname == "Unknown") + M << "That name is reserved." + return clname(M) + for (var/mob/living/carbon/A in world) + if (A.real_name == newname) + M << "There's already a clown with that name." + return clname(M) + if (length(newname) >= 26) + newname = copytext(newname, 1, 26) + newname = dd_replacetext(newname, ">", "'") + M.real_name = newname + M.name = newname +// if (istype(src.belt, /obj/item/device/pda)) +// var/obj/item/device/pda/pda = src.belt +// pda.owner = src.real_name +// pda.ownjob = src.wear_id.assignment + // pda.name = "PDA-[src.real_name] ([pda.ownjob])" + /proc/ionnum() return "[pick("!","@","#","$","%","^","&","*")][pick(pick("!","@","#","$","%","^","&","*"))][pick(pick("!","@","#","$","%","^","&","*"))][pick(pick("!","@","#","$","%","^","&","*"))]" diff --git a/code/game/jobs/jobprocs.dm b/code/game/jobs/jobprocs.dm index f5dcba711ce..cc641af2d65 100644 --- a/code/game/jobs/jobprocs.dm +++ b/code/game/jobs/jobprocs.dm @@ -654,6 +654,9 @@ src.loc = pick(NL) return + if (rank == "Clown") + clname(src) + /mob/living/carbon/human/proc/spawnId(rank) var/obj/item/weapon/card/id/C = null switch(rank) diff --git a/code/names.dm b/code/names.dm index 5a92178a626..ad84da51b2c 100644 --- a/code/names.dm +++ b/code/names.dm @@ -6,5 +6,6 @@ var/list/first_names_male = dd_file2list("config/names/first_male.txt") var/list/first_names_female = dd_file2list("config/names/first_female.txt") var/list/last_names = dd_file2list("config/names/last.txt") var/list/loggedsay = dd_file2list("config/names/loggedsay.txt") +var/list/clown_names = dd_file2list("config/names/clown.txt") //loaded on startup because of " //would include in rsc if ' was used \ No newline at end of file diff --git a/config/names/clown.txt b/config/names/clown.txt new file mode 100644 index 00000000000..12d35f273c4 --- /dev/null +++ b/config/names/clown.txt @@ -0,0 +1,31 @@ +Gigglesworth +Honkel the III +Goose McSunny +Mr. Shoe +Toodles Sharperton +Dinky Doodle +Honkerbelle +Bo Bo Sassy +Baby Cakes +Ladybug Honks +Ziggy Yoyo +Razzle Dazzle +Buster Frown +Pepinpop +Silly Willy +Jo Jo Bobo Bo +Pocket +Patches +Checkers +Freckle +Honker +Bonker +Skiddle +Scootaloo +Sprinkledinkle +Ronnie Pace +Miss Stockings +Slippy Joe +Redshirt McBeat +Flop O'Honker +Gamzee \ No newline at end of file