From 08810cba031584b4f0c79586fee50e1f8eff8e9c Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 02:56:09 -0300 Subject: [PATCH 01/38] https://github.com/Mojave-Sun/mojave-sun-13/pull/2415 --- code/__DEFINES/dcs/signals.dm | 34 ++-- code/__DEFINES/jobs.dm | 10 ++ code/_onclick/click.dm | 1 - code/datums/guestbook.dm | 148 ++++++++++++++++++ code/datums/mind.dm | 5 + code/game/atoms.dm | 6 +- code/game/say.dm | 32 +++- code/modules/jobs/job_types/_job.dm | 19 +++ .../mob/living/carbon/human/examine.dm | 38 +++-- code/modules/mob/living/carbon/human/human.dm | 17 ++ .../mob/living/carbon/human/human_helpers.dm | 62 ++++++-- .../mob/living/carbon/human/human_say.dm | 2 +- .../carbon/human/species_types/mothmen.dm | 2 +- code/modules/mob/mob.dm | 13 ++ shiptest.dme | 1 + tgui/packages/tgui/interfaces/Guestbook.tsx | 92 +++++++++++ 16 files changed, 430 insertions(+), 52 deletions(-) create mode 100644 code/datums/guestbook.dm create mode 100644 tgui/packages/tgui/interfaces/Guestbook.tsx diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index d19d1f7e9633..d81e7249bdc4 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -224,19 +224,29 @@ #define COMSIG_LIVING_GET_PULLED "living_start_pulled" ///////////////// - -#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area) -#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area) - -#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params, mob/user) -#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob) - #define COMPONENT_ALLOW_EXAMINATE 1 //Allows the user to examinate regardless of client.eye. -#define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob) -#define COMSIG_CLICK_ALT "alt_click" //from base of atom/AltClick(): (/mob) -#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" //from base of atom/CtrlShiftClick(/mob) -#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto" //from base of atom/MouseDrop(): (/atom/over, /mob/user) +//from base of area/Entered(): (/area) +#define COMSIG_ENTER_AREA "enter_area" +//from base of area/Exited(): (/area) +#define COMSIG_EXIT_AREA "exit_area" +//from base of atom/Click(): (location, control, params, mob/user) +#define COMSIG_CLICK "atom_click" +//from base of atom/ShiftClick(): (/mob) +#define COMSIG_CLICK_SHIFT "shift_click" +//Allows the user to examinate regardless of client.eye. + #define COMPONENT_ALLOW_EXAMINATE 1 +//from base of atom/CtrlClickOn(): (/mob) +#define COMSIG_CLICK_CTRL "ctrl_click" +//from base of atom/AltClick(): (/mob) +#define COMSIG_CLICK_ALT "alt_click" +//from base of atom/CtrlShiftClick(/mob) +#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" +///from base of atom/CtrlShiftRightClick(/mob) +#define COMSIG_CLICK_CTRL_SHIFT_RIGHT "ctrl_shift_right_click" +//from base of atom/MouseDrop(): (/atom/over, /mob/user) +#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto" #define COMPONENT_NO_MOUSEDROP 1 -#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" //from base of atom/MouseDrop_T: (/atom/from, /mob/user) +//from base of atom/MouseDrop_T: (/atom/from, /mob/user) +#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" ///from base of area/proc/power_change(): () #define COMSIG_AREA_POWER_CHANGE "area_power_change" diff --git a/code/__DEFINES/jobs.dm b/code/__DEFINES/jobs.dm index 21eb9b40e066..f8a2dca70a95 100644 --- a/code/__DEFINES/jobs.dm +++ b/code/__DEFINES/jobs.dm @@ -55,3 +55,13 @@ #define JOB_DISPLAY_ORDER_DEFAULT 80 #define JOB_DISPLAY_ORDER_ASSISTANT 999 + +// ~guestbook_flags variable on datum/job +/// We will know absolutely everyone, no matter the faction or ship +#define GUESTBOOK_OMNISCIENT (1 << 0) +/// We will know others in our ship +#define GUESTBOOK_SHIP (1 << 1) +/// We will know others in our faction +#define GUESTBOOK_FACTION (1 << 2) +/// We will not be known by others, even if they pass checks in any way otherwise +#define GUESTBOOK_FORGETMENOT (1 << 3) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 81ce3ceec1eb..993026c0d5e0 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -356,7 +356,6 @@ /** * Control+Shift click - * Unused except for AI */ /mob/proc/CtrlShiftClickOn(atom/A) A.CtrlShiftClick(src) diff --git a/code/datums/guestbook.dm b/code/datums/guestbook.dm new file mode 100644 index 000000000000..a836ad1b99c4 --- /dev/null +++ b/code/datums/guestbook.dm @@ -0,0 +1,148 @@ +/** + * THE GUESTBOOK DATUM // ripped straight from mojave. + * + * Essentially, this datum handles the people that a given human knows, + * to handle getting the correct names on examine and saycode. + */ +/datum/guestbook + /// Associative list of known guests, real_name = known_name + var/list/known_names + +/datum/guestbook/Destroy(force) + known_names = null + return ..() + +/datum/guestbook/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "Guestbook", "[user.real_name]'s Guestbook") + ui.set_autoupdate(FALSE) + ui.open() + +/datum/guestbook/ui_state(mob/user) + return GLOB.always_state + +/datum/guestbook/ui_data(mob/user) + var/list/data = list() + var/list/names = list() + for(var/real_name in known_names) + var/given_name = LAZYACCESS(known_names, real_name) + names += list(list("real_name" = real_name, "given_name" = given_name)) + data["names"] = names + return data + +/datum/guestbook/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return . + switch(action) + if("rename_guest") + var/real_name = params["real_name"] + var/new_name = params["new_name"] + new_name = reject_bad_name(new_name, max_length = 42) + if(!new_name) + to_chat(usr, span_warning("That's a pretty terrible name. You can do better.")) + return FALSE + if(!rename_guest(usr, null, real_name, new_name, silent = FALSE)) + return FALSE + return TRUE + if("delete_guest") + var/real_name = params["real_name"] + if(!remove_guest(usr, null, real_name, silent = FALSE)) + return FALSE + return TRUE + +/datum/guestbook/proc/try_add_guest(mob/user, mob/living/carbon/human/guest, silent = FALSE) + if(user == guest) + if(!silent) + to_chat(user, span_warning("That's you! You already know yourself plenty.")) + return FALSE + if(!visibility_checks(user, guest, silent)) + return FALSE + var/given_name = input(user, "What name do you want to give to [guest]?") + if(!given_name) + if(!silent) + to_chat(user, span_warning("Nevermind.")) + return FALSE + given_name = reject_bad_name(given_name) + if(!given_name) + if(!silent) + to_chat(user, span_warning("That's a pretty terrible name. You can do better.")) + return FALSE + if(!visibility_checks(user, guest, silent)) + return FALSE + var/face_name = guest.get_face_name("ForgetMeNot") + if(LAZYACCESS(known_names, face_name)) + if(!rename_guest(user, guest, face_name, given_name, silent)) + return FALSE + else + if(!add_guest(user, guest, face_name, given_name, silent)) + return FALSE + return TRUE + +/datum/guestbook/proc/add_guest(mob/user, mob/living/carbon/guest, real_name, given_name, silent = TRUE) + //Already exists, should be handled by rename_guest() + var/existing_name = LAZYACCESS(known_names, real_name) + if(existing_name) + if(!silent) + to_chat(user, span_warning("You already know them as \"[existing_name]\".")) + return FALSE + LAZYADDASSOC(known_names, real_name, given_name) + if(!silent) + to_chat(user, span_notice("You memorize the face of [guest] as \"[given_name]\".")) + return TRUE + +/datum/guestbook/proc/rename_guest(mob/user, mob/living/carbon/guest, real_name, given_name, silent = TRUE) + var/old_name = LAZYACCESS(known_names, real_name) + if(!old_name) + return FALSE + known_names[real_name] = given_name + if(!silent) + to_chat(user, span_notice("You re-memorize the face of \"[old_name]\" as \"[given_name]\".")) + return TRUE + +/datum/guestbook/proc/try_remove_guest(mob/user, mob/living/carbon/human/guest, silent = FALSE) + if(user == guest) + if(!silent) + to_chat(user, span_warning("That's you! You'll never forget yourself.")) + return + if(!visibility_checks(user, guest, silent)) + return FALSE + var/face_name = guest.get_face_name("ForgetMeNot") + if(!remove_guest(user, guest, face_name, silent)) + return FALSE + return TRUE + +/datum/guestbook/proc/remove_guest(mob/user, mob/living/carbon/guest, real_name, silent = TRUE) + //Already exists, should be handled by rename_guest() + var/existing_name = LAZYACCESS(known_names, real_name) + if(!existing_name) + if(!silent) + to_chat(user, span_warning("You don't know them in the first place.")) + return FALSE + LAZYREMOVE(known_names, real_name) + if(!silent) + to_chat(user, span_notice("You forget the face of \"[existing_name]\".")) + return TRUE + +/datum/guestbook/proc/get_known_name(mob/user, mob/living/carbon/guest, real_name) + if(user == guest) + return real_name + return LAZYACCESS(known_names, real_name) + +/datum/guestbook/proc/visibility_checks(mob/user, mob/living/carbon/human/guest, silent = FALSE) + if(QDELETED(guest)) + if(!silent) + to_chat(user, span_warning("What?")) + return FALSE + var/visible_name = guest.get_visible_name("") + var/face_name = guest.get_face_name("") + if(!visible_name || !face_name) + if(!silent) + to_chat(user, span_warning("You can't see their face very well!")) + return FALSE + if(get_dist(user, guest) > 4) + if(!silent) + to_chat(user, span_warning("You need to take a closer look at them!")) + return FALSE + return TRUE diff --git a/code/datums/mind.dm b/code/datums/mind.dm index fc91d2c71de1..36ec4a1b5ae6 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -79,6 +79,9 @@ /// The index for our current scar slot, so we don't have to constantly check the savefile (unlike the slots themselves, this index is independent of selected char slot, and increments whenever a valid char is joined with) var/current_scar_slot_index + /// Guestbook datum, in case we actually make use of the guestbook mechanics + var/datum/guestbook/guestbook + ///Skill multiplier, adjusts how much xp you get/loose from adjust_xp. Dont override it directly, add your reason to experience_multiplier_reasons and use that as a key to put your value in there. var/experience_multiplier = 1 ///Skill multiplier list, just slap your multiplier change onto this with the type it is coming from as key. @@ -95,6 +98,7 @@ key = _key soulOwner = src martial_art = default_martial_art + guestbook = new() init_known_skills() /datum/mind/Destroy() @@ -102,6 +106,7 @@ if(islist(antag_datums)) QDEL_LIST(antag_datums) QDEL_NULL(language_holder) + QDEL_NULL(guestbook) set_current(null) soulOwner = null return ..() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 350b80907f70..dfa25f735e2f 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1673,7 +1673,11 @@ active_hud.screentip_text.maptext = "" else //We inline a MAPTEXT() here, because there's no good way to statically add to a string like this - active_hud.screentip_text.maptext = "[name]" + active_hud.screentip_text.maptext = "[get_screentip_name(client)]" + +/// Returns the atom name that should be used on screentip +/atom/proc/get_screentip_name(client/hovering_client) + return name ///Called whenever a player is spawned on the same turf as this atom. /atom/proc/join_player_here(mob/M) diff --git a/code/game/say.dm b/code/game/say.dm index a5e180c4d67a..93131eb22b09 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -51,10 +51,28 @@ GLOBAL_LIST_INIT(freqcolor, list()) //Radio freq/name display var/freqpart = radio_freq ? "\[[get_radio_name(radio_freq)]\] " : "" //Speaker name - var/namepart = "[speaker.GetVoice()][speaker.get_alt_name()]" - if(face_name && ishuman(speaker)) - var/mob/living/carbon/human/H = speaker - namepart = "[H.get_face_name()]" //So "fake" speaking like in hallucinations does not give the speaker away if disguised + + var/namepart = speaker.GetVoice() + var/atom/movable/reliable_narrator = speaker + if(istype(speaker, /atom/movable/virtualspeaker)) //ugh + var/atom/movable/virtualspeaker/fakespeaker = speaker + reliable_narrator = fakespeaker.source + if(ishuman(reliable_narrator)) + //So "fake" speaking like in hallucinations does not give the speaker away if disguised + if(face_name) + var/mob/living/carbon/human/human_narrator = reliable_narrator + namepart = human_narrator.name + //otherwise, do guestbook handling + else if((src != reliable_narrator) && ismob(src)) + var/mob/mob_source = src + if(mob_source.mind?.guestbook) + var/known_name = mob_source.mind.guestbook.get_known_name(src, reliable_narrator, namepart) + if(known_name) + namepart = "[known_name]" + else + var/mob/living/carbon/human/human_narrator = reliable_narrator + namepart = "[human_narrator.get_generic_name(prefixed = TRUE, lowercase = FALSE)]" + //End name span. var/endspanpart = "" @@ -66,9 +84,9 @@ GLOBAL_LIST_INIT(freqcolor, list()) else messagepart = lang_treat(speaker, message_language, raw_message, spans, message_mods) - var/datum/language/D = GLOB.language_datum_instances[message_language] - if(istype(D) && D.display_icon(src)) - languageicon = "[D.get_icon()] " + var/datum/language/language = GLOB.language_datum_instances[message_language] + if(istype(language) && language.display_icon(src)) + languageicon = "[language.get_icon()] " messagepart = " [say_emphasis(messagepart)]" diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index f46d7768b1f7..8a9d6e06c0ab 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -25,6 +25,8 @@ var/display_order = JOB_DISPLAY_ORDER_DEFAULT + ///Guestbook flags, to establish who knowns who etc + var/guestbook_flags = GUESTBOOK_SHIP ///Levels unlocked at roundstart in physiology var/list/roundstart_experience @@ -33,6 +35,23 @@ if(new_name) name = new_name outfit = new_outfit + +/* if(!(guestbook_flags & GUESTBOOK_FORGETMENOT)) // BIG FUCKING TODO: make this work with ship and faction + for(var/mob/living/carbon/human/dude as anything in GLOB.human_list) + if((dude == spawned) || !dude.mind?.assigned_role) + continue + var/datum/job/dudes_job = dude.mind.assigned_role + var/same_faction = dude.faction_check_mob(src) + //if we satisfy at least one condition, add us to their guestbook + if(dudes_job.guestbook_flags & GUESTBOOK_OMNISCIENT || \ + ((dudes_job.guestbook_flags & GUESTBOOK_SHIP) && (dude.mind.original_ship == src.mind.original_ship)) || \ + ((dudes_job.guestbook_flags & GUESTBOOK_FACTION) && same_faction)) + dude.mind.guestbook.add_guest(dude, spawned, spawned.mind.name, spawned.mind.name, silent = TRUE) + //if we satisfy at least one condition, add them to our guestbook + if(guestbook_flags & GUESTBOOK_OMNISCIENT || \ + ((guestbook_flags & GUESTBOOK_SHIP) && (src.mind.original_ship == dude.mind.original_ship)) || \ + ((guestbook_flags & GUESTBOOK_FACTION) && same_faction)) + spawned.mind.guestbook.add_guest(spawned, dude, dude.mind.name, dude.mind.name, silent = TRUE) */ register() /datum/job/proc/register() diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index ceda44284f46..d9d54310ff43 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -8,7 +8,7 @@ var/t_has = p_have() var/t_is = p_are() var/obscure_name - + var/apparent_species var/list/obscured = check_obscured_slots() var/skipface = ((wear_mask?.flags_inv & HIDEFACE) || (head?.flags_inv & HIDEFACE)) @@ -16,11 +16,29 @@ var/mob/living/L = user if(HAS_TRAIT(L, TRAIT_PROSOPAGNOSIA)) obscure_name = TRUE - var/apparent_species + if(dna?.species && !skipface) apparent_species = ", \an [dna.species.name]" . = list("This is [!obscure_name ? name : "Unknown"][apparent_species]!") + if(user != src) + if(!obscure_name && !skipface) + var/face_name = get_face_name("") + if(face_name) + //if we have no guestbook, we just KNOW okay? + var/known_name = user.mind?.guestbook ? user.mind.guestbook.get_known_name(user, src, face_name) : face_name + if(known_name) + var/actually = (known_name != name) ? "actually " : "really " + . += "Oh, it's [actually][known_name]!" + else + . += "You don't recognize [t_him]." + else + . += "You can't see [t_his] face very well." + else + . += "You can't see [t_his] face very well." + else + . += "It's you, [real_name]." + //uniform if(w_uniform && !(ITEM_SLOT_ICLOTHING in obscured)) //accessory @@ -403,18 +421,4 @@ . = ..() if ((wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))) return - var/age_text - switch(age) - if(-INFINITY to 25) - age_text = "very young" - if(26 to 35) - age_text = "of adult age" - if(36 to 55) - age_text = "middle-aged" - if(56 to 75) - age_text = "rather old" - if(76 to 100) - age_text = "very old" - if(101 to INFINITY) - age_text = "withering away" - . += list(span_notice("[p_they(TRUE)] appear[p_s()] to be [age_text].")) + . += list(span_notice("[p_they(TRUE)] appear[p_s()] to be [get_age()].")) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index cd80b13bcda6..bca2d3bbd609 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1289,6 +1289,23 @@ return FALSE return ..() +/mob/living/carbon/human/CtrlShiftClick(mob/user) + . = ..() + if(!user.mind?.guestbook) + return + INVOKE_ASYNC(user.mind.guestbook, /datum/guestbook.proc/try_add_guest, user, src, FALSE) + +/mob/living/carbon/human/get_screentip_name(client/hovering_client) + . = ..() + var/mob/hovering_mob = hovering_client?.mob + if(!hovering_mob || !hovering_mob.mind?.guestbook) + return . + var/face_name = get_face_name("") + var/known_name = hovering_mob.mind.guestbook.get_known_name(hovering_mob, src, face_name) + if(known_name) + return known_name + return . + /mob/living/carbon/human/species var/race = null diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 2f9814112711..6e505769b3af 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -33,26 +33,21 @@ //repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a separate proc as it'll be useful elsewhere /mob/living/carbon/human/get_visible_name() - var/face_name = get_face_name("") - var/id_name = get_id_name("") if(name_override) return name_override - if(face_name) - if(id_name && (id_name != face_name)) - return "[face_name] (as [id_name])" - return face_name + var/id_name = get_id_name("") if(id_name) return id_name - return "Unknown" + return get_generic_name(lowercase = TRUE) //Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when Fluacided or when updating a human's name variable -/mob/living/carbon/human/proc/get_face_name(if_no_face="Unknown") - if(wear_mask && (wear_mask.flags_inv&HIDEFACE)) //Wearing a mask which hides our face, use id-name if possible +/mob/living/carbon/human/proc/get_face_name(if_no_face = get_generic_name(lowercase = TRUE)) + if( wear_mask && (wear_mask.flags_inv & HIDEFACE) ) //Wearing a mask which hides our face, use id-name if possible return if_no_face - if(head && (head.flags_inv&HIDEFACE)) - return if_no_face //Likewise for hats + if( head && (head.flags_inv & HIDEFACE) ) + return if_no_face //Likewise for hats var/obj/item/bodypart/O = get_bodypart(BODY_ZONE_HEAD) - if(!O || (HAS_TRAIT(src, TRAIT_DISFIGURED)) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name) //disfigured. use id-name if possible + if( !O || (HAS_TRAIT(src, TRAIT_DISFIGURED)) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name || HAS_TRAIT(src, TRAIT_INVISIBLE_MAN)) //disfigured. use id-name if possible return if_no_face return real_name @@ -181,3 +176,46 @@ destination.socks = socks destination.socks_color = socks_color destination.jumpsuit_style = jumpsuit_style + +/mob/living/carbon/human/proc/get_gender() + var/visible_gender = p_they() + switch(visible_gender) + if("he") + visible_gender = "Man" + if("she") + visible_gender = "Woman" + if("they") + visible_gender = "Creature" + else + visible_gender = "Thing" + return visible_gender + +/mob/living/carbon/human/proc/get_age() + switch(age) + if(70 to INFINITY) + return "Geriatric" + if(60 to 70) + return "Elderly" + if(50 to 60) + return "Old" + if(40 to 50) + return "Middle-Aged" + if(24 to 40) + return "" //not necessary because this is basically the most common age range + if(18 to 24) + return "Young" + else + return "Puzzling" + +/mob/living/carbon/human/proc/get_generic_name(prefixed = FALSE, lowercase = FALSE) + var/visible_skin + if(dna.species.use_skintones) + visible_skin = GLOB.skin_tones[skin_tone] ? "[GLOB.skin_tones[skin_tone]] " : null + else + visible_skin = "[dna.species.name] " + var/visible_gender = get_gender() + var/visible_age = get_age() + var/final_string = "[visible_age ? "[visible_age] " : null][visible_skin][visible_gender]" + if(prefixed) + final_string = "\A [final_string]" + return lowercase ? lowertext(final_string) : final_string diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm index 039141bb5fd5..e5e0a3cae7fb 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -29,7 +29,7 @@ if(istype(wear_mask, /obj/item/clothing/mask/infiltrator)) var/obj/item/clothing/mask/infiltrator/V = wear_mask if(V.voice_unknown) - return ("Unknown") + return "Unknown" else return real_name if(mind) diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index 02ddf79f6bc4..b512dc50b2bf 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -1,5 +1,5 @@ /datum/species/moth - name = "\improper Mothman" + name = "\improper Mothperson" id = SPECIES_MOTH default_color = "00FF00" species_traits = list(LIPS, NOEYESPRITES, TRAIT_ANTENNAE, HAIR, EMOTE_OVERLAY) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5a2e3731a703..e45dba26080f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -670,6 +670,19 @@ else to_chat(src, "You don't have a mind datum for some reason, so you can't add a note to it.") +///Shows guestbook tgui window +/mob/verb/guestbook() + set name = "Guestbook" + set category = "IC" + set desc = "View your character's Guestbook." + if(!mind) + var/fail_message = "You have no mind!" + if(isobserver(src)) + fail_message += " You have to be in the current round at some point to have one." + to_chat(src, span_warning(fail_message)) + return + mind.guestbook.ui_interact(usr) + /** * Allows you to respawn, abandoning your current mob * diff --git a/shiptest.dme b/shiptest.dme index 939934ea7b06..da1bb827f422 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -401,6 +401,7 @@ #include "code\datums\emotes.dm" #include "code\datums\ert.dm" #include "code\datums\forced_movement.dm" +#include "code\datums\guestbook.dm" #include "code\datums\holocall.dm" #include "code\datums\http.dm" #include "code\datums\hud.dm" diff --git a/tgui/packages/tgui/interfaces/Guestbook.tsx b/tgui/packages/tgui/interfaces/Guestbook.tsx new file mode 100644 index 000000000000..c2f7d7da242c --- /dev/null +++ b/tgui/packages/tgui/interfaces/Guestbook.tsx @@ -0,0 +1,92 @@ +import { useBackend } from '../backend'; +import { useLocalState } from "../backend"; +import { Stack, Button, Input, Section, Box } from '../components'; +import { Window } from '../layouts'; + +type Info = { + names: NameData[]; +}; + +type NameData = { + real_name: string; + given_name: string; +}; + +export const Guestbook = (props, context) => { + const { act, data } = useBackend(context); + const { + names = [], + } = data; + + const [lastNameBeforeEdit, setLastNameBeforeEdit] + = useLocalState(context, "lastNameBeforeEdit", null); + + return ( + + + {!names.length && ( +
+ {"No known names!"} +
+ ) + || ( + + {names.map(name => ( + +
+ + +
+
+ ))} +
+ )} +
+
+ ); +}; From 76c125898883aa305d1366deedfa79bf47477878 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 04:12:34 -0300 Subject: [PATCH 02/38] https://github.com/Mojave-Sun/mojave-sun-13/pull/2433 --- code/_globalvars/lists/names.dm | 1 + code/game/objects/items/toys.dm | 2 +- code/game/say.dm | 4 +- code/modules/admin/create_mob.dm | 1 + code/modules/client/preferences.dm | 12 +++ code/modules/client/preferences_savefile.dm | 1 + code/modules/mob/living/carbon/human/human.dm | 5 +- .../mob/living/carbon/human/human_defines.dm | 3 + .../mob/living/carbon/human/human_helpers.dm | 51 ++++++++----- .../mob/living/carbon/human/human_say.dm | 27 +++---- code/modules/mob/living/silicon/ai/ai.dm | 1 + code/modules/mob/mob.dm | 30 ++++++-- strings/preference_adjectives.txt | 74 +++++++++++++++++++ 13 files changed, 168 insertions(+), 44 deletions(-) create mode 100644 strings/preference_adjectives.txt diff --git a/code/_globalvars/lists/names.dm b/code/_globalvars/lists/names.dm index ecc1acb6f0e1..f6a141c51e67 100644 --- a/code/_globalvars/lists/names.dm +++ b/code/_globalvars/lists/names.dm @@ -27,6 +27,7 @@ GLOBAL_LIST_INIT(verbs, world.file2list("strings/names/verbs.txt")) GLOBAL_LIST_INIT(ing_verbs, world.file2list("strings/names/ing_verbs.txt")) GLOBAL_LIST_INIT(adverbs, world.file2list("strings/names/adverbs.txt")) GLOBAL_LIST_INIT(adjectives, world.file2list("strings/names/adjectives.txt")) +GLOBAL_LIST_INIT(preference_adjectives, world.file2list("strings/preference_adjectives.txt")) GLOBAL_LIST_INIT(dream_strings, world.file2list("strings/dreamstrings.txt")) //loaded on startup because of " //would include in rsc if ' was used diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index a976c49fb45c..ea06499e3ccf 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1404,7 +1404,7 @@ say(message, language) return NOPASS -/obj/item/toy/dummy/GetVoice() +/obj/item/toy/dummy/GetVoice(if_no_voice = "Unknown") return doll_name /obj/item/toy/seashell diff --git a/code/game/say.dm b/code/game/say.dm index 93131eb22b09..13b0ec0371a5 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -63,7 +63,7 @@ GLOBAL_LIST_INIT(freqcolor, list()) var/mob/living/carbon/human/human_narrator = reliable_narrator namepart = human_narrator.name //otherwise, do guestbook handling - else if((src != reliable_narrator) && ismob(src)) + else if(ismob(src)) var/mob/mob_source = src if(mob_source.mind?.guestbook) var/known_name = mob_source.mind.guestbook.get_known_name(src, reliable_narrator, namepart) @@ -194,7 +194,7 @@ GLOBAL_LIST_INIT(freqcolor, list()) return "2" return "0" -/atom/movable/proc/GetVoice() +/atom/movable/proc/GetVoice(if_no_voice = "Unknown") return "[src]" //Returns the atom's name, prepended with 'The' if it's not a proper noun /atom/movable/proc/IsVocal() diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index c1845945485f..ed01a53aada3 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -23,6 +23,7 @@ H.facial_hair_color = H.hair_color H.eye_color = random_eye_color() H.dna.blood_type = random_blood_type() + H.generic_adjective = pick(GLOB.preference_adjectives) // Mutant randomizing, doesn't affect the mob appearance unless it's the specific mutant. H.dna.features["mcolor"] = random_short_color() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index b52052cd15ec..4b8512715b94 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -158,6 +158,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/list/custom_names = list() var/preferred_ai_core_display = "Blue" var/prefered_security_department = SEC_DEPT_RANDOM + var/generic_adjective = "Unremarkable" //Quirk list var/list/all_quirks = list() @@ -847,6 +848,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "[features["body_size"]]
" + + dat += "

Character Adjective

" + + dat += "[generic_adjective]
" + mutant_category++ if(mutant_category >= MAX_MUTANT_ROWS) dat += "" @@ -2070,6 +2076,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(phobiaType) phobia = phobiaType + if("generic_adjective") + var/selectAdj = input(user, "In one word, how would you describe your character?", "Character Preference", generic_adjective) as null|anything in GLOB.preference_adjectives + if(selectAdj) + generic_adjective = selectAdj + if ("max_chat_length") var/desiredlength = input(user, "Choose the max character length of shown Runechat messages. Valid range is 1 to [CHAT_MESSAGE_MAX_LENGTH] (default: [initial(max_chat_length)]))", "Character Preference", max_chat_length) as null|num if (!isnull(desiredlength)) @@ -2469,6 +2480,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) character.set_species(chosen_species, icon_update = FALSE, pref_load = TRUE) //Because of how set_species replaces all bodyparts with new ones, hair needs to be set AFTER species. character.dna.real_name = character.real_name + character.generic_adjective = generic_adjective character.hair_color = hair_color character.facial_hair_color = facial_hair_color character.grad_color = features["grad_color"] diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 0b95e291b794..fe5fc8efcc4e 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -594,6 +594,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["randomise"] , randomise) WRITE_FILE(S["species"] , pref_species.id) WRITE_FILE(S["phobia"] , phobia) + WRITE_FILE(S["generic_adjective"] , generic_adjective) WRITE_FILE(S["body_size"] , features["body_size"]) WRITE_FILE(S["prosthetic_limbs"] , prosthetic_limbs) WRITE_FILE(S["feature_mcolor"] , features["mcolor"]) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index bca2d3bbd609..a74c744bfe8e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1298,11 +1298,14 @@ /mob/living/carbon/human/get_screentip_name(client/hovering_client) . = ..() var/mob/hovering_mob = hovering_client?.mob - if(!hovering_mob || !hovering_mob.mind?.guestbook) + if(!hovering_mob?.mind?.guestbook) return . var/face_name = get_face_name("") var/known_name = hovering_mob.mind.guestbook.get_known_name(hovering_mob, src, face_name) if(known_name) + var/id_name = get_id_name("") + if(id_name && (known_name != id_name)) + return "[known_name] (as [id_name])" return known_name return . diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 5b638d330690..8cc9e5002749 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -61,6 +61,9 @@ var/special_voice = "" // For changing our voice. Used by a symptom. + /// Adjective used in get_generic_name(), if any + var/generic_adjective + var/bleed_rate = 0 //how much are we bleeding var/bleedsuppress = 0 //for stopping bloodloss, eventually this will be limb-based like bleeding diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 6e505769b3af..6ea6db2f8456 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -42,12 +42,12 @@ //Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when Fluacided or when updating a human's name variable /mob/living/carbon/human/proc/get_face_name(if_no_face = get_generic_name(lowercase = TRUE)) - if( wear_mask && (wear_mask.flags_inv & HIDEFACE) ) //Wearing a mask which hides our face, use id-name if possible + if(wear_mask && (wear_mask.flags_inv & HIDEFACE)) //Wearing a mask which hides our face, use id-name if possible return if_no_face if( head && (head.flags_inv & HIDEFACE) ) return if_no_face //Likewise for hats var/obj/item/bodypart/O = get_bodypart(BODY_ZONE_HEAD) - if( !O || (HAS_TRAIT(src, TRAIT_DISFIGURED)) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name || HAS_TRAIT(src, TRAIT_INVISIBLE_MAN)) //disfigured. use id-name if possible + if(!O || (HAS_TRAIT(src, TRAIT_DISFIGURED)) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name) //disfigured. use id-name if possible return if_no_face return real_name @@ -177,20 +177,11 @@ destination.socks_color = socks_color destination.jumpsuit_style = jumpsuit_style -/mob/living/carbon/human/proc/get_gender() - var/visible_gender = p_they() - switch(visible_gender) - if("he") - visible_gender = "Man" - if("she") - visible_gender = "Woman" - if("they") - visible_gender = "Creature" - else - visible_gender = "Thing" - return visible_gender - /mob/living/carbon/human/proc/get_age() + var/obscured = check_obscured_slots() + var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) + if((obscured & ITEM_SLOT_ICLOTHING) && skipface) + return "" switch(age) if(70 to INFINITY) return "Geriatric" @@ -208,14 +199,40 @@ return "Puzzling" /mob/living/carbon/human/proc/get_generic_name(prefixed = FALSE, lowercase = FALSE) + var/obscured = check_obscured_slots() + var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) + var/hide_features = (obscured & ITEM_SLOT_ICLOTHING) && skipface + var/visible_adjective + if(generic_adjective && !hide_features) + visible_adjective = "[generic_adjective] " + var/visible_age = get_age() + if(visible_age) + visible_age = "[visible_age] " var/visible_skin + //i am not quite sure how to implement a check for skin tone/species visibility so uhh, get fucked i guess? if(dna.species.use_skintones) visible_skin = GLOB.skin_tones[skin_tone] ? "[GLOB.skin_tones[skin_tone]] " : null else visible_skin = "[dna.species.name] " var/visible_gender = get_gender() - var/visible_age = get_age() - var/final_string = "[visible_age ? "[visible_age] " : null][visible_skin][visible_gender]" + var/final_string = "[visible_adjective][visible_age][visible_skin][visible_gender]" if(prefixed) final_string = "\A [final_string]" return lowercase ? lowertext(final_string) : final_string + +/mob/living/carbon/human/proc/get_gender() + var/visible_gender = p_they() + switch(visible_gender) + if("he") + visible_gender = "Man" + if("she") + visible_gender = "Woman" + if("they") + //humans are people, mutants are not + if(ishumanbasic(src)) + visible_gender = "Person" + else + visible_gender = "Creature" + else + visible_gender = "Thing" + return visible_gender diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm index e5e0a3cae7fb..69a803cd78ad 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -7,16 +7,14 @@ else . = ..() -/mob/living/carbon/human/GetVoice() +/mob/living/carbon/human/GetVoice(if_no_voice = get_generic_name()) if(istype(wear_mask, /obj/item/clothing/mask/chameleon)) - var/obj/item/clothing/mask/chameleon/V = wear_mask - if(V.voice_change && wear_id) + var/obj/item/clothing/mask/chameleon/chameleon_mask = wear_mask + if(chameleon_mask.voice_change && wear_id) var/obj/item/card/id/idcard = wear_id.GetID() if(istype(idcard)) return idcard.registered_name - else - return real_name - if(istype(wear_mask, /obj/item/clothing/mask/gas/syndicate/voicechanger)) + else if(istype(wear_mask, /obj/item/clothing/mask/gas/syndicate/voicechanger)) var/obj/item/clothing/mask/gas/syndicate/voicechanger/V = wear_mask if(V.voice_change && wear_id) var/obj/item/card/id/idcard = wear_id.GetID() @@ -26,18 +24,17 @@ return real_name else return real_name - if(istype(wear_mask, /obj/item/clothing/mask/infiltrator)) - var/obj/item/clothing/mask/infiltrator/V = wear_mask - if(V.voice_unknown) - return "Unknown" - else - return real_name + else if(istype(wear_mask, /obj/item/clothing/mask/infiltrator)) + var/obj/item/clothing/mask/infiltrator/infiltrator_mask = wear_mask + if(infiltrator_mask.voice_unknown) + return if_no_voice if(mind) var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling) - if(changeling && changeling.mimicing) + if(changeling?.mimicing) return changeling.mimicing - if(GetSpecialVoice()) - return GetSpecialVoice() + var/special_voice = GetSpecialVoice() + if(special_voice) + return special_voice return real_name /mob/living/carbon/human/IsVocal() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index daa987904737..cfd7d9153c8d 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -1063,3 +1063,4 @@ ghostize(1) QDEL_NULL(src) + diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index e45dba26080f..680406c3ecb5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -205,21 +205,26 @@ hearers -= src var/raw_msg = message - if(visible_message_flags & EMOTE_MESSAGE) - message = "[src][separation][message]" for(var/mob/M in hearers) if(!M.client) continue //This entire if/else chain could be in two lines but isn't for readibilties sake. - var/msg = message + var/msg = raw_msg if(M.see_invisible < invisibility)//if src is invisible to M msg = blind_message else if(T != loc && T != src) //if src is inside something and not a turf. msg = blind_message else if(T.lighting_object && T.lighting_object.invisibility <= M.see_invisible && T.is_softly_lit()) //if it is too dark. msg = blind_message + if(visible_message_flags & EMOTE_MESSAGE) + msg = "[src] [raw_msg]" + if(M.mind?.guestbook && ishuman(src)) + var/mob/living/carbon/human/human_source = src + var/known_name = M.mind.guestbook.get_known_name(M, src, type == MSG_VISUAL ? human_source.get_face_name() : human_source.GetVoice()) + if(known_name) + msg = "[known_name] [raw_msg]" if(!msg) continue @@ -250,12 +255,21 @@ if(self_message) hearers -= src var/raw_msg = message - if(audible_message_flags & EMOTE_MESSAGE) - message = "[src][separation][message]" for(var/mob/M in hearers) - if(audible_message_flags & EMOTE_MESSAGE && runechat_prefs_check(M, audible_message_flags)) - M.create_chat_message(src, raw_message = raw_msg, runechat_flags = audible_message_flags) - M.show_message(message, MSG_AUDIBLE, deaf_message, MSG_VISUAL) + var/msg = raw_msg + + //emote handling + if(audible_message_flags & EMOTE_MESSAGE) + msg = "[src] [message]" + if(M.mind?.guestbook && ishuman(src)) + var/mob/living/carbon/human/human_source = src + var/known_name = M.mind.guestbook.get_known_name(M, src, human_source.GetVoice()) + if(known_name) + msg = "[known_name] [raw_msg]" + if(runechat_prefs_check(M, audible_message_flags) && M.can_hear()) + M.create_chat_message(src, raw_message = raw_msg, runechat_flags = audible_message_flags) + + M.show_message(msg, MSG_AUDIBLE, deaf_message, MSG_VISUAL) /** * Show a message to all mobs in earshot of this one diff --git a/strings/preference_adjectives.txt b/strings/preference_adjectives.txt new file mode 100644 index 000000000000..7d80a5cb8026 --- /dev/null +++ b/strings/preference_adjectives.txt @@ -0,0 +1,74 @@ +Bedraggled +Blemished +Bony +Brawny +Bruised +Bulky +Burly +Calm +Charming +Chubby +Deformed +Delicate +Disgusting +Disturbing +Dull +Effeminate +Elegant +Emaciated +Exotic +Faint +Flabby +Flamboyant +Fragile +Frail +Frazzled +Gentle +Healthy +Hefty +Imposing +Lax +Lean +Limp +Lithe +Lopsided +Lovely +Malnourished +Mangled +Masculine +Messy +Muscular +Nimble +Petite +Pompous +Repulsive +Robust +Rough +Scarred +Scrawny +Sculpted +Shifty +Sickly +Sleek +Slender +Slimy +Slovenly +Sluggish +Spacy +Stiff +Stiff +Stony +Tense +Unattractive +Unblemished +Unhealthy +Unremarkable +Unsightly +Verbose +Vigorous +Waifish +Wilted +Wily +Withered +Worn-Out +Wrinkly \ No newline at end of file From 4a9e27b4368c644ba7b1d55dd937d667e5540594 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 04:36:00 -0300 Subject: [PATCH 03/38] fixes runtime --- code/modules/mob/living/carbon/human/human_say.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm index 69a803cd78ad..6b0c1ff1c768 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -30,7 +30,7 @@ return if_no_voice if(mind) var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling) - if(changeling?.mimicing) + if(changeling && changeling.mimicing) return changeling.mimicing var/special_voice = GetSpecialVoice() if(special_voice) From a7e6bbaaff8433a51fc10346af0968f657cf59a1 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 04:43:10 -0300 Subject: [PATCH 04/38] Update guestbook.dm --- code/datums/guestbook.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/guestbook.dm b/code/datums/guestbook.dm index a836ad1b99c4..5ba1a9419c17 100644 --- a/code/datums/guestbook.dm +++ b/code/datums/guestbook.dm @@ -59,7 +59,7 @@ return FALSE if(!visibility_checks(user, guest, silent)) return FALSE - var/given_name = input(user, "What name do you want to give to [guest]?") + var/given_name = input(user, "What name do you want to give to [guest]?", "Guestbook Name", "") if(!given_name) if(!silent) to_chat(user, span_warning("Nevermind.")) From 3246dc0fc5f41ad6c22e242581309a2e5d6da953 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 05:03:27 -0300 Subject: [PATCH 05/38] wtf --- code/__HELPERS/_lists.dm | 2 +- code/datums/chatmessage.dm | 2 +- code/datums/progressbar.dm | 2 +- code/game/atoms_movable.dm | 4 ++-- code/game/machinery/navbeacon.dm | 2 +- code/modules/mob/dead/dead.dm | 2 +- code/modules/mob/living/login.dm | 2 +- code/modules/mob/living/simple_animal/simple_animal.dm | 2 +- code/modules/mob/living/status_procs.dm | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm index 376e023940de..28e2464aa8a9 100644 --- a/code/__HELPERS/_lists.dm +++ b/code/__HELPERS/_lists.dm @@ -24,7 +24,7 @@ #define LAZYCLEARLIST(L) if(L) L.Cut() #define SANITIZE_LIST(L) (islist(L) ? L : list()) #define reverseList(L) reverseRange(L.Copy()) -#define LAZYADDASSOC(L, K, V) if(!L) { L = list(); } L[K] += list(V); +#define LAZYADDASSOC(L, K, V) if(!L) { L = list(); } L[K] += V; #define LAZYADDASSOCLIST(L, K, V) if(!L) { L = list(); } L[K] += list(V); #define LAZYREMOVEASSOC(L, K, V) if(L) { if(L[K]) { L[K] -= V; if(!length(L[K])) L -= K; } if(!length(L)) L = null; } #define LAZYACCESSASSOC(L, I, K) L ? L[I] ? L[I][K] ? L[I][K] : null : null : null diff --git a/code/datums/chatmessage.dm b/code/datums/chatmessage.dm index c27e0bd1b7ae..60b4db1d1ce9 100644 --- a/code/datums/chatmessage.dm +++ b/code/datums/chatmessage.dm @@ -182,7 +182,7 @@ message.maptext = complete_text // View the message - LAZYADDASSOC(owned_by.seen_messages, message_loc, src) + LAZYADDASSOCLIST(owned_by.seen_messages, message_loc, src) owned_by.images |= message animate(message, alpha = 255, time = CHAT_MESSAGE_SPAWN_TIME) diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm index 5ffa3778edc6..25621a613eeb 100644 --- a/code/datums/progressbar.dm +++ b/code/datums/progressbar.dm @@ -37,7 +37,7 @@ bar.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA user = User - LAZYADDASSOC(user.progressbars, bar_loc, src) + LAZYADDASSOCLIST(user.progressbars, bar_loc, src) var/list/bars = user.progressbars[bar_loc] listindex = bars.len diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 54ac77bb0a8c..b9b3ced28817 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -560,7 +560,7 @@ if(previous_virtual_z) LAZYREMOVEASSOC(SSmobs.players_by_virtual_z, "[previous_virtual_z]", src) if(new_virtual_z) - LAZYADDASSOC(SSmobs.players_by_virtual_z, "[new_virtual_z]", src) + LAZYADDASSOCLIST(SSmobs.players_by_virtual_z, "[new_virtual_z]", src) SSidlenpcpool.try_wakeup_virtual_z(new_virtual_z) /mob/dead/on_virtual_z_change(new_virtual_z, previous_virtual_z) @@ -570,7 +570,7 @@ if(previous_virtual_z) LAZYREMOVEASSOC(SSmobs.dead_players_by_virtual_z, "[previous_virtual_z]", src) if(new_virtual_z) - LAZYADDASSOC(SSmobs.dead_players_by_virtual_z, "[new_virtual_z]", src) + LAZYADDASSOCLIST(SSmobs.dead_players_by_virtual_z, "[new_virtual_z]", src) // Make sure you know what you're doing if you call this, this is intended to only be called by byond directly. // You probably want CanPass() diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index a847b44d39a1..b54c192f4407 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -49,7 +49,7 @@ if(previous_virtual_z) LAZYREMOVEASSOC(GLOB.navbeacons, "[previous_virtual_z]", src) if(new_virtual_z) - LAZYADDASSOC(GLOB.navbeacons, "[new_virtual_z]", src) + LAZYADDASSOCLIST(GLOB.navbeacons, "[new_virtual_z]", src) ..() // set the transponder codes assoc list from codes_txt diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index c09a3c8bd4c8..18bb8c9cd87d 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -103,7 +103,7 @@ INITIALIZE_IMMEDIATE(/mob/dead) . = ..() if(!client) return - LAZYADDASSOC(SSmobs.dead_players_by_virtual_z, "[virtual_z()]", src) + LAZYADDASSOCLIST(SSmobs.dead_players_by_virtual_z, "[virtual_z()]", src) /mob/dead/Logout() . = ..() diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index d59e3f77781e..62098a940937 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -18,7 +18,7 @@ var/virtual_z = virtual_z() - LAZYADDASSOC(SSmobs.players_by_virtual_z, "[virtual_z]", src) + LAZYADDASSOCLIST(SSmobs.players_by_virtual_z, "[virtual_z]", src) SSidlenpcpool.try_wakeup_virtual_z(virtual_z) //Vents diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index e4ead25880f9..3670e14a6405 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -636,7 +636,7 @@ switch(togglestatus) if(AI_Z_OFF) - LAZYADDASSOC(SSidlenpcpool.idle_mobs_by_virtual_level, virt_z, src) + LAZYADDASSOCLIST(SSidlenpcpool.idle_mobs_by_virtual_level, virt_z, src) else LAZYREMOVEASSOC(SSidlenpcpool.idle_mobs_by_virtual_level, virt_z, src) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 8eb5bc620722..d60755693489 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -478,11 +478,11 @@ for(var/listed_type in slowdown_type) if(ispath(listed_type)) listed_type = "[listed_type]" //Path2String - LAZYADDASSOC(movespeed_mod_immunities, listed_type, source) + LAZYADDASSOCLIST(movespeed_mod_immunities, listed_type, source) else if(ispath(slowdown_type)) slowdown_type = "[slowdown_type]" //Path2String - LAZYADDASSOC(movespeed_mod_immunities, slowdown_type, source) + LAZYADDASSOCLIST(movespeed_mod_immunities, slowdown_type, source) if(update) update_movespeed() From 4d479a4b0ebb4aec41500d7d4b74e0e15dfc417a Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 05:13:49 -0300 Subject: [PATCH 06/38] prettier --- tgui/packages/tgui/interfaces/Guestbook.tsx | 120 +++++++++----------- 1 file changed, 51 insertions(+), 69 deletions(-) diff --git a/tgui/packages/tgui/interfaces/Guestbook.tsx b/tgui/packages/tgui/interfaces/Guestbook.tsx index c2f7d7da242c..d1fb09aa8499 100644 --- a/tgui/packages/tgui/interfaces/Guestbook.tsx +++ b/tgui/packages/tgui/interfaces/Guestbook.tsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { useLocalState } from "../backend"; +import { useLocalState } from '../backend'; import { Stack, Button, Input, Section, Box } from '../components'; import { Window } from '../layouts'; @@ -14,78 +14,60 @@ type NameData = { export const Guestbook = (props, context) => { const { act, data } = useBackend(context); - const { - names = [], - } = data; + const { names = [] } = data; - const [lastNameBeforeEdit, setLastNameBeforeEdit] - = useLocalState(context, "lastNameBeforeEdit", null); + const [lastNameBeforeEdit, setLastNameBeforeEdit] = useLocalState< + string | null + >(context, 'lastNameBeforeEdit', null); return ( - + - {!names.length && ( -
- {"No known names!"} -
- ) - || ( - - {names.map(name => ( - -
- - -
-
- ))} -
- )} + {(!names.length &&
{'No known names!'}
) || ( + + {names.map((name) => ( + +
+ + +
+
+ ))} +
+ )}
); From 49218046fb6c8caeb0312a2b3a47d6b948ba85b3 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 05:38:22 -0300 Subject: [PATCH 07/38] look at those linters. --- code/modules/mob/living/carbon/human/human.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a74c744bfe8e..13fceef29d6f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1293,7 +1293,7 @@ . = ..() if(!user.mind?.guestbook) return - INVOKE_ASYNC(user.mind.guestbook, /datum/guestbook.proc/try_add_guest, user, src, FALSE) + INVOKE_ASYNC(user.mind.guestbook, TYPE_PROC_REF(/datum/guestbook, try_add_guest), user, src, FALSE) /mob/living/carbon/human/get_screentip_name(client/hovering_client) . = ..() From a4f13bbd6058e4d4374e81e068f2243c6aaeb7b5 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 05:46:19 -0300 Subject: [PATCH 08/38] Update human_helpers.dm --- code/modules/mob/living/carbon/human/human_helpers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 6ea6db2f8456..dfae2dc8187f 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -44,7 +44,7 @@ /mob/living/carbon/human/proc/get_face_name(if_no_face = get_generic_name(lowercase = TRUE)) if(wear_mask && (wear_mask.flags_inv & HIDEFACE)) //Wearing a mask which hides our face, use id-name if possible return if_no_face - if( head && (head.flags_inv & HIDEFACE) ) + if(head && (head.flags_inv & HIDEFACE) ) return if_no_face //Likewise for hats var/obj/item/bodypart/O = get_bodypart(BODY_ZONE_HEAD) if(!O || (HAS_TRAIT(src, TRAIT_DISFIGURED)) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name) //disfigured. use id-name if possible From fe2bdbb956f025648bb7835f4d9c19be5c0ab697 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 06:04:30 -0300 Subject: [PATCH 09/38] insanity --- code/modules/mob/living/carbon/human/human_helpers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index dfae2dc8187f..eb51a7e57753 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -44,7 +44,7 @@ /mob/living/carbon/human/proc/get_face_name(if_no_face = get_generic_name(lowercase = TRUE)) if(wear_mask && (wear_mask.flags_inv & HIDEFACE)) //Wearing a mask which hides our face, use id-name if possible return if_no_face - if(head && (head.flags_inv & HIDEFACE) ) + if(head && (head.flags_inv & HIDEFACE)) return if_no_face //Likewise for hats var/obj/item/bodypart/O = get_bodypart(BODY_ZONE_HEAD) if(!O || (HAS_TRAIT(src, TRAIT_DISFIGURED)) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name) //disfigured. use id-name if possible From 3a8b7ed2dcc0ffe44381f3ecb96d72d6357cb85c Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 06:35:13 -0300 Subject: [PATCH 10/38] sigh --- code/modules/client/preferences.dm | 2 +- code/modules/client/preferences_savefile.dm | 1 + code/modules/mob/living/carbon/human/human_helpers.dm | 3 +-- code/modules/mob/living/carbon/human/species_types/mothmen.dm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 4b8512715b94..05cef0c868fa 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -849,7 +849,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "[features["body_size"]]
" - dat += "

Character Adjective

" + dat += "

Character Adjective

" dat += "[generic_adjective]
" diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index fe5fc8efcc4e..b6f6e91b1bc3 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -405,6 +405,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car READ_FILE(S["jumpsuit_style"], jumpsuit_style) READ_FILE(S["uplink_loc"], uplink_spawn_loc) READ_FILE(S["phobia"], phobia) + READ_FILE(S["generic_adjective"], generic_adjective) READ_FILE(S["randomise"], randomise) READ_FILE(S["body_size"], features["body_size"]) READ_FILE(S["prosthetic_limbs"], prosthetic_limbs) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index eb51a7e57753..88dd938adfb3 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -228,8 +228,7 @@ if("she") visible_gender = "Woman" if("they") - //humans are people, mutants are not - if(ishumanbasic(src)) + if(ishuman(src)) visible_gender = "Person" else visible_gender = "Creature" diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index b512dc50b2bf..acf4db41af58 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -1,5 +1,5 @@ /datum/species/moth - name = "\improper Mothperson" + name = "\improper Mothfolk" id = SPECIES_MOTH default_color = "00FF00" species_traits = list(LIPS, NOEYESPRITES, TRAIT_ANTENNAE, HAIR, EMOTE_OVERLAY) From df7ed0c23638a0cc04681ada438d7dc76ec6b247 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 11:26:22 -0300 Subject: [PATCH 11/38] i Love Mulch --- code/game/objects/effects/landmarks.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index c8332e1dd0cd..2325c227a211 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -45,7 +45,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark) . = ..() GLOB.start_landmarks_list += src if(jobspawn_override) - LAZYADDASSOC(GLOB.jobspawn_overrides, name, src) + LAZYADDASSOCLIST(GLOB.jobspawn_overrides, name, src) if(name != "start") tag = "start*[name]" From c8f23db8d15a8bb1eee7814535334572ec2c71a7 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 26 Feb 2024 13:15:43 -0300 Subject: [PATCH 12/38] hopefully makes it so guestbook saves to character slots --- code/controllers/subsystem/persistence.dm | 13 +++++++++++++ code/modules/client/preferences.dm | 3 +++ code/modules/client/preferences_savefile.dm | 6 ++++++ code/modules/mob/dead/new_player/new_player.dm | 2 ++ 4 files changed, 24 insertions(+) diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index ad8bad1e1d9b..1127467a7110 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -89,6 +89,7 @@ SUBSYSTEM_DEF(persistence) SavePaintings() save_custom_outfits() SavePanicBunker() + SaveGuestBooks() /datum/controller/subsystem/persistence/proc/GetPhotoAlbums() var/album_path = file("data/photo_albums.json") @@ -255,6 +256,18 @@ SUBSYSTEM_DEF(persistence) fdel(json_file) WRITE_FILE(json_file, json_encode(paintings)) +/datum/controller/subsystem/persistence/proc/SaveGuestBooks() + for(var/player in GLOB.joined_player_list) + var/mob/living/carbon/human/guy = get_mob_by_ckey(player) + if(!istype(guy) || !guy.mind || !guy.mind.guestbook || !guy.client) + continue + + var/mob/living/carbon/human/guy_spawned_as = guy.mind.original_character + if(!(guy == guy_spawned_as)) + return + guy.client.prefs.guestbook_names = guy.mind.guestbook.known_names + guy.client.prefs.save_character() + /datum/controller/subsystem/persistence/proc/load_custom_outfits() var/file = file("data/custom_outfits.json") if(!fexists(file)) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 05cef0c868fa..5e034bae1dcc 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -160,6 +160,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/prefered_security_department = SEC_DEPT_RANDOM var/generic_adjective = "Unremarkable" + // the list of known guestbook names we have saved + var/list/guestbook_names = list() + //Quirk list var/list/all_quirks = list() diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index b6f6e91b1bc3..33226271374c 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -455,6 +455,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car READ_FILE(S["fbp"], fbp) + // guestbook names + READ_FILE(S["guestbook_names"], guestbook_names) + //Custom names for(var/custom_name_id in GLOB.preferences_custom_names) var/savefile_slot_name = custom_name_id + "_name" //TODO remove this @@ -520,6 +523,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car exowear = sanitize_inlist(exowear, GLOB.exowearlist, initial(exowear)) uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, GLOB.uplink_spawn_loc_list, initial(uplink_spawn_loc)) fbp = sanitize_integer(fbp, FALSE, TRUE, FALSE) + guestbook_names = SANITIZE_LIST(guestbook_names) features["grad_style"] = sanitize_inlist(features["grad_style"], GLOB.hair_gradients_list) features["grad_color"] = sanitize_hexcolor(features["grad_color"]) features["body_size"] = sanitize_inlist(features["body_size"], GLOB.body_sizes, "Normal") @@ -633,6 +637,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["feature_elzu_horns"] , features["elzu_horns"]) WRITE_FILE(S["feature_tail_elzu"] , features["tail_elzu"]) WRITE_FILE(S["fbp"] , fbp) + // guestbook names + WRITE_FILE(S["guestbook_names"] , guestbook_names) //Flavor text WRITE_FILE(S["feature_flavor_text"] , features["flavor_text"]) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 9baa46f526b5..aab7fe84abdf 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -425,6 +425,8 @@ is_antag = TRUE client.prefs.copy_to(H, antagonist = is_antag) + if(client.prefs.guestbook_names) + mind.guestbook.known_names += client.prefs.guestbook_names update_names_joined_list(H.real_name) H.dna.update_dna_identity() if(mind) From b44d680ad3a169d726567d4a4f8be72b887c9c5c Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Tue, 27 Feb 2024 00:06:22 -0300 Subject: [PATCH 13/38] ert know each other --- code/modules/admin/verbs/one_click_antag.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index e1f88a2626b2..cd2204dbbd5d 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -473,6 +473,16 @@ teamSpawned++ if(teamSpawned) + // guestbook + for(var/datum/mind/member in ert_team.members) + var/member_mob = member.current + for(var/datum/mind/other_member in ert_team.members) + // skip yourself + if(other_member.name == member.name) + continue + var/mob/living/carbon/human/other_member_mob = other_member.current + member.guestbook.add_guest(member_mob, other_member_mob, other_member_mob.real_name, other_member_mob.real_name, TRUE) + message_admins("[ertemplate.rename_team] has spawned with the mission: [ertemplate.mission]") //Open the Armory doors From 5fdfdf38726a808bfc16b0bcab76d5edca021aa8 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Tue, 27 Feb 2024 01:27:22 -0300 Subject: [PATCH 14/38] know your crew --- code/__DEFINES/jobs.dm | 10 ---------- code/modules/jobs/job_types/_job.dm | 20 ------------------- .../overmap/ships/controlled_ship_datum.dm | 19 ++++++++++++++++++ 3 files changed, 19 insertions(+), 30 deletions(-) diff --git a/code/__DEFINES/jobs.dm b/code/__DEFINES/jobs.dm index f8a2dca70a95..21eb9b40e066 100644 --- a/code/__DEFINES/jobs.dm +++ b/code/__DEFINES/jobs.dm @@ -55,13 +55,3 @@ #define JOB_DISPLAY_ORDER_DEFAULT 80 #define JOB_DISPLAY_ORDER_ASSISTANT 999 - -// ~guestbook_flags variable on datum/job -/// We will know absolutely everyone, no matter the faction or ship -#define GUESTBOOK_OMNISCIENT (1 << 0) -/// We will know others in our ship -#define GUESTBOOK_SHIP (1 << 1) -/// We will know others in our faction -#define GUESTBOOK_FACTION (1 << 2) -/// We will not be known by others, even if they pass checks in any way otherwise -#define GUESTBOOK_FORGETMENOT (1 << 3) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 8a9d6e06c0ab..7858aa94fbe6 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -25,9 +25,6 @@ var/display_order = JOB_DISPLAY_ORDER_DEFAULT - ///Guestbook flags, to establish who knowns who etc - var/guestbook_flags = GUESTBOOK_SHIP - ///Levels unlocked at roundstart in physiology var/list/roundstart_experience @@ -35,23 +32,6 @@ if(new_name) name = new_name outfit = new_outfit - -/* if(!(guestbook_flags & GUESTBOOK_FORGETMENOT)) // BIG FUCKING TODO: make this work with ship and faction - for(var/mob/living/carbon/human/dude as anything in GLOB.human_list) - if((dude == spawned) || !dude.mind?.assigned_role) - continue - var/datum/job/dudes_job = dude.mind.assigned_role - var/same_faction = dude.faction_check_mob(src) - //if we satisfy at least one condition, add us to their guestbook - if(dudes_job.guestbook_flags & GUESTBOOK_OMNISCIENT || \ - ((dudes_job.guestbook_flags & GUESTBOOK_SHIP) && (dude.mind.original_ship == src.mind.original_ship)) || \ - ((dudes_job.guestbook_flags & GUESTBOOK_FACTION) && same_faction)) - dude.mind.guestbook.add_guest(dude, spawned, spawned.mind.name, spawned.mind.name, silent = TRUE) - //if we satisfy at least one condition, add them to our guestbook - if(guestbook_flags & GUESTBOOK_OMNISCIENT || \ - ((guestbook_flags & GUESTBOOK_SHIP) && (src.mind.original_ship == dude.mind.original_ship)) || \ - ((guestbook_flags & GUESTBOOK_FACTION) && same_faction)) - spawned.mind.guestbook.add_guest(spawned, dude, dude.mind.name, dude.mind.name, silent = TRUE) */ register() /datum/job/proc/register() diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index da35c3b9df9c..6e82f2386b2a 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -293,6 +293,25 @@ RegisterSignal(H.mind, COMSIG_PARENT_QDELETING, PROC_REF(crew_mind_deleting)) if(!owner_mob) set_owner_mob(H) + addMobToCrewGuestbook(H) + + +/** + * adds a mob's real name to a crew's guestbooks + * + * * H - human mob to add to the crew's guestbooks + */ +/datum/overmap/ship/controlled/proc/addMobToCrewGuestbook(mob/living/carbon/human/H) + // get the things in the manifest + for(var/guy in manifest) + // find their mob + var/mob/living/carbon/human/crewmember = GLOB.human_list[guy] + // check if they have a guestbook + if(!crewmember || !crewmember.mind || !crewmember.mind.guestbook || crewmember.real_name == H.real_name) + continue + // add H to the crewmember's guestbook and viceversa + crewmember.mind.guestbook.add_guest(crewmember, H, H.real_name, H.real_name, TRUE) + H.mind.guestbook.add_guest(H, crewmember, crewmember.real_name, crewmember.real_name, TRUE) /datum/overmap/ship/controlled/proc/set_owner_mob(mob/new_owner) if(owner_mob) From c7a0458845751dd4559424c58b6c9cb41277f42c Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Thu, 29 Feb 2024 00:07:00 -0300 Subject: [PATCH 15/38] obliterate persistence, damage control FUCK --- code/controllers/subsystem/persistence.dm | 13 ------------- code/modules/client/preferences.dm | 4 ---- code/modules/client/preferences_savefile.dm | 6 ------ code/modules/mob/dead/new_player/new_player.dm | 5 ++--- code/modules/mob/living/carbon/human/examine.dm | 2 +- .../mob/living/carbon/human/human_helpers.dm | 8 +------- .../living/carbon/human/species_types/mothmen.dm | 2 +- code/modules/overmap/ships/controlled_ship_datum.dm | 2 -- 8 files changed, 5 insertions(+), 37 deletions(-) diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index 1127467a7110..ad8bad1e1d9b 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -89,7 +89,6 @@ SUBSYSTEM_DEF(persistence) SavePaintings() save_custom_outfits() SavePanicBunker() - SaveGuestBooks() /datum/controller/subsystem/persistence/proc/GetPhotoAlbums() var/album_path = file("data/photo_albums.json") @@ -256,18 +255,6 @@ SUBSYSTEM_DEF(persistence) fdel(json_file) WRITE_FILE(json_file, json_encode(paintings)) -/datum/controller/subsystem/persistence/proc/SaveGuestBooks() - for(var/player in GLOB.joined_player_list) - var/mob/living/carbon/human/guy = get_mob_by_ckey(player) - if(!istype(guy) || !guy.mind || !guy.mind.guestbook || !guy.client) - continue - - var/mob/living/carbon/human/guy_spawned_as = guy.mind.original_character - if(!(guy == guy_spawned_as)) - return - guy.client.prefs.guestbook_names = guy.mind.guestbook.known_names - guy.client.prefs.save_character() - /datum/controller/subsystem/persistence/proc/load_custom_outfits() var/file = file("data/custom_outfits.json") if(!fexists(file)) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 5e034bae1dcc..02b12f8243ed 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -159,10 +159,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/preferred_ai_core_display = "Blue" var/prefered_security_department = SEC_DEPT_RANDOM var/generic_adjective = "Unremarkable" - - // the list of known guestbook names we have saved - var/list/guestbook_names = list() - //Quirk list var/list/all_quirks = list() diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 33226271374c..b6f6e91b1bc3 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -455,9 +455,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car READ_FILE(S["fbp"], fbp) - // guestbook names - READ_FILE(S["guestbook_names"], guestbook_names) - //Custom names for(var/custom_name_id in GLOB.preferences_custom_names) var/savefile_slot_name = custom_name_id + "_name" //TODO remove this @@ -523,7 +520,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car exowear = sanitize_inlist(exowear, GLOB.exowearlist, initial(exowear)) uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, GLOB.uplink_spawn_loc_list, initial(uplink_spawn_loc)) fbp = sanitize_integer(fbp, FALSE, TRUE, FALSE) - guestbook_names = SANITIZE_LIST(guestbook_names) features["grad_style"] = sanitize_inlist(features["grad_style"], GLOB.hair_gradients_list) features["grad_color"] = sanitize_hexcolor(features["grad_color"]) features["body_size"] = sanitize_inlist(features["body_size"], GLOB.body_sizes, "Normal") @@ -637,8 +633,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["feature_elzu_horns"] , features["elzu_horns"]) WRITE_FILE(S["feature_tail_elzu"] , features["tail_elzu"]) WRITE_FILE(S["fbp"] , fbp) - // guestbook names - WRITE_FILE(S["guestbook_names"] , guestbook_names) //Flavor text WRITE_FILE(S["feature_flavor_text"] , features["flavor_text"]) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index aab7fe84abdf..e9cc089d7a2c 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -249,8 +249,8 @@ observer.client.init_verbs() observer.update_appearance() observer.stop_sound_channel(CHANNEL_LOBBYMUSIC) - deadchat_broadcast(" has observed.", "[observer.real_name]", follow_target = observer, turf_target = get_turf(observer), message_type = DEADCHAT_DEATHRATTLE) QDEL_NULL(mind) + deadchat_broadcast(" has observed.", "[observer.real_name]", follow_target = observer, turf_target = get_turf(observer), message_type = DEADCHAT_DEATHRATTLE) qdel(src) return TRUE @@ -329,6 +329,7 @@ var/mob/living/carbon/human/humanc = character ship.manifest_inject(humanc, client, job) GLOB.data_core.manifest_inject(humanc, client) + ship.addMobToCrewGuestbook(humanc) AnnounceArrival(humanc, job.name, ship) AddEmploymentContract(humanc) SSblackbox.record_feedback("tally", "species_spawned", 1, humanc.dna.species.name) @@ -425,8 +426,6 @@ is_antag = TRUE client.prefs.copy_to(H, antagonist = is_antag) - if(client.prefs.guestbook_names) - mind.guestbook.known_names += client.prefs.guestbook_names update_names_joined_list(H.real_name) H.dna.update_dna_identity() if(mind) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index d9d54310ff43..aa4de0b0ee17 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -31,7 +31,7 @@ var/actually = (known_name != name) ? "actually " : "really " . += "Oh, it's [actually][known_name]!" else - . += "You don't recognize [t_him]." + . += "You don't recognize [t_him]. You can Ctrl-Shift click [t_his] to memorize their face." else . += "You can't see [t_his] face very well." else diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 88dd938adfb3..f855226378ea 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -208,14 +208,8 @@ var/visible_age = get_age() if(visible_age) visible_age = "[visible_age] " - var/visible_skin - //i am not quite sure how to implement a check for skin tone/species visibility so uhh, get fucked i guess? - if(dna.species.use_skintones) - visible_skin = GLOB.skin_tones[skin_tone] ? "[GLOB.skin_tones[skin_tone]] " : null - else - visible_skin = "[dna.species.name] " var/visible_gender = get_gender() - var/final_string = "[visible_adjective][visible_age][visible_skin][visible_gender]" + var/final_string = "[visible_adjective][visible_age][visible_gender]" if(prefixed) final_string = "\A [final_string]" return lowercase ? lowertext(final_string) : final_string diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index acf4db41af58..b512dc50b2bf 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -1,5 +1,5 @@ /datum/species/moth - name = "\improper Mothfolk" + name = "\improper Mothperson" id = SPECIES_MOTH default_color = "00FF00" species_traits = list(LIPS, NOEYESPRITES, TRAIT_ANTENNAE, HAIR, EMOTE_OVERLAY) diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index 16829c082dc3..a5807afda8a8 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -297,8 +297,6 @@ RegisterSignal(H.mind, COMSIG_PARENT_QDELETING, PROC_REF(crew_mind_deleting)) if(!owner_mob) set_owner_mob(H) - addMobToCrewGuestbook(H) - /** * adds a mob's real name to a crew's guestbooks From 1f241e454cc864a6bbd016d763e823026a9e5808 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Thu, 29 Feb 2024 00:26:05 -0300 Subject: [PATCH 16/38] no middle aged positronics --- code/modules/mob/living/carbon/human/human_helpers.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index f855226378ea..97f59e8df5c6 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -180,7 +180,7 @@ /mob/living/carbon/human/proc/get_age() var/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) - if((obscured & ITEM_SLOT_ICLOTHING) && skipface) + if((obscured & ITEM_SLOT_ICLOTHING) && skipface || isipc(src)) return "" switch(age) if(70 to INFINITY) @@ -216,6 +216,9 @@ /mob/living/carbon/human/proc/get_gender() var/visible_gender = p_they() + if(isipc(src)) + visible_gender = "Positronic" + return visible_gender switch(visible_gender) if("he") visible_gender = "Man" From b4c47ccbf8251ea3679083b548a77013b15ae4c1 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Thu, 29 Feb 2024 00:35:06 -0300 Subject: [PATCH 17/38] observer check --- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/mob/mob.dm | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 13fceef29d6f..4f6622ce6d9f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1291,7 +1291,7 @@ /mob/living/carbon/human/CtrlShiftClick(mob/user) . = ..() - if(!user.mind?.guestbook) + if(isobserver(user) || !user.mind?.guestbook) return INVOKE_ASYNC(user.mind.guestbook, TYPE_PROC_REF(/datum/guestbook, try_add_guest), user, src, FALSE) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 680406c3ecb5..6f3a17ea97e2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -689,6 +689,10 @@ set name = "Guestbook" set category = "IC" set desc = "View your character's Guestbook." + // the reason why there are two observer checks in here is because the mind datum sometimes carries over to ghosts. + // this is something i should probably fix instead of adding a fallback check, but... + if(isobserver(src)) + to_chat(src, span_warning("You have to be in the current round to do that!")) if(!mind) var/fail_message = "You have no mind!" if(isobserver(src)) From f704f30093b3a27ca568af0e0d9c3df57a8bdeef Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Thu, 29 Feb 2024 01:20:54 -0300 Subject: [PATCH 18/38] know your crewmembers (for real this time) --- .../overmap/ships/controlled_ship_datum.dm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index a5807afda8a8..7f734c56269b 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -304,16 +304,15 @@ * * H - human mob to add to the crew's guestbooks */ /datum/overmap/ship/controlled/proc/addMobToCrewGuestbook(mob/living/carbon/human/H) - // get the things in the manifest - for(var/guy in manifest) - // find their mob - var/mob/living/carbon/human/crewmember = GLOB.human_list[guy] + // get the names in the manifest + for(var/crewmember_name in manifest) + // iterate over the human list to try to find their mob + for(var/mob/living/carbon/human/crewmember in GLOB.human_list) // check if they have a guestbook - if(!crewmember || !crewmember.mind || !crewmember.mind.guestbook || crewmember.real_name == H.real_name) - continue - // add H to the crewmember's guestbook and viceversa - crewmember.mind.guestbook.add_guest(crewmember, H, H.real_name, H.real_name, TRUE) - H.mind.guestbook.add_guest(H, crewmember, crewmember.real_name, crewmember.real_name, TRUE) + if(crewmember.real_name == crewmember_name && crewmember.mind && crewmember.mind.guestbook && !(crewmember.real_name == H.real_name)) + // add the mob to the crewmember's guestbook and viceversa + crewmember.mind.guestbook.add_guest(crewmember, H, H.real_name, H.real_name, TRUE) + H.mind.guestbook.add_guest(H, crewmember, crewmember.real_name, crewmember.real_name, TRUE) /datum/overmap/ship/controlled/proc/set_owner_mob(mob/new_owner) if(owner_mob) From d7d28088f8e0c06fa3a8fe3b5f7c5134d30f2a7d Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Thu, 29 Feb 2024 02:47:06 -0300 Subject: [PATCH 19/38] admin observer check, adding guest defaults to visible name --- code/datums/guestbook.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/guestbook.dm b/code/datums/guestbook.dm index 5ba1a9419c17..99104f09d715 100644 --- a/code/datums/guestbook.dm +++ b/code/datums/guestbook.dm @@ -59,7 +59,7 @@ return FALSE if(!visibility_checks(user, guest, silent)) return FALSE - var/given_name = input(user, "What name do you want to give to [guest]?", "Guestbook Name", "") + var/given_name = input(user, "What name do you want to give to [guest]?", "Guestbook Name", guest.get_visible_name()) if(!given_name) if(!silent) to_chat(user, span_warning("Nevermind.")) @@ -126,7 +126,7 @@ return TRUE /datum/guestbook/proc/get_known_name(mob/user, mob/living/carbon/guest, real_name) - if(user == guest) + if(user == guest || isAdminObserver(user)) return real_name return LAZYACCESS(known_names, real_name) From 6fd46997165036c5bef25628ec4996f6ef8820c0 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Thu, 29 Feb 2024 12:40:54 -0300 Subject: [PATCH 20/38] ipc adjectives --- code/__HELPERS/mobs.dm | 6 +++ code/_globalvars/lists/names.dm | 1 + code/modules/admin/create_mob.dm | 2 +- code/modules/client/preferences.dm | 7 +++- strings/ipc_preference_adjectives.txt | 56 +++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 strings/ipc_preference_adjectives.txt diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index fdeadc13b61a..8437730c3844 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -217,6 +217,12 @@ GLOBAL_LIST_INIT(skin_tones, sortList(list( "african2" ))) +/proc/pick_species_adjective(mob/living/carbon/human/H) + if(isipc(H)) + return pick(GLOB.ipc_preference_adjectives) + else + return pick(GLOB.preference_adjectives) + GLOBAL_LIST_EMPTY(species_list) /proc/age2agedescription(age) diff --git a/code/_globalvars/lists/names.dm b/code/_globalvars/lists/names.dm index f6a141c51e67..ff452072fbec 100644 --- a/code/_globalvars/lists/names.dm +++ b/code/_globalvars/lists/names.dm @@ -28,6 +28,7 @@ GLOBAL_LIST_INIT(ing_verbs, world.file2list("strings/names/ing_verbs.txt")) GLOBAL_LIST_INIT(adverbs, world.file2list("strings/names/adverbs.txt")) GLOBAL_LIST_INIT(adjectives, world.file2list("strings/names/adjectives.txt")) GLOBAL_LIST_INIT(preference_adjectives, world.file2list("strings/preference_adjectives.txt")) +GLOBAL_LIST_INIT(ipc_preference_adjectives, world.file2list("strings/ipc_preference_adjectives.txt")) GLOBAL_LIST_INIT(dream_strings, world.file2list("strings/dreamstrings.txt")) //loaded on startup because of " //would include in rsc if ' was used diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index ed01a53aada3..7d5dfccf2804 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -23,7 +23,7 @@ H.facial_hair_color = H.hair_color H.eye_color = random_eye_color() H.dna.blood_type = random_blood_type() - H.generic_adjective = pick(GLOB.preference_adjectives) + H.generic_adjective = pick_species_adjective(H) // Mutant randomizing, doesn't affect the mob appearance unless it's the specific mutant. H.dna.features["mcolor"] = random_short_color() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 02b12f8243ed..c3da69eaae8a 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -159,6 +159,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/preferred_ai_core_display = "Blue" var/prefered_security_department = SEC_DEPT_RANDOM var/generic_adjective = "Unremarkable" + var/voice_adjective = "Plain" //Quirk list var/list/all_quirks = list() @@ -2076,7 +2077,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) phobia = phobiaType if("generic_adjective") - var/selectAdj = input(user, "In one word, how would you describe your character?", "Character Preference", generic_adjective) as null|anything in GLOB.preference_adjectives + var/selectAdj + if(istype(pref_species, /datum/species/ipc)) + selectAdj = input(user, "In one word, how would you describe your character's appereance?", "Character Preference", generic_adjective) as null|anything in GLOB.ipc_preference_adjectives + else + selectAdj = input(user, "In one word, how would you describe your character's appereance?", "Character Preference", generic_adjective) as null|anything in GLOB.preference_adjectives if(selectAdj) generic_adjective = selectAdj diff --git a/strings/ipc_preference_adjectives.txt b/strings/ipc_preference_adjectives.txt new file mode 100644 index 000000000000..249a9a8f517a --- /dev/null +++ b/strings/ipc_preference_adjectives.txt @@ -0,0 +1,56 @@ +Bedraggled +Brawny +Bulky +Burly +Calm +Charming +Delicate +Disgusting +Disturbing +Dull +Effeminate +Elegant +Exotic +Faint +Flamboyant +Fragile +Frail +Gentle +Hefty +Imposing +Lax +Lean +Limp +Lithe +Lopsided +Lovely +Mangled +Masculine +Messy +Nimble +Petite +Pompous +Repulsive +Rusted +Robust +Rough +Scarred +Shifty +Sickly +Sleek +Slender +Slovenly +Sluggish +Spacy +Stiff +Stony +Unattractive +Unremarkable +Unsightly +Verbose +Vigorous +Waifish +Wilted +Wily +Withered +Worn-Out \ No newline at end of file From 11a9d9982f625bc76dde7fd5f02fe4b3d342946f Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Fri, 1 Mar 2024 07:20:20 -0300 Subject: [PATCH 21/38] changes how ID cards work --- code/__DEFINES/mobs.dm | 2 +- code/game/objects/items/cards_ids.dm | 56 ++++++------------- .../mob/living/carbon/human/examine.dm | 5 +- code/modules/mob/living/carbon/human/human.dm | 3 - .../mob/living/carbon/human/human_helpers.dm | 4 -- code/modules/mob/mob.dm | 1 + 6 files changed, 21 insertions(+), 50 deletions(-) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index ad9d5ae5abc8..f0b505114646 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -335,7 +335,7 @@ #define SHADOW_SPECIES_LIGHT_THRESHOLD 0.2 //MINOR TWEAKS/MISC -#define AGE_MIN 17 //youngest a character can be +#define AGE_MIN 18 //youngest a character can be #define AGE_MAX 85 //oldest a character can be #define AGE_MINOR 20 //legal age of space drinking and smoking #define WIZARD_AGE_MIN 30 //youngest a wizard can be diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index ad440817942b..c8f646ee9877 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -140,8 +140,8 @@ playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE) /obj/item/card/id - name = "identification card" - desc = "A card used to provide ID and determine access across the station." + name = "access card" + desc = "These cards provide access to different sections of a ship." icon_state = "id" item_state = "card-id" lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' @@ -159,7 +159,7 @@ var/obj/machinery/paystand/my_store var/uses_overlays = TRUE var/icon/cached_flat_icon - var/registered_age = 13 // default age for ss13 players + var/registered_age = 18 // default age for ss13 players var/job_icon var/faction_icon @@ -330,7 +330,7 @@ /obj/item/card/id/examine(mob/user) . = ..() if(registered_account) - . += "The account linked to the ID belongs to '[registered_account.account_holder]' and reports a balance of [registered_account.account_balance] cr." + . += "The account linked to the card reports a balance of [registered_account.account_balance] cr." if(registered_account.frozen) . += "The linked account is frozen, and cannot be withdrawn from or deposited into!" . += "There's more information below, you can look again to take a closer look..." @@ -338,6 +338,8 @@ /obj/item/card/id/examine_more(mob/user) var/list/msg = list("You examine [src] closer, and note the following...") + if(registered_name) + msg += "This access card is assigned to [registered_name]." if(registered_age) msg += "The card indicates that the holder is [registered_age] years old. [(registered_age < AGE_MINOR) ? "There's a holographic stripe that reads 'MINOR: DO NOT SERVE ALCOHOL OR TOBACCO' along the bottom of the card." : ""]" if(mining_points) @@ -415,17 +417,16 @@ /* Usage: update_label() - Sets the id name to whatever registered_name and assignment is + Sets the id name to whatever the assignment is */ /obj/item/card/id/proc/update_label() - var/blank = !registered_name - name = "[blank ? initial(name) : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]" + name = "[initial(name)][(!assignment) ? "" : " ([assignment])"]" update_appearance() /obj/item/card/id/silver - name = "silver identification card" - desc = "A silver card which shows honour and dedication." + name = "silver access card" + desc = "A silver-colored card, usually given to higher-ranking officials in ships and stations." icon_state = "silver" item_state = "silver_id" lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' @@ -438,7 +439,7 @@ update_label() /obj/item/card/id/gold name = "gold identification card" - desc = "A golden card which shows power and might." + desc = "A golden-colored card, usually given to those at the top of the hierarchy in a ship." icon_state = "gold" item_state = "gold_id" lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' @@ -541,10 +542,8 @@ update_label() access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER) /obj/item/card/id/syndicate_command - name = "syndicate ID card" - desc = "An ID straight from the Syndicate." - registered_name = "Syndicate" - assignment = "Syndicate Overlord" + name = "syndicate access card" + desc = "An access card widely utilized by Coalition splinters in the frontier." icon_state = "syndie" access = list(ACCESS_SYNDICATE) uses_overlays = FALSE @@ -578,15 +577,12 @@ update_label() /obj/item/card/id/patient //Aegis ID assignment = "Long Term Patient" uses_overlays = FALSE - access = list(ACCESS_SYNDICATE) /obj/item/card/id/captains_spare - desc = "The spare ID of the High Lord himself." icon_state = "gold" item_state = "gold_id" lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi' - registered_name = "Captain" assignment = "Captain" registered_age = null @@ -605,11 +601,9 @@ update_label() ..() /obj/item/card/id/centcom - name = "\improper CentCom ID" - desc = "An ID straight from Central Command." + name = "\improper Nanotrasen Central Command access card" + desc = "An access card sourced from Nanotrasen's Central Command." icon_state = "centcom" - registered_name = "Central Command" - assignment = "Central Command" uses_overlays = FALSE registered_age = null @@ -624,8 +618,6 @@ update_label() name = "\improper CentCom ID" desc = "An ERT ID card." icon_state = "ert_commander" - registered_name = "Emergency Response Team Commander" - assignment = "Emergency Response Team Commander" uses_overlays = FALSE registered_age = null @@ -634,8 +626,6 @@ update_label() . = ..() /obj/item/card/id/ert/security - registered_name = "Security Response Officer" - assignment = "Security Response Officer" icon_state = "ert_security" /obj/item/card/id/ert/security/Initialize() @@ -643,8 +633,6 @@ update_label() . = ..() /obj/item/card/id/ert/engineer - registered_name = "Engineering Response Officer" - assignment = "Engineering Response Officer" icon_state = "ert_engineer" /obj/item/card/id/ert/engineer/Initialize() @@ -652,8 +640,6 @@ update_label() . = ..() /obj/item/card/id/ert/medical - registered_name = "Medical Response Officer" - assignment = "Medical Response Officer" icon_state = "ert_medic" /obj/item/card/id/ert/medical/Initialize() @@ -661,8 +647,6 @@ update_label() . = ..() /obj/item/card/id/ert/chaplain - registered_name = "Religious Response Officer" - assignment = "Religious Response Officer" icon_state = "ert_chaplain" /obj/item/card/id/ert/chaplain/Initialize() @@ -670,8 +654,6 @@ update_label() . = ..() /obj/item/card/id/ert/janitor - registered_name = "Janitorial Response Officer" - assignment = "Janitorial Response Officer" icon_state = "ert_janitor" /obj/item/card/id/ert/janitor/Initialize() @@ -679,8 +661,6 @@ update_label() . = ..() /obj/item/card/id/ert/clown - registered_name = "Entertainment Response Officer" - assignment = "Entertainment Response Officer" icon_state = "ert_clown" /obj/item/card/id/ert/clown/Initialize() @@ -688,12 +668,10 @@ update_label() . = ..() /obj/item/card/id/ert/deathsquad - name = "\improper Death Squad ID" - desc = "A Death Squad ID card." + desc = "An access card colored in black and red." icon_state = "deathsquad" //NO NO SIR DEATH SQUADS ARENT A PART OF NANOTRASEN AT ALL - registered_name = "Death Commando" - assignment = "Death Commando" uses_overlays = FALSE + job_icon = "deathsquad" /obj/item/card/id/debug name = "\improper Debug ID" diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index aa4de0b0ee17..e37491cdcb1b 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -28,10 +28,9 @@ //if we have no guestbook, we just KNOW okay? var/known_name = user.mind?.guestbook ? user.mind.guestbook.get_known_name(user, src, face_name) : face_name if(known_name) - var/actually = (known_name != name) ? "actually " : "really " - . += "Oh, it's [actually][known_name]!" + . += "You know them as [known_name]." else - . += "You don't recognize [t_him]. You can Ctrl-Shift click [t_his] to memorize their face." + . += "You don't recognize [t_him]. You can Ctrl-Shift click [t_him] to memorize their face." else . += "You can't see [t_his] face very well." else diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4f6622ce6d9f..eae872f69fc0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1303,9 +1303,6 @@ var/face_name = get_face_name("") var/known_name = hovering_mob.mind.guestbook.get_known_name(hovering_mob, src, face_name) if(known_name) - var/id_name = get_id_name("") - if(id_name && (known_name != id_name)) - return "[known_name] (as [id_name])" return known_name return . diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 97f59e8df5c6..002bcc66c465 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -31,13 +31,9 @@ return pda.owner return if_no_id -//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a separate proc as it'll be useful elsewhere /mob/living/carbon/human/get_visible_name() if(name_override) return name_override - var/id_name = get_id_name("") - if(id_name) - return id_name return get_generic_name(lowercase = TRUE) //Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when Fluacided or when updating a human's name variable diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6f3a17ea97e2..151ea515052b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -693,6 +693,7 @@ // this is something i should probably fix instead of adding a fallback check, but... if(isobserver(src)) to_chat(src, span_warning("You have to be in the current round to do that!")) + return if(!mind) var/fail_message = "You have no mind!" if(isobserver(src)) From ba75ae085cbc32c6e61e7ae283911dc0ca949ded Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Fri, 1 Mar 2024 07:49:57 -0300 Subject: [PATCH 22/38] Update preference_adjectives.txt --- strings/preference_adjectives.txt | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/strings/preference_adjectives.txt b/strings/preference_adjectives.txt index 7d80a5cb8026..0cfe96001361 100644 --- a/strings/preference_adjectives.txt +++ b/strings/preference_adjectives.txt @@ -1,21 +1,27 @@ +Angsty +Awkward Bedraggled Blemished Bony Brawny +Breathtaking Bruised Bulky Burly Calm Charming Chubby +Coarse Deformed Delicate +Despondent Disgusting Disturbing Dull Effeminate Elegant Emaciated +Energetic Exotic Faint Flabby @@ -23,10 +29,15 @@ Flamboyant Fragile Frail Frazzled +Gaunt Gentle +Gloomy +Gormless +Hawkish Healthy Hefty Imposing +Inscrutable Lax Lean Limp @@ -35,30 +46,45 @@ Lopsided Lovely Malnourished Mangled +Mangled Masculine Messy Muscular Nimble +Pathetic +Peppy Petite Pompous +Quievering +Radical Repulsive Robust +Roguish Rough Scarred Scrawny Sculpted Shifty +Shrewd Sickly +Skittish Sleek Slender Slimy Slovenly Sluggish +Sly +Smooth +Sniveling +Soulrendered Spacy Stiff -Stiff Stony +Strapping +Sturdy +Swarthy Tense +Tubular Unattractive Unblemished Unhealthy @@ -71,4 +97,4 @@ Wilted Wily Withered Worn-Out -Wrinkly \ No newline at end of file +Wrinkly From 3790d137f5dde93d36044e78649572a679a0eb8d Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Fri, 1 Mar 2024 07:55:32 -0300 Subject: [PATCH 23/38] no voice adjective --- code/modules/client/preferences.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index c3da69eaae8a..3fd81b42f774 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -159,7 +159,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/preferred_ai_core_display = "Blue" var/prefered_security_department = SEC_DEPT_RANDOM var/generic_adjective = "Unremarkable" - var/voice_adjective = "Plain" //Quirk list var/list/all_quirks = list() From 5c687117d5aedaa88dfc7e9af92842a3cb62f67e Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Fri, 1 Mar 2024 15:41:42 -0300 Subject: [PATCH 24/38] Update admin.dm --- code/modules/admin/admin.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 82cb857576c1..5bb4b25cc1f1 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -39,7 +39,7 @@ return var/body = "Options for [M.key]" - body += "Options panel for [M]" + body += "Options panel for [M.real_name]" if(M.client) body += " played by [M.client] " body += "[M.client.holder ? M.client.holder.rank : "Player"]" From 409f2054fceafd8151a19bf1212f64ac846d6a5e Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Fri, 1 Mar 2024 13:52:58 -0600 Subject: [PATCH 25/38] Makes orbit meanu use real name only --- code/__HELPERS/unsorted.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 94039f138721..8be2d1267084 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -305,7 +305,7 @@ Turf and target are separate in case you want to teleport some distance from a t continue if(M.client && M.client.holder && M.client.holder.fakekey) //stealthmins continue - var/name = avoid_assoc_duplicate_keys(M.name, namecounts) + M.get_realname_string() + var/name = avoid_assoc_duplicate_keys(M.real_name, namecounts) if(M.stat == DEAD && specify_dead_role) if(isobserver(M)) From 924b617b421c9cfed354737e42b68b558ceb047d Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Fri, 1 Mar 2024 14:19:17 -0600 Subject: [PATCH 26/38] optimizes adding to crew guestbook --- code/modules/client/preferences_savefile.dm | 2 +- .../modules/mob/dead/new_player/new_player.dm | 2 +- .../overmap/ships/controlled_ship_datum.dm | 23 +++++++++++-------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index b6f6e91b1bc3..cce6b66ac612 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -595,7 +595,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["randomise"] , randomise) WRITE_FILE(S["species"] , pref_species.id) WRITE_FILE(S["phobia"] , phobia) - WRITE_FILE(S["generic_adjective"] , generic_adjective) + WRITE_FILE(S["generic_adjective"] , generic_adjective) WRITE_FILE(S["body_size"] , features["body_size"]) WRITE_FILE(S["prosthetic_limbs"] , prosthetic_limbs) WRITE_FILE(S["feature_mcolor"] , features["mcolor"]) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index e9cc089d7a2c..5ccba743bb1b 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -329,7 +329,7 @@ var/mob/living/carbon/human/humanc = character ship.manifest_inject(humanc, client, job) GLOB.data_core.manifest_inject(humanc, client) - ship.addMobToCrewGuestbook(humanc) + ship.add_mob_to_crew_guestbook(humanc) AnnounceArrival(humanc, job.name, ship) AddEmploymentContract(humanc) SSblackbox.record_feedback("tally", "species_spawned", 1, humanc.dna.species.name) diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index 7f734c56269b..e68743445ab6 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -303,16 +303,19 @@ * * * H - human mob to add to the crew's guestbooks */ -/datum/overmap/ship/controlled/proc/addMobToCrewGuestbook(mob/living/carbon/human/H) - // get the names in the manifest - for(var/crewmember_name in manifest) - // iterate over the human list to try to find their mob - for(var/mob/living/carbon/human/crewmember in GLOB.human_list) - // check if they have a guestbook - if(crewmember.real_name == crewmember_name && crewmember.mind && crewmember.mind.guestbook && !(crewmember.real_name == H.real_name)) - // add the mob to the crewmember's guestbook and viceversa - crewmember.mind.guestbook.add_guest(crewmember, H, H.real_name, H.real_name, TRUE) - H.mind.guestbook.add_guest(H, crewmember, crewmember.real_name, crewmember.real_name, TRUE) +/datum/overmap/ship/controlled/proc/add_mob_to_crew_guestbook(mob/living/carbon/human/H) + // iterate over the human list to find crewmembers + for(var/mob/living/carbon/human/crewmember as anything in GLOB.human_list) + if(crewmember == H) + continue + if(!(crewmember.real_name in manifest)) + continue + if(!crewmember.mind?.guestbook) + continue + + // add the mob to the crewmember's guestbook and viceversa + crewmember.mind.guestbook.add_guest(crewmember, H, H.real_name, H.real_name, TRUE) + H.mind.guestbook.add_guest(H, crewmember, crewmember.real_name, crewmember.real_name, TRUE) /datum/overmap/ship/controlled/proc/set_owner_mob(mob/new_owner) if(owner_mob) From 8ec47d0cc6b2e3c0383f6b5439ed664c10fa5171 Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Fri, 1 Mar 2024 14:48:57 -0600 Subject: [PATCH 27/38] makes LOOC show visible name --- code/modules/client/verbs/looc.dm | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/code/modules/client/verbs/looc.dm b/code/modules/client/verbs/looc.dm index 47d4e0e82aec..1c66a077a065 100644 --- a/code/modules/client/verbs/looc.dm +++ b/code/modules/client/verbs/looc.dm @@ -59,32 +59,33 @@ GLOBAL_VAR_INIT(normal_looc_colour, "#6699CC") mob.log_talk(raw_msg, LOG_LOOC, tag = "(LOOC)") - var/list/heard = get_hearers_in_view(7, get_top_level_mob(src.mob)) - for(var/mob/M in heard) - if(!M.client) + var/list/heard = get_hearers_in_view(7, get_top_level_mob(mob)) + for(var/mob/hearer_mob in heard) + var/client/hearer = hearer_mob.client + + if(!hearer) continue - var/client/C = M.client - if(key in C.prefs.ignoring) + if(key in hearer.prefs.ignoring) continue - if(holder?.fakekey in C.prefs.ignoring) + if(holder?.fakekey in hearer.prefs.ignoring) continue - if(!(C.prefs.chat_toggles & CHAT_LOOC)) + if(!(hearer.prefs.chat_toggles & CHAT_LOOC)) continue //Handled before admins so that they see this if they're in range anyways - if(C.prefs.chat_on_map && mob.invisibility <= M.see_invisible) - M.create_chat_message(mob, null, "\[LOOC: [raw_msg]\]", null, LOOC_MESSAGE) + if(hearer.prefs.chat_on_map && mob.invisibility <= hearer_mob.see_invisible) + hearer_mob.create_chat_message(mob, null, "\[LOOC: [raw_msg]\]", null, LOOC_MESSAGE) - if(C in GLOB.admins) + if(hearer in GLOB.admins) continue //handled in the next loop if(GLOB.LOOC_COLOR) - to_chat(C, "LOOC: [src.mob.name]: [msg]", MESSAGE_TYPE_LOOC) + to_chat(hearer, "LOOC: [mob.get_screentip_name(hearer)]: [msg]", MESSAGE_TYPE_LOOC) else - to_chat(C, "LOOC: [src.mob.name]: [msg]", MESSAGE_TYPE_LOOC) + to_chat(hearer, "LOOC: [mob.get_screentip_name(hearer)]: [msg]", MESSAGE_TYPE_LOOC) for(var/client/C in GLOB.admins) if(key in C.prefs.ignoring) @@ -100,9 +101,9 @@ GLOBAL_VAR_INIT(normal_looc_colour, "#6699CC") if (C.mob in heard) prefix = "LOOC" if(GLOB.LOOC_COLOR) - to_chat(C, "[ADMIN_FLW(usr)] [prefix]: [src.key]/[src.mob.name]: [msg]", MESSAGE_TYPE_LOOC) + to_chat(C, "[ADMIN_FLW(usr)] [prefix]: [key]/[mob.real_name]: [msg]", MESSAGE_TYPE_LOOC) else - to_chat(C, "[ADMIN_FLW(usr)] [prefix]: [src.key]/[src.mob.name]: [msg]", MESSAGE_TYPE_LOOC) + to_chat(C, "[ADMIN_FLW(usr)] [prefix]: [key]/[mob.real_name]: [msg]", MESSAGE_TYPE_LOOC) /proc/toggle_looc(toggle = null) if(toggle == null) From 04c9c1ba968a81951e4deccc05066e033b6dbf9b Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Fri, 1 Mar 2024 16:13:50 -0600 Subject: [PATCH 28/38] tries to clear up emotes and fixes pai --- code/controllers/subsystem/pai.dm | 2 +- code/modules/mob/mob.dm | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/code/controllers/subsystem/pai.dm b/code/controllers/subsystem/pai.dm index 7c2bf71cad6a..b7ef35e63663 100644 --- a/code/controllers/subsystem/pai.dm +++ b/code/controllers/subsystem/pai.dm @@ -146,7 +146,7 @@ SUBSYSTEM_DEF(pai) continue if(!(ROLE_PAI in G.client.prefs.be_special)) continue - to_chat(G, "[user] is requesting a pAI personality! Use the pAI button to submit yourself as one.") + to_chat(G, "[user.real_name] is requesting a pAI personality! Use the pAI button to submit yourself as one.") addtimer(CALLBACK(src, PROC_REF(spam_again)), spam_delay) var/list/available = list() for(var/datum/paiCandidate/c in SSpai.candidates) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 151ea515052b..1914d931ec51 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -204,32 +204,34 @@ if(self_message) hearers -= src - var/raw_msg = message - for(var/mob/M in hearers) if(!M.client) continue + var/msg = message + //This entire if/else chain could be in two lines but isn't for readibilties sake. - var/msg = raw_msg if(M.see_invisible < invisibility)//if src is invisible to M msg = blind_message else if(T != loc && T != src) //if src is inside something and not a turf. msg = blind_message else if(T.lighting_object && T.lighting_object.invisibility <= M.see_invisible && T.is_softly_lit()) //if it is too dark. msg = blind_message - if(visible_message_flags & EMOTE_MESSAGE) - msg = "[src] [raw_msg]" + else if(visible_message_flags & EMOTE_MESSAGE) + var/shown_name = name if(M.mind?.guestbook && ishuman(src)) var/mob/living/carbon/human/human_source = src - var/known_name = M.mind.guestbook.get_known_name(M, src, type == MSG_VISUAL ? human_source.get_face_name() : human_source.GetVoice()) + var/known_name = M.mind.guestbook.get_known_name(M, src, human_source.get_face_name()) if(known_name) - msg = "[known_name] [raw_msg]" + shown_name = known_name + + msg = "[shown_name][separation][message]" + if(!msg) continue if(visible_message_flags & EMOTE_MESSAGE && runechat_prefs_check(M, visible_message_flags)) - M.create_chat_message(src, raw_message = raw_msg, runechat_flags = visible_message_flags) + M.create_chat_message(src, raw_message = message, runechat_flags = visible_message_flags) M.show_message(msg, MSG_VISUAL, blind_message, MSG_AUDIBLE) @@ -260,12 +262,15 @@ //emote handling if(audible_message_flags & EMOTE_MESSAGE) - msg = "[src] [message]" + var/shown_name = name if(M.mind?.guestbook && ishuman(src)) var/mob/living/carbon/human/human_source = src var/known_name = M.mind.guestbook.get_known_name(M, src, human_source.GetVoice()) if(known_name) - msg = "[known_name] [raw_msg]" + shown_name = known_name + + msg = "[shown_name][separation][message]" + if(runechat_prefs_check(M, audible_message_flags) && M.can_hear()) M.create_chat_message(src, raw_message = raw_msg, runechat_flags = audible_message_flags) From 1aa430c7f09489fd19a3eff80b270616a4830f9f Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Fri, 1 Mar 2024 16:14:26 -0600 Subject: [PATCH 29/38] moves species name to actual name --- code/modules/mob/living/carbon/human/examine.dm | 5 +---- code/modules/mob/living/carbon/human/human_helpers.dm | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index e37491cdcb1b..c48cff2e4133 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -8,7 +8,6 @@ var/t_has = p_have() var/t_is = p_are() var/obscure_name - var/apparent_species var/list/obscured = check_obscured_slots() var/skipface = ((wear_mask?.flags_inv & HIDEFACE) || (head?.flags_inv & HIDEFACE)) @@ -17,9 +16,7 @@ if(HAS_TRAIT(L, TRAIT_PROSOPAGNOSIA)) obscure_name = TRUE - if(dna?.species && !skipface) - apparent_species = ", \an [dna.species.name]" - . = list("This is [!obscure_name ? name : "Unknown"][apparent_species]!") + . = list(span_info("This is [name]!")) if(user != src) if(!obscure_name && !skipface) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 002bcc66c465..5554e54917c1 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -205,7 +205,7 @@ if(visible_age) visible_age = "[visible_age] " var/visible_gender = get_gender() - var/final_string = "[visible_adjective][visible_age][visible_gender]" + var/final_string = "[visible_adjective][visible_age][dna.species.name] [visible_gender]" if(prefixed) final_string = "\A [final_string]" return lowercase ? lowertext(final_string) : final_string From da6148138dba4ea69d4c6453fd58737a172e4cdc Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:58:14 -0300 Subject: [PATCH 30/38] Integrated Positronic Chassis to Positronic insert witty comment --- code/modules/mob/living/carbon/human/human_helpers.dm | 3 --- code/modules/mob/living/carbon/human/species_types/IPC.dm | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 5554e54917c1..b98466301f63 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -212,9 +212,6 @@ /mob/living/carbon/human/proc/get_gender() var/visible_gender = p_they() - if(isipc(src)) - visible_gender = "Positronic" - return visible_gender switch(visible_gender) if("he") visible_gender = "Man" diff --git a/code/modules/mob/living/carbon/human/species_types/IPC.dm b/code/modules/mob/living/carbon/human/species_types/IPC.dm index 381708757fd1..6506ee40c086 100644 --- a/code/modules/mob/living/carbon/human/species_types/IPC.dm +++ b/code/modules/mob/living/carbon/human/species_types/IPC.dm @@ -1,5 +1,5 @@ /datum/species/ipc // im fucking lazy mk2 and cant get sprites to normally work - name = "\improper Integrated Positronic Chassis" //inherited from the real species, for health scanners and things + name = "\improper Positronic" //inherited from the real species, for health scanners and things id = SPECIES_IPC sexes = FALSE species_age_min = 0 From 85da00366fdf1ad69ed39b4ef4d3bfde902051b5 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Fri, 1 Mar 2024 23:28:24 -0300 Subject: [PATCH 31/38] show your id card to people. also phorids --- code/game/objects/items/cards_ids.dm | 5 +---- .../mob/living/carbon/human/species_types/plasmamen.dm | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index c8f646ee9877..02a75e7a1dbf 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -179,10 +179,7 @@ /obj/item/card/id/attack_self(mob/user) if(Adjacent(user)) - var/minor - if(registered_name && registered_age && registered_age < AGE_MINOR) - minor = " (MINOR)" - user.visible_message("[user] shows you: [icon2html(src, viewers(user))] [src.name][minor].", "You show \the [src.name][minor].") + user.visible_message("[user] shows you: [icon2html(src, viewers(user))] \the [initial(name)] ([registered_name], [assignment]).", "You show \the [initial(name)] ([registered_name], [assignment]).") add_fingerprint(user) /obj/item/card/id/vv_edit_var(var_name, var_value) diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm index ec9afd777f2c..d3c900c56786 100644 --- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm +++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm @@ -1,5 +1,5 @@ /datum/species/plasmaman - name = "\improper Plasmaman" + name = "\improper Phorid" id = SPECIES_PLASMAMAN sexes = 0 meat = /obj/item/stack/sheet/mineral/plasma From 34c0924fea7a576703f7cf715ba15c85c38a1795 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Sat, 2 Mar 2024 00:05:07 -0300 Subject: [PATCH 32/38] wow isn't this so readable --- code/game/objects/items/cards_ids.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 02a75e7a1dbf..2827658526f5 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -179,7 +179,7 @@ /obj/item/card/id/attack_self(mob/user) if(Adjacent(user)) - user.visible_message("[user] shows you: [icon2html(src, viewers(user))] \the [initial(name)] ([registered_name], [assignment]).", "You show \the [initial(name)] ([registered_name], [assignment]).") + user.visible_message("[user] shows you: [icon2html(src, viewers(user))] \the [initial(name)] [(!registered_name) ? "(" : "([registered_name]"][(!assignment) ? ")" : ", [assignment])"].", "You show \the [initial(name)] [(!registered_name) ? "(" : "([registered_name],"] [(!assignment) ? ")" : "[assignment])"].") add_fingerprint(user) /obj/item/card/id/vv_edit_var(var_name, var_value) From be1f46b26c3f436627ec2c461055bef3b24d293a Mon Sep 17 00:00:00 2001 From: meem <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 4 Mar 2024 08:46:43 -0300 Subject: [PATCH 33/38] Update strings/ipc_preference_adjectives.txt Co-authored-by: goober3 <118859017+goober3@users.noreply.github.com> Signed-off-by: meem <75212565+meemofcourse@users.noreply.github.com> --- strings/ipc_preference_adjectives.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/strings/ipc_preference_adjectives.txt b/strings/ipc_preference_adjectives.txt index 249a9a8f517a..23363fa1567f 100644 --- a/strings/ipc_preference_adjectives.txt +++ b/strings/ipc_preference_adjectives.txt @@ -53,4 +53,18 @@ Waifish Wilted Wily Withered -Worn-Out \ No newline at end of file +Worn-Out +Energetic +Hyper +Friendly +Stylish +Dignified +Hawkish +Exasperated +Pugnacious +Zealous +Zesty +Feisty +Jaded +Hobbling +Chaotic \ No newline at end of file From 520fd87a3c39c994eaf78d156c6fb20ff5fc2bbc Mon Sep 17 00:00:00 2001 From: meem <75212565+meemofcourse@users.noreply.github.com> Date: Mon, 4 Mar 2024 08:46:53 -0300 Subject: [PATCH 34/38] Update strings/preference_adjectives.txt Co-authored-by: goober3 <118859017+goober3@users.noreply.github.com> Signed-off-by: meem <75212565+meemofcourse@users.noreply.github.com> --- strings/preference_adjectives.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/strings/preference_adjectives.txt b/strings/preference_adjectives.txt index 0cfe96001361..3433d17e58d7 100644 --- a/strings/preference_adjectives.txt +++ b/strings/preference_adjectives.txt @@ -98,3 +98,20 @@ Wily Withered Worn-Out Wrinkly +Energetic +Hyper +Friendly +Stylish +Dignified +Stout +Hawkish +Sleepy +Exasperated +Gap-toothed +Pugnacious +Zealous +Zesty +Feisty +Jaded +Hobbling +Chaotic From 09bd60712485ef8922f8478fd1c71116646ec42f Mon Sep 17 00:00:00 2001 From: meem <75212565+meemofcourse@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:29:47 -0300 Subject: [PATCH 35/38] alphabetical order preference_adjectives.txt Signed-off-by: meem <75212565+meemofcourse@users.noreply.github.com> --- strings/preference_adjectives.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/strings/preference_adjectives.txt b/strings/preference_adjectives.txt index 3433d17e58d7..0d67f16803f8 100644 --- a/strings/preference_adjectives.txt +++ b/strings/preference_adjectives.txt @@ -9,12 +9,14 @@ Bruised Bulky Burly Calm +Chaotic Charming Chubby Coarse Deformed Delicate Despondent +Dignified Disgusting Disturbing Dull @@ -22,22 +24,31 @@ Effeminate Elegant Emaciated Energetic +Energetic +Exasperated Exotic Faint +Feisty Flabby Flamboyant Fragile Frail Frazzled +Friendly +Gap-toothed Gaunt Gentle Gloomy Gormless Hawkish +Hawkish Healthy Hefty +Hobbling +Hyper Imposing Inscrutable +Jaded Lax Lean Limp @@ -55,6 +66,7 @@ Pathetic Peppy Petite Pompous +Pugnacious Quievering Radical Repulsive @@ -69,6 +81,7 @@ Shrewd Sickly Skittish Sleek +Sleepy Slender Slimy Slovenly @@ -80,8 +93,10 @@ Soulrendered Spacy Stiff Stony +Stout Strapping Sturdy +Stylish Swarthy Tense Tubular @@ -98,20 +113,5 @@ Wily Withered Worn-Out Wrinkly -Energetic -Hyper -Friendly -Stylish -Dignified -Stout -Hawkish -Sleepy -Exasperated -Gap-toothed -Pugnacious Zealous Zesty -Feisty -Jaded -Hobbling -Chaotic From 3ca118a5a0be63946a6a58046c870f42c1ad315b Mon Sep 17 00:00:00 2001 From: meem <75212565+meemofcourse@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:33:31 -0300 Subject: [PATCH 36/38] Update ipc_preference_adjectives.txt what is with you and this one fucking adjective Signed-off-by: meem <75212565+meemofcourse@users.noreply.github.com> --- strings/ipc_preference_adjectives.txt | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/strings/ipc_preference_adjectives.txt b/strings/ipc_preference_adjectives.txt index 23363fa1567f..a243b2d77fc5 100644 --- a/strings/ipc_preference_adjectives.txt +++ b/strings/ipc_preference_adjectives.txt @@ -3,21 +3,31 @@ Brawny Bulky Burly Calm +Chaotic Charming Delicate +Dignified Disgusting Disturbing Dull Effeminate Elegant +Energetic +Exasperated Exotic Faint +Feisty Flamboyant Fragile Frail +Friendly Gentle +Hawkish Hefty +Hobbling +Hyper Imposing +Jaded Lax Lean Limp @@ -30,13 +40,15 @@ Messy Nimble Petite Pompous +Pugnacious Repulsive -Rusted Robust Rough +Rusted Scarred Shifty Sickly +Skittish Sleek Slender Slovenly @@ -44,6 +56,7 @@ Sluggish Spacy Stiff Stony +Stylish Unattractive Unremarkable Unsightly @@ -54,17 +67,5 @@ Wilted Wily Withered Worn-Out -Energetic -Hyper -Friendly -Stylish -Dignified -Hawkish -Exasperated -Pugnacious Zealous Zesty -Feisty -Jaded -Hobbling -Chaotic \ No newline at end of file From 6b12201180ad3836e3807a6d24c2417711ee3749 Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:29:58 -0300 Subject: [PATCH 37/38] chameleon --- code/game/objects/items/cards_ids.dm | 5 +---- code/modules/clothing/chameleon.dm | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 7bd1e30e1eef..505d0f76cf5c 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -418,11 +418,10 @@ update_label() */ /obj/item/card/id/proc/update_label() - name = "[initial(name)][(!assignment) ? "" : " ([assignment])"]" + name = "[(istype(src, /obj/item/card/id/syndicate)) ? "[initial(name)]" : "access card"][(!assignment) ? "" : " ([assignment])"]" update_appearance() /obj/item/card/id/silver - name = "silver access card" desc = "A silver-colored card, usually given to higher-ranking officials in ships and stations." icon_state = "silver" item_state = "silver_id" @@ -435,7 +434,6 @@ update_label() access = list(ACCESS_CHANGE_IDS) /obj/item/card/id/gold - name = "gold identification card" desc = "A golden-colored card, usually given to those at the top of the hierarchy in a ship." icon_state = "gold" item_state = "gold_id" @@ -539,7 +537,6 @@ update_label() access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER) /obj/item/card/id/syndicate_command - name = "syndicate access card" desc = "An access card widely utilized by Coalition splinters in the frontier." icon_state = "syndie" access = list(ACCESS_SYNDICATE) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index eb629f76ae43..921be599e8bd 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -148,8 +148,10 @@ card.job_icon = outfit.job_icon card.faction_icon = outfit.faction_icon card.assignment = J.name - card.update_label() - card.name = "[!card.registered_name ? initial(card.name) : "[card.registered_name]'s ID Card"][" ([old_assignment])"]" // this is terrible, but whatever + // the reason why i'm not calling update_label here is because the id card's overlays are tied to the assignment. + // this is absolutely a hack, but oh well + card.update_appearance() + card.name = "[(istype(src, /obj/item/card/id/syndicate)) ? "[initial(name)]" : "access card"][(!old_assignment) ? "" : " ([old_assignment])"]" H.sec_hud_set_ID() qdel(outfit) From 5f98914183b13ad4c24b5364d1a90b3e59da643f Mon Sep 17 00:00:00 2001 From: meemofcourse <75212565+meemofcourse@users.noreply.github.com> Date: Sat, 9 Mar 2024 17:13:01 -0300 Subject: [PATCH 38/38] Revert "Makes orbit meanu use real name only" This reverts commit 409f2054fceafd8151a19bf1212f64ac846d6a5e. --- code/__HELPERS/unsorted.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 30954fc2dd6a..8e9a1dbc9979 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -305,7 +305,7 @@ Turf and target are separate in case you want to teleport some distance from a t continue if(M.client && M.client.holder && M.client.holder.fakekey) //stealthmins continue - var/name = avoid_assoc_duplicate_keys(M.real_name, namecounts) + var/name = avoid_assoc_duplicate_keys(M.name, namecounts) + M.get_realname_string() if(M.stat == DEAD && specify_dead_role) if(isobserver(M))