diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index c9f08cdfd4..f0cb6dd926 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -57,25 +57,27 @@ //DNA - Because fuck you and your magic numbers being all over the codebase. #define DNA_BLOCK_SIZE 3 -#define DNA_UNI_IDENTITY_BLOCKS 18 +#define DNA_UNI_IDENTITY_BLOCKS 19 #define DNA_HAIR_COLOR_BLOCK 1 #define DNA_FACIAL_HAIR_COLOR_BLOCK 2 #define DNA_SKIN_TONE_BLOCK 3 -#define DNA_EYE_COLOR_BLOCK 4 -#define DNA_GENDER_BLOCK 5 -#define DNA_FACIAL_HAIR_STYLE_BLOCK 6 -#define DNA_HAIR_STYLE_BLOCK 7 -#define DNA_COLOR_ONE_BLOCK 8 -#define DNA_COLOR_TWO_BLOCK 9 -#define DNA_COLOR_THR_BLOCK 10 -#define DNA_COLOR_SWITCH_BLOCK 11 +#define DNA_EYE_COLOR_TWO_BLOCK 4 +#define DNA_EYE_COLOR_SWITCH_BLOCK 5 +#define DNA_EYE_COLOR_BLOCK 6 +#define DNA_GENDER_BLOCK 7 +#define DNA_FACIAL_HAIR_STYLE_BLOCK 8 +#define DNA_HAIR_STYLE_BLOCK 9 +#define DNA_COLOR_ONE_BLOCK 10 +#define DNA_COLOR_TWO_BLOCK 11 +#define DNA_COLOR_THR_BLOCK 12 +#define DNA_COLOR_SWITCH_BLOCK 13 #define DNA_COLOR_SWITCH_MAX 7 //must be (2^(n+1))-1 -#define DNA_COCK_BLOCK 12 -#define DNA_MUTANTRACE_BLOCK 13 -#define DNA_MUTANTTAIL_BLOCK 14 -#define DNA_MUTANTWING_BLOCK 15 -#define DNA_WINGCOLOR_BLOCK 16 -#define DNA_TAUR_BLOCK 17 +#define DNA_COCK_BLOCK 14 +#define DNA_MUTANTRACE_BLOCK 15 +#define DNA_MUTANTTAIL_BLOCK 16 +#define DNA_MUTANTWING_BLOCK 17 +#define DNA_WINGCOLOR_BLOCK 18 +#define DNA_TAUR_BLOCK 19 #define DNA_STRUC_ENZYMES_BLOCKS 19 #define DNA_UNIQUE_ENZYMES_LEN 32 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 15fca32e5d..4e616769c6 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -109,7 +109,8 @@ var/list/preferences_datums = list() var/current_tab = 0 // OOC Metadata: - var/metadata = "" + //var/metadata = "" + var/flavor_text = "" var/unlock_content = 0 diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 50f2154ef2..4a9efad27d 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -309,7 +309,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["features["mcolor"]"] << "#FFF" //Character - S["OOC_Notes"] >> metadata + S["Flavor_Text"] >> flavor_text S["real_name"] >> real_name S["name_is_always_random"] >> be_random_name S["body_is_always_random"] >> be_random_body @@ -362,7 +362,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car update_character(needs_update) //needs_update == savefile_version if we need an update (positive integer) //Sanitize - metadata = sanitize_text(metadata, initial(metadata)) + flavor_text = sanitize_text(flavor_text, initial(flavor_text)) real_name = reject_bad_name(real_name) if(!features["mcolor"] || features["mcolor"] == "#000") features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F") @@ -422,7 +422,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["version"] << SAVEFILE_VERSION_MAX //load_character will sanitize any bad data, so assume up-to-date. //Character - S["OOC_Notes"] << metadata + S["Flavor_Text"] << flavor_text S["real_name"] << real_name S["name_is_always_random"] << be_random_name S["body_is_always_random"] << be_random_body diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 183e26b42e..78386c1f79 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -415,3 +415,10 @@ dna.species.mutant_bodyparts -= "wingsopen" dna.species.mutant_bodyparts |= "wings" update_body() + +/mob/living/carbon/human/verb/set_flavor() + set name = "Set Flavor Text" + set desc = "Sets an extended description of your character's features." + set category = "IC" + + flavor_text = copytext(sanitize(input(usr, "Please enter your new flavor text.", "Flavor text", null) as text), 1) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index ecc0747a8a..e4bd12856c 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -79,7 +79,8 @@ There are several things that need to be remembered: dna.species.handle_mutant_bodyparts(src) -/mob/living/carbon/human/proc/update_body() +//mob/living/carbon/human/proc/update_body() +/mob/living/carbon/human/update_body() remove_overlay(BODY_LAYER) dna.species.handle_body(src) update_body_parts() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f6a9200c49..4c53739a0e 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -537,7 +537,7 @@ Sorry Giacom. Please don't be mad :( /mob/living/proc/update_damage_overlays() return - +/* /mob/living/proc/Examine_OOC() set name = "Examine Meta-Info (OOC)" set category = "OOC" @@ -552,6 +552,7 @@ Sorry Giacom. Please don't be mad :( src << "OOC Metadata is not supported by this server!" return +*/ /mob/living/Move(atom/newloc, direct) if (buckled && buckled.loc != newloc) //not updating position diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 65595ed560..a2bbcfb3c4 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -109,6 +109,18 @@ var/next_mob_id = 0 continue M.show_message(msg,1,blind_message,2) +/mob/proc/get_top_level_mob() + if(istype(src.loc,/mob)&&src.loc!=src) + var/mob/M=src.loc + return M.get_top_level_mob() + return src + +proc/get_top_level_mob(var/mob/S) + if(istype(S.loc,/mob)&&S.loc!=S) + var/mob/M=S.loc + return M.get_top_level_mob() + return S + // Show a message to all player mobs who sees this atom // Use for objects performing visible actions // message is output to anyone who can see, e.g. "The [src] does something!" @@ -437,6 +449,31 @@ var/next_mob_id = 0 if (popup) memory() +/mob/proc/update_flavor_text() + set src in usr + if(usr != src) + usr << "No." + var/msg = input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null + + if(msg != null) + msg = copytext(msg, 1, MAX_MESSAGE_LEN) + msg = html_encode(msg) + + flavor_text = msg + +/mob/proc/warn_flavor_changed() + if(flavor_text && flavor_text != "") // don't spam people that don't use it! + src << "