From c2cef10b77b7b05cb9065f2af7c0fef708207703 Mon Sep 17 00:00:00 2001 From: Mr_DarkBladeS <48252701+MysticalFaceLesS@users.noreply.github.com> Date: Tue, 16 Apr 2024 19:06:31 +0300 Subject: [PATCH] Revert "[Needs Testmerge] Guestbook, from Mojave Sun (#2770)" This reverts commit 67644030d36850f0b4c50730b9501c66db9f704e. --- code/__DEFINES/dcs/signals.dm | 34 ++-- code/__DEFINES/mobs.dm | 2 +- code/__HELPERS/_lists.dm | 2 +- code/__HELPERS/mobs.dm | 6 - code/_globalvars/lists/names.dm | 2 - code/_onclick/click.dm | 1 + code/controllers/subsystem/pai.dm | 2 +- code/datums/chatmessage.dm | 2 +- code/datums/guestbook.dm | 148 ------------------ code/datums/mind.dm | 5 - code/datums/progressbar.dm | 2 +- code/game/atoms.dm | 6 +- code/game/atoms_movable.dm | 4 +- code/game/machinery/navbeacon.dm | 2 +- code/game/objects/effects/landmarks.dm | 2 +- code/game/objects/items/cards_ids.dm | 62 ++++++-- code/game/objects/items/toys.dm | 2 +- code/game/say.dm | 34 +--- code/modules/admin/admin.dm | 2 +- code/modules/admin/create_mob.dm | 1 - code/modules/admin/verbs/one_click_antag.dm | 10 -- code/modules/client/preferences.dm | 17 +- code/modules/client/preferences_savefile.dm | 2 - code/modules/client/verbs/looc.dm | 29 ++-- code/modules/clothing/chameleon.dm | 2 +- code/modules/jobs/job_types/_job.dm | 1 + code/modules/mob/dead/dead.dm | 2 +- .../modules/mob/dead/new_player/new_player.dm | 3 +- .../mob/living/carbon/human/examine.dm | 40 ++--- code/modules/mob/living/carbon/human/human.dm | 17 -- .../mob/living/carbon/human/human_defines.dm | 3 - .../mob/living/carbon/human/human_helpers.dm | 74 ++------- .../mob/living/carbon/human/human_say.dm | 25 +-- .../living/carbon/human/species_types/IPC.dm | 2 +- .../carbon/human/species_types/mothmen.dm | 2 +- .../carbon/human/species_types/plasmamen.dm | 2 +- code/modules/mob/living/login.dm | 2 +- code/modules/mob/living/silicon/ai/ai.dm | 1 - .../mob/living/simple_animal/simple_animal.dm | 2 +- code/modules/mob/living/status_procs.dm | 4 +- code/modules/mob/mob.dm | 59 ++----- .../overmap/ships/controlled_ship_datum.dm | 19 --- shiptest.dme | 1 - strings/ipc_preference_adjectives.txt | 71 --------- strings/preference_adjectives.txt | 117 -------------- tgui/packages/tgui/interfaces/Guestbook.tsx | 74 --------- 46 files changed, 165 insertions(+), 737 deletions(-) delete mode 100644 code/datums/guestbook.dm delete mode 100644 strings/ipc_preference_adjectives.txt delete mode 100644 strings/preference_adjectives.txt delete mode 100644 tgui/packages/tgui/interfaces/Guestbook.tsx diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 82599891087e..2b8dc67cb684 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -224,29 +224,19 @@ #define COMSIG_LIVING_GET_PULLED "living_start_pulled" ///////////////// -//from base of area/Entered(): (/area). Sent to "area-sensitive" movables, see __DEFINES/traits.dm for info. -#define COMSIG_ENTER_AREA "enter_area" -//from base of area/Exited(): (/area). Sent to "area-sensitive" movables, see __DEFINES/traits.dm for info. -#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 COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area). Sent to "area-sensitive" movables, see __DEFINES/traits.dm for info. +#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area). Sent to "area-sensitive" movables, see __DEFINES/traits.dm for info. + +#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) #define COMPONENT_NO_MOUSEDROP 1 -//from base of atom/MouseDrop_T: (/atom/from, /mob/user) -#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" +#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" //from base of atom/MouseDrop_T: (/atom/from, /mob/user) ///from base of area/proc/power_change(): () #define COMSIG_AREA_POWER_CHANGE "area_power_change" diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index f0b505114646..ad9d5ae5abc8 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 18 //youngest a character can be +#define AGE_MIN 17 //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/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm index 28e2464aa8a9..376e023940de 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] += V; +#define LAZYADDASSOC(L, K, V) if(!L) { L = list(); } L[K] += list(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/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 8437730c3844..fdeadc13b61a 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -217,12 +217,6 @@ 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 ff452072fbec..ecc1acb6f0e1 100644 --- a/code/_globalvars/lists/names.dm +++ b/code/_globalvars/lists/names.dm @@ -27,8 +27,6 @@ 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(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/_onclick/click.dm b/code/_onclick/click.dm index 993026c0d5e0..81ce3ceec1eb 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -356,6 +356,7 @@ /** * Control+Shift click + * Unused except for AI */ /mob/proc/CtrlShiftClickOn(atom/A) A.CtrlShiftClick(src) diff --git a/code/controllers/subsystem/pai.dm b/code/controllers/subsystem/pai.dm index b7ef35e63663..7c2bf71cad6a 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.real_name] is requesting a pAI personality! Use the pAI button to submit yourself as one.") + to_chat(G, "[user] 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/datums/chatmessage.dm b/code/datums/chatmessage.dm index 60b4db1d1ce9..c27e0bd1b7ae 100644 --- a/code/datums/chatmessage.dm +++ b/code/datums/chatmessage.dm @@ -182,7 +182,7 @@ message.maptext = complete_text // View the message - LAZYADDASSOCLIST(owned_by.seen_messages, message_loc, src) + LAZYADDASSOC(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/guestbook.dm b/code/datums/guestbook.dm deleted file mode 100644 index 99104f09d715..000000000000 --- a/code/datums/guestbook.dm +++ /dev/null @@ -1,148 +0,0 @@ -/** - * 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]?", "Guestbook Name", guest.get_visible_name()) - 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 || isAdminObserver(user)) - 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 771ef4dd987e..a73dc626d8e5 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -79,9 +79,6 @@ /// 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. @@ -98,7 +95,6 @@ key = _key soulOwner = src martial_art = default_martial_art - guestbook = new() init_known_skills() /datum/mind/Destroy() @@ -106,7 +102,6 @@ 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/datums/progressbar.dm b/code/datums/progressbar.dm index 25621a613eeb..5ffa3778edc6 100644 --- a/code/datums/progressbar.dm +++ b/code/datums/progressbar.dm @@ -37,7 +37,7 @@ bar.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA user = User - LAZYADDASSOCLIST(user.progressbars, bar_loc, src) + LAZYADDASSOC(user.progressbars, bar_loc, src) var/list/bars = user.progressbars[bar_loc] listindex = bars.len diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 043db01e592f..6c6849724bde 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1673,11 +1673,7 @@ 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 = "[get_screentip_name(client)]" - -/// Returns the atom name that should be used on screentip -/atom/proc/get_screentip_name(client/hovering_client) - return name + active_hud.screentip_text.maptext = "[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/atoms_movable.dm b/code/game/atoms_movable.dm index 989db20efd1f..7dd3d612ae81 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -560,7 +560,7 @@ if(!client) return if(new_virtual_z) - LAZYADDASSOCLIST(SSmobs.players_by_virtual_z, "[new_virtual_z]", src) + LAZYADDASSOC(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(!client) return if(new_virtual_z) - LAZYADDASSOCLIST(SSmobs.dead_players_by_virtual_z, "[new_virtual_z]", src) + LAZYADDASSOC(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 b54c192f4407..a847b44d39a1 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) - LAZYADDASSOCLIST(GLOB.navbeacons, "[new_virtual_z]", src) + LAZYADDASSOC(GLOB.navbeacons, "[new_virtual_z]", src) ..() // set the transponder codes assoc list from codes_txt diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 2325c227a211..c8332e1dd0cd 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) - LAZYADDASSOCLIST(GLOB.jobspawn_overrides, name, src) + LAZYADDASSOC(GLOB.jobspawn_overrides, name, src) if(name != "start") tag = "start*[name]" diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 16e7d40e33fc..ce5afeba737a 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 = "access card" - desc = "These cards provide access to different sections of a ship." + name = "identification card" + desc = "A card used to provide ID and determine access across the station." 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 = 18 // default age for ss13 players + var/registered_age = 13 // default age for ss13 players var/job_icon var/faction_icon @@ -180,7 +180,10 @@ /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) ? "(" : "([registered_name]"][(!assignment) ? ")" : ", [assignment])"].", "You show \the [initial(name)] [(!registered_name) ? "(" : "([registered_name],"] [(!assignment) ? ")" : "[assignment])"].") + 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].") add_fingerprint(user) /obj/item/card/id/vv_edit_var(var_name, var_value) @@ -328,14 +331,14 @@ /obj/item/card/id/examine(mob/user) . = ..() if(registered_account) - . += "The account linked to the card belongs to '[registered_account.account_holder]' and reports a balance of [registered_account.account_balance] cr." + . += "The account linked to the ID belongs to '[registered_account.account_holder]' and 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..." /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) @@ -413,14 +416,16 @@ /* Usage: update_label() - Sets the id name to whatever the assignment is + Sets the id name to whatever registered_name and assignment is */ /obj/item/card/id/proc/update_label() - name = "[(istype(src, /obj/item/card/id/syndicate)) ? "[initial(name)]" : "access card"][(!assignment) ? "" : " ([assignment])"]" + var/blank = !registered_name + name = "[blank ? initial(name) : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]" /obj/item/card/id/silver - desc = "A silver-colored card, usually given to higher-ranking officials in ships and stations." + name = "silver identification card" + desc = "A silver card which shows honour and dedication." icon_state = "silver" item_state = "silver_id" lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' @@ -432,7 +437,8 @@ update_label() access = list(ACCESS_CHANGE_IDS) /obj/item/card/id/gold - desc = "A golden-colored card, usually given to those at the top of the hierarchy in a ship." + name = "gold identification card" + desc = "A golden card which shows power and might." icon_state = "gold" item_state = "gold_id" lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' @@ -535,7 +541,10 @@ update_label() access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER) /obj/item/card/id/syndicate_command - desc = "An access card widely utilized by Coalition splinters in the frontier." + name = "syndicate ID card" + desc = "An ID straight from the Syndicate." + registered_name = "Syndicate" + assignment = "Syndicate Overlord" icon_state = "syndie" access = list(ACCESS_SYNDICATE) uses_overlays = FALSE @@ -569,12 +578,15 @@ 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 @@ -593,9 +605,11 @@ update_label() ..() /obj/item/card/id/centcom - name = "\improper Nanotrasen Central Command access card" - desc = "An access card sourced from Nanotrasen's Central Command." + name = "\improper CentCom ID" + desc = "An ID straight from Central Command." icon_state = "centcom" + registered_name = "Central Command" + assignment = "Central Command" uses_overlays = FALSE registered_age = null @@ -610,6 +624,8 @@ 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 @@ -618,6 +634,8 @@ 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() @@ -625,6 +643,8 @@ 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() @@ -632,6 +652,8 @@ 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() @@ -639,6 +661,8 @@ 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() @@ -646,6 +670,8 @@ 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() @@ -653,6 +679,8 @@ 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() @@ -660,10 +688,12 @@ update_label() . = ..() /obj/item/card/id/ert/deathsquad - desc = "An access card colored in black and red." + name = "\improper Death Squad ID" + desc = "A Death Squad ID card." 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/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 2036f4e2a7b4..f53674195d42 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(if_no_voice = "Unknown") +/obj/item/toy/dummy/GetVoice() return doll_name /obj/item/toy/seashell diff --git a/code/game/say.dm b/code/game/say.dm index 30ef86920efe..306ad62fefdc 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -51,28 +51,10 @@ GLOBAL_LIST_INIT(freqcolor, list()) //Radio freq/name display var/freqpart = radio_freq ? "\[[get_radio_name(radio_freq)]\] " : "" //Speaker name - - 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(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)]" - + 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 //End name span. var/endspanpart = "" @@ -84,9 +66,9 @@ GLOBAL_LIST_INIT(freqcolor, list()) else messagepart = lang_treat(speaker, message_language, raw_message, spans, message_mods) - var/datum/language/language = GLOB.language_datum_instances[message_language] - if(istype(language) && language.display_icon(src)) - languageicon = "[language.get_icon()] " + var/datum/language/D = GLOB.language_datum_instances[message_language] + if(istype(D) && D.display_icon(src)) + languageicon = "[D.get_icon()] " messagepart = " [say_emphasis(messagepart)]" @@ -194,7 +176,7 @@ GLOBAL_LIST_INIT(freqcolor, list()) return "2" return "0" -/atom/movable/proc/GetVoice(if_no_voice = "Unknown") +/atom/movable/proc/GetVoice() 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/admin.dm b/code/modules/admin/admin.dm index 5bb4b25cc1f1..82cb857576c1 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.real_name]" + body += "Options panel for [M]" if(M.client) body += " played by [M.client] " body += "[M.client.holder ? M.client.holder.rank : "Player"]" diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index 7d5dfccf2804..c1845945485f 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -23,7 +23,6 @@ H.facial_hair_color = H.hair_color H.eye_color = random_eye_color() H.dna.blood_type = random_blood_type() - 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/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index dff0335b7e9e..ac05c3afdd4f 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -493,16 +493,6 @@ 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 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 901200f69928..ebf32c163d89 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -158,7 +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,11 +847,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "[features["body_size"]]
" - - dat += "

Character Adjective

" - - dat += "[generic_adjective]
" - mutant_category++ if(mutant_category >= MAX_MUTANT_ROWS) dat += "" @@ -2079,15 +2074,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(phobiaType) phobia = phobiaType - if("generic_adjective") - 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 - 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)) @@ -2487,7 +2473,6 @@ 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 cce6b66ac612..0b95e291b794 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -405,7 +405,6 @@ 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) @@ -595,7 +594,6 @@ 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/client/verbs/looc.dm b/code/modules/client/verbs/looc.dm index 1c66a077a065..47d4e0e82aec 100644 --- a/code/modules/client/verbs/looc.dm +++ b/code/modules/client/verbs/looc.dm @@ -59,33 +59,32 @@ 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(mob)) - for(var/mob/hearer_mob in heard) - var/client/hearer = hearer_mob.client - - if(!hearer) + var/list/heard = get_hearers_in_view(7, get_top_level_mob(src.mob)) + for(var/mob/M in heard) + if(!M.client) continue + var/client/C = M.client - if(key in hearer.prefs.ignoring) + if(key in C.prefs.ignoring) continue - if(holder?.fakekey in hearer.prefs.ignoring) + if(holder?.fakekey in C.prefs.ignoring) continue - if(!(hearer.prefs.chat_toggles & CHAT_LOOC)) + if(!(C.prefs.chat_toggles & CHAT_LOOC)) continue //Handled before admins so that they see this if they're in range anyways - 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.prefs.chat_on_map && mob.invisibility <= M.see_invisible) + M.create_chat_message(mob, null, "\[LOOC: [raw_msg]\]", null, LOOC_MESSAGE) - if(hearer in GLOB.admins) + if(C in GLOB.admins) continue //handled in the next loop if(GLOB.LOOC_COLOR) - to_chat(hearer, "LOOC: [mob.get_screentip_name(hearer)]: [msg]", MESSAGE_TYPE_LOOC) + to_chat(C, "LOOC: [src.mob.name]: [msg]", MESSAGE_TYPE_LOOC) else - to_chat(hearer, "LOOC: [mob.get_screentip_name(hearer)]: [msg]", MESSAGE_TYPE_LOOC) + to_chat(C, "LOOC: [src.mob.name]: [msg]", MESSAGE_TYPE_LOOC) for(var/client/C in GLOB.admins) if(key in C.prefs.ignoring) @@ -101,9 +100,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]: [key]/[mob.real_name]: [msg]", MESSAGE_TYPE_LOOC) + to_chat(C, "[ADMIN_FLW(usr)] [prefix]: [src.key]/[src.mob.name]: [msg]", MESSAGE_TYPE_LOOC) else - to_chat(C, "[ADMIN_FLW(usr)] [prefix]: [key]/[mob.real_name]: [msg]", MESSAGE_TYPE_LOOC) + to_chat(C, "[ADMIN_FLW(usr)] [prefix]: [src.key]/[src.mob.name]: [msg]", MESSAGE_TYPE_LOOC) /proc/toggle_looc(toggle = null) if(toggle == null) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index f5c37b18997d..203bcf416b13 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -150,7 +150,7 @@ card.assignment = J.name card.update_appearance() card.assignment = old_assignment - card.name = "[(istype(src, /obj/item/card/id/syndicate)) ? "[initial(name)]" : "access card"][(!old_assignment) ? "" : " ([old_assignment])"]" + card.update_label() H.sec_hud_set_ID() qdel(outfit) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index aa6d61a98401..67d45dd8d058 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -25,6 +25,7 @@ var/display_order = JOB_DISPLAY_ORDER_DEFAULT + ///Levels unlocked at roundstart in physiology var/list/roundstart_experience diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index 85c60a15b031..5a1e5bbf3387 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -107,7 +107,7 @@ INITIALIZE_IMMEDIATE(/mob/dead) . = ..() if(!client) return - LAZYADDASSOCLIST(SSmobs.dead_players_by_virtual_z, "[virtual_z()]", src) + LAZYADDASSOC(SSmobs.dead_players_by_virtual_z, "[virtual_z()]", src) /mob/dead/Logout() . = ..() diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 5ccba743bb1b..9baa46f526b5 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) - QDEL_NULL(mind) deadchat_broadcast(" has observed.", "[observer.real_name]", follow_target = observer, turf_target = get_turf(observer), message_type = DEADCHAT_DEATHRATTLE) + QDEL_NULL(mind) qdel(src) return TRUE @@ -329,7 +329,6 @@ var/mob/living/carbon/human/humanc = character ship.manifest_inject(humanc, client, job) GLOB.data_core.manifest_inject(humanc, client) - 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/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index c48cff2e4133..ceda44284f46 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -8,6 +8,7 @@ var/t_has = p_have() var/t_is = p_are() var/obscure_name + var/list/obscured = check_obscured_slots() var/skipface = ((wear_mask?.flags_inv & HIDEFACE) || (head?.flags_inv & HIDEFACE)) @@ -15,25 +16,10 @@ var/mob/living/L = user if(HAS_TRAIT(L, TRAIT_PROSOPAGNOSIA)) obscure_name = TRUE - - . = list(span_info("This is [name]!")) - - 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) - . += "You know them as [known_name]." - else - . += "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 - . += "You can't see [t_his] face very well." - else - . += "It's you, [real_name]." + var/apparent_species + if(dna?.species && !skipface) + apparent_species = ", \an [dna.species.name]" + . = list("This is [!obscure_name ? name : "Unknown"][apparent_species]!") //uniform if(w_uniform && !(ITEM_SLOT_ICLOTHING in obscured)) @@ -417,4 +403,18 @@ . = ..() if ((wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))) return - . += list(span_notice("[p_they(TRUE)] appear[p_s()] to be [get_age()].")) + 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].")) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d01c3fc18ec2..93276a6710a6 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1290,23 +1290,6 @@ return FALSE return ..() -/mob/living/carbon/human/CtrlShiftClick(mob/user) - . = ..() - if(isobserver(user) || !user.mind?.guestbook) - return - 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) - . = ..() - var/mob/hovering_mob = hovering_client?.mob - 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) - return known_name - return . - /mob/living/carbon/human/species var/race = null diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 8cc9e5002749..5b638d330690 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -61,9 +61,6 @@ 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 b98466301f63..2f9814112711 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -31,19 +31,28 @@ 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() + var/face_name = get_face_name("") + var/id_name = get_id_name("") if(name_override) return name_override - return get_generic_name(lowercase = TRUE) + if(face_name) + if(id_name && (id_name != face_name)) + return "[face_name] (as [id_name])" + return face_name + if(id_name) + return id_name + return "Unknown" //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 +/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 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) //disfigured. use id-name if possible return if_no_face return real_name @@ -172,56 +181,3 @@ destination.socks = socks destination.socks_color = socks_color destination.jumpsuit_style = jumpsuit_style - -/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 || isipc(src)) - return "" - 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/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_gender = get_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 - -/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") - if(ishuman(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 6b0c1ff1c768..039141bb5fd5 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -7,14 +7,16 @@ else . = ..() -/mob/living/carbon/human/GetVoice(if_no_voice = get_generic_name()) +/mob/living/carbon/human/GetVoice() if(istype(wear_mask, /obj/item/clothing/mask/chameleon)) - var/obj/item/clothing/mask/chameleon/chameleon_mask = wear_mask - if(chameleon_mask.voice_change && wear_id) + var/obj/item/clothing/mask/chameleon/V = wear_mask + if(V.voice_change && wear_id) var/obj/item/card/id/idcard = wear_id.GetID() if(istype(idcard)) return idcard.registered_name - else if(istype(wear_mask, /obj/item/clothing/mask/gas/syndicate/voicechanger)) + else + return real_name + 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() @@ -24,17 +26,18 @@ return real_name 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(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 if(mind) var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling) if(changeling && changeling.mimicing) return changeling.mimicing - var/special_voice = GetSpecialVoice() - if(special_voice) - return special_voice + if(GetSpecialVoice()) + return GetSpecialVoice() return real_name /mob/living/carbon/human/IsVocal() 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 6506ee40c086..381708757fd1 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 Positronic" //inherited from the real species, for health scanners and things + name = "\improper Integrated Positronic Chassis" //inherited from the real species, for health scanners and things id = SPECIES_IPC sexes = FALSE species_age_min = 0 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..02ddf79f6bc4 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 Mothman" id = SPECIES_MOTH default_color = "00FF00" species_traits = list(LIPS, NOEYESPRITES, TRAIT_ANTENNAE, HAIR, EMOTE_OVERLAY) 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 d3c900c56786..ec9afd777f2c 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 Phorid" + name = "\improper Plasmaman" id = SPECIES_PLASMAMAN sexes = 0 meat = /obj/item/stack/sheet/mineral/plasma diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index 62098a940937..d59e3f77781e 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -18,7 +18,7 @@ var/virtual_z = virtual_z() - LAZYADDASSOCLIST(SSmobs.players_by_virtual_z, "[virtual_z]", src) + LAZYADDASSOC(SSmobs.players_by_virtual_z, "[virtual_z]", src) SSidlenpcpool.try_wakeup_virtual_z(virtual_z) //Vents diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index cfd7d9153c8d..daa987904737 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -1063,4 +1063,3 @@ ghostize(1) QDEL_NULL(src) - diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 3670e14a6405..e4ead25880f9 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) - LAZYADDASSOCLIST(SSidlenpcpool.idle_mobs_by_virtual_level, virt_z, src) + LAZYADDASSOC(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 d60755693489..8eb5bc620722 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 - LAZYADDASSOCLIST(movespeed_mod_immunities, listed_type, source) + LAZYADDASSOC(movespeed_mod_immunities, listed_type, source) else if(ispath(slowdown_type)) slowdown_type = "[slowdown_type]" //Path2String - LAZYADDASSOCLIST(movespeed_mod_immunities, slowdown_type, source) + LAZYADDASSOC(movespeed_mod_immunities, slowdown_type, source) if(update) update_movespeed() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d81bf2308a0e..d5465df923c0 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -204,34 +204,27 @@ if(self_message) 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 - var/msg = message - //This entire if/else chain could be in two lines but isn't for readibilties sake. + var/msg = message 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 - 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, human_source.get_face_name()) - if(known_name) - 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 = message, runechat_flags = visible_message_flags) + M.create_chat_message(src, raw_message = raw_msg, runechat_flags = visible_message_flags) M.show_message(msg, MSG_VISUAL, blind_message, MSG_AUDIBLE) @@ -257,24 +250,12 @@ 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) - var/msg = raw_msg - - //emote handling - if(audible_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, human_source.GetVoice()) - if(known_name) - 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) - - M.show_message(msg, MSG_AUDIBLE, deaf_message, MSG_VISUAL) + 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) /** * Show a message to all mobs in earshot of this one @@ -689,24 +670,6 @@ 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." - // 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!")) - return - 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/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index 478ee415ece7..9c9024126b0a 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -307,25 +307,6 @@ job_holder_refs[human_job] = list() job_holder_refs[human_job] += WEAKREF(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/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) // we (hopefully) don't have to hook qdeletion, diff --git a/shiptest.dme b/shiptest.dme index 87cfcb2fbd70..6c26c3059bf1 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -403,7 +403,6 @@ #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/strings/ipc_preference_adjectives.txt b/strings/ipc_preference_adjectives.txt deleted file mode 100644 index a243b2d77fc5..000000000000 --- a/strings/ipc_preference_adjectives.txt +++ /dev/null @@ -1,71 +0,0 @@ -Bedraggled -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 -Lithe -Lopsided -Lovely -Mangled -Masculine -Messy -Nimble -Petite -Pompous -Pugnacious -Repulsive -Robust -Rough -Rusted -Scarred -Shifty -Sickly -Skittish -Sleek -Slender -Slovenly -Sluggish -Spacy -Stiff -Stony -Stylish -Unattractive -Unremarkable -Unsightly -Verbose -Vigorous -Waifish -Wilted -Wily -Withered -Worn-Out -Zealous -Zesty diff --git a/strings/preference_adjectives.txt b/strings/preference_adjectives.txt deleted file mode 100644 index 0d67f16803f8..000000000000 --- a/strings/preference_adjectives.txt +++ /dev/null @@ -1,117 +0,0 @@ -Angsty -Awkward -Bedraggled -Blemished -Bony -Brawny -Breathtaking -Bruised -Bulky -Burly -Calm -Chaotic -Charming -Chubby -Coarse -Deformed -Delicate -Despondent -Dignified -Disgusting -Disturbing -Dull -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 -Lithe -Lopsided -Lovely -Malnourished -Mangled -Mangled -Masculine -Messy -Muscular -Nimble -Pathetic -Peppy -Petite -Pompous -Pugnacious -Quievering -Radical -Repulsive -Robust -Roguish -Rough -Scarred -Scrawny -Sculpted -Shifty -Shrewd -Sickly -Skittish -Sleek -Sleepy -Slender -Slimy -Slovenly -Sluggish -Sly -Smooth -Sniveling -Soulrendered -Spacy -Stiff -Stony -Stout -Strapping -Sturdy -Stylish -Swarthy -Tense -Tubular -Unattractive -Unblemished -Unhealthy -Unremarkable -Unsightly -Verbose -Vigorous -Waifish -Wilted -Wily -Withered -Worn-Out -Wrinkly -Zealous -Zesty diff --git a/tgui/packages/tgui/interfaces/Guestbook.tsx b/tgui/packages/tgui/interfaces/Guestbook.tsx deleted file mode 100644 index d1fb09aa8499..000000000000 --- a/tgui/packages/tgui/interfaces/Guestbook.tsx +++ /dev/null @@ -1,74 +0,0 @@ -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< - string | null - >(context, 'lastNameBeforeEdit', null); - - return ( - - - {(!names.length &&
{'No known names!'}
) || ( - - {names.map((name) => ( - -
- - -
-
- ))} -
- )} -
-
- ); -};