diff --git a/code/defines/mob/mob.dm b/code/defines/mob/mob.dm index 84e87f4c046..a2220baa62c 100644 --- a/code/defines/mob/mob.dm +++ b/code/defines/mob/mob.dm @@ -81,6 +81,7 @@ var/ear_damage = null//Carbon var/stuttering = null//Carbon var/real_name = null + var/flavor_text = "" var/blinded = null var/bhunger = 0//Carbon var/ajourn = 0 diff --git a/code/game/dna.dm b/code/game/dna.dm index 92c84920666..c301b44033d 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -254,6 +254,8 @@ H.update_face() H.update_body() + H.warn_flavor_changed() + return 1 else return 0 @@ -399,6 +401,8 @@ for (var/obj/item/weapon/implant/I in implants) I.loc = O I.implanted = O + O.flavor_text = M.flavor_text + O.warn_flavor_changed() del(M) return @@ -473,6 +477,8 @@ for (var/obj/item/weapon/implant/I in implants) I.loc = O I.implanted = O + O.flavor_text = M.flavor_text + O.warn_flavor_changed() del(M) return //////////////////////////////////////////////////////////// Monkey Block diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 548b6aecfe4..c81652a2e93 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -130,6 +130,7 @@ T.death(0) T.real_name = "Unknown" + M.warn_flavor_changed() T.mutations |= HUSK T.update_body() diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index 82df78f9be5..49b3873af62 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -665,6 +665,7 @@ datum M:emote("scream") M << "\red Your face has become disfigured!" M.real_name = "Unknown" + M.warn_flavor_changed() else M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl else @@ -711,6 +712,7 @@ datum M:emote("scream") M << "\red Your face has become disfigured!" M.real_name = "Unknown" + M.warn_flavor_changed() else if(istype(M, /mob/living/carbon/monkey) && M:wear_mask) del (M:wear_mask) @@ -726,6 +728,7 @@ datum M:emote("scream") M << "\red Your face has become disfigured!" M.real_name = "Unknown" + M.warn_flavor_changed() else M.take_organ_damage(min(15, volume * 4)) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 0743dccdd95..0501f148595 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -148,6 +148,7 @@ if (!src.client) usr << "\red [src.name] doesn't seem as though they want to talk." + print_flavor_text() usr << "\blue *---------*" diff --git a/code/modules/mob/living/carbon/metroid/examine.dm b/code/modules/mob/living/carbon/metroid/examine.dm index 063caa27dd7..28f2026b034 100644 --- a/code/modules/mob/living/carbon/metroid/examine.dm +++ b/code/modules/mob/living/carbon/metroid/examine.dm @@ -26,4 +26,6 @@ if(10) usr << text("\blue [] seems to have extreme electrical activity inside it!", src.name) + print_flavor_text() + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/examine.dm b/code/modules/mob/living/carbon/monkey/examine.dm index 012680351a3..edf60c8ed5b 100644 --- a/code/modules/mob/living/carbon/monkey/examine.dm +++ b/code/modules/mob/living/carbon/monkey/examine.dm @@ -28,4 +28,7 @@ usr << text("\red [] looks severely burnt!", src.name) if (src.stat == 1) usr << text("\red [] doesn't seem to be responding to anything around them, their eyes closed as though asleep.", src.name) + + print_flavor_text() + return \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7e4b3ec9c9d..96a05303d8f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -150,4 +150,10 @@ return /mob/living/proc/UpdateDamageIcon() - return \ No newline at end of file + return + +/mob/living/verb/change_flavor_text() + set name = "Change Flavor Text" + set category = "OOC" + + src.update_flavor_text() diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm index fdcf15dec61..1f9498a4bb0 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -18,4 +18,7 @@ usr << text("\red [] looks severely burnt!", src.name) if (src.stat == 1) usr << text("\red [] doesn't seem to be responding.", src.name) + + print_flavor_text() + return \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/examine.dm b/code/modules/mob/living/silicon/pai/examine.dm index 621448c3579..66aecc6c66c 100644 --- a/code/modules/mob/living/silicon/pai/examine.dm +++ b/code/modules/mob/living/silicon/pai/examine.dm @@ -18,4 +18,7 @@ usr << text("\red []'s casing is melted and heat-warped!", src.name) if (src.stat == 1) usr << text("\red [] doesn't seem to be responding.", src.name) + + print_flavor_text() + return \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index c6d04d7f1d8..d1b54407d08 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -21,4 +21,7 @@ usr << "The cover is open and the power cell is [ cell ? "installed" : "missing"]." else usr << "The cover is closed." + + print_flavor_text() + return \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index caaec2d1bd1..c41cb0351fe 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -380,6 +380,29 @@ if (popup) memory() +/mob/proc/update_flavor_text() + var/msg = input(usr,"Set the flavor text in your 'examine' verb. Don't metagame!","Flavor Text",html_decode(flavor_text)) as message|null + + if(msg != null) + msg = copytext(msg, 1, MAX_MESSAGE_LEN) + msg = html_encode(msg) + + src.flavor_text = msg + +/mob/proc/warn_flavor_changed() + if(src.flavor_text && src.flavor_text != "") // don't spam people that don't use it! + src << "

OOC Warning:

" + src << "Your flavor text is likely out of date! Change" + +/mob/proc/print_flavor_text() + if (flavor_text && flavor_text != "") + var/msg = dd_replacetext(flavor_text, "\n", " ") + if(lentext(msg) <= 40) + usr << "\blue [msg]" + else + usr << "\blue [copytext(msg, 1, 37)]... More..." + + /* /mob/verb/help() set name = "Help" @@ -605,6 +628,11 @@ if(K && usr) if(K.client && K.client.holder && K.key != usr.key && K.key != M.key) K << "PM: [key_name(usr, K)]->[key_name(M, K)]: \blue [t]" + if(href_list["flavor_more"]) + usr << browse(text("[][]", src.name, dd_replacetext(src.flavor_text, "\n", "
")), text("window=[];size=500x200", src.name)) + onclose(usr, "[src.name]") + if(href_list["flavor_change"]) + update_flavor_text() ..() return diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index bdbfae5768d..9a9447bd48e 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -102,6 +102,8 @@ datum/preferences job_engsec_med = 0 job_engsec_low = 0 + flavor_text = "" + // slot stuff var/slotname var/curslot = 0 @@ -163,6 +165,13 @@ datum/preferences dat += "
Eyes
" dat += "Change Color
__
" + dat += "
Flavor Text
" + dat += "Change
" + if(lentext(flavor_text) <= 40) + dat += "[flavor_text]" + else + dat += "[copytext(flavor_text, 1, 37)]..." + dat += "
" if(!jobban_isbanned(user, "Syndicate")) var/n = 0 @@ -557,6 +566,15 @@ datum/preferences if(link_tags["b_random_name"]) be_random_name = !be_random_name + if(link_tags["flavor_text"]) + var/msg = input(usr,"Set the flavor text in your 'examine' verb. Don't metagame!","Flavor Text",html_decode(flavor_text)) as message + + if(msg != null) + msg = copytext(msg, 1, MAX_MESSAGE_LEN) + msg = html_encode(msg) + + flavor_text = msg + // slot links if(!IsGuestKey(user.key)) if(link_tags["saveslot"]) @@ -595,7 +613,7 @@ datum/preferences if(count > 10) usr << "You have reached the character limit." return - slotname = input(usr,"Choose a name for your slot","Name","Default") + slotname = input(usr,"Choose a name for your slot","Name","Slot "+num2text(count)) curslot = savefile_createslot(user, slotname) @@ -644,6 +662,8 @@ datum/preferences randomize_name() character.real_name = real_name + character.flavor_text = flavor_text + character.gender = gender character.age = age diff --git a/code/modules/mob/new_player/savefile.dm b/code/modules/mob/new_player/savefile.dm index ad9543abee4..72b7b2a6868 100644 --- a/code/modules/mob/new_player/savefile.dm +++ b/code/modules/mob/new_player/savefile.dm @@ -97,6 +97,8 @@ datum/preferences/proc/savefile_save(mob/user, slot) F["real_name"] << src.real_name F["name_is_always_random"] << src.be_random_name + F["flavor_text"] << flavor_text + F["gender"] << src.gender F["age"] << src.age @@ -173,6 +175,8 @@ datum/preferences/proc/savefile_load(mob/user, slot) F["gender"] >> src.gender F["age"] >> src.age + F["flavor_text"] >> flavor_text + F["hair_red"] >> src.r_hair F["hair_green"] >> src.g_hair F["hair_blue"] >> src.b_hair