Skip to content

Commit

Permalink
use declents in examine name and titles (#515)
Browse files Browse the repository at this point in the history
## About The Pull Request
Добавляет в кор-код поддержку склоненеий для названий предметов в
examine
  • Loading branch information
larentoun authored Oct 6, 2024
1 parent 55a75ac commit 9ad4488
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions code/game/atom/atom_examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,20 @@
* You can override what is returned from this proc by registering to listen for the
* [COMSIG_ATOM_GET_EXAMINE_NAME] signal
*/
/atom/proc/get_examine_name(mob/user)
var/list/override = list(article, null, "<em>[get_visible_name()]</em>")
/atom/proc/get_examine_name(mob/user, declent = NOMINATIVE) // BANDASTATION EDIT - Declents
var/list/override = list(article, null, "<em>[get_visible_name(declent = declent)]</em>") // BANDASTATION EDIT - Declents
SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override)

if(!isnull(override[EXAMINE_POSITION_ARTICLE]))
override -= null // IF there is no "before", don't try to join it
return jointext(override, " ")
if(!isnull(override[EXAMINE_POSITION_BEFORE]))
override -= null // There is no article, don't try to join it
return "\a [jointext(override, " ")]"
return "\a [src]"
return "[jointext(override, " ")]" // BANDASTATION EDIT - Declents
return "[declent_ru(declent)]" // BANDASTATION EDIT - Declents

/mob/living/get_examine_name(mob/user)
return get_visible_name()
/mob/living/get_examine_name(mob/user, declent = NOMINATIVE) // BANDASTATION EDIT - Declents
return get_visible_name(declent = declent) // BANDASTATION EDIT - Declents

/// Icon displayed in examine
/atom/proc/get_examine_icon(mob/user)
Expand All @@ -133,9 +133,9 @@
* * user - the mob examining the atom
* * thats - whether to include "That's", or similar (mobs use "This is") before the name
*/
/atom/proc/examine_title(mob/user, thats = FALSE)
/atom/proc/examine_title(mob/user, thats = FALSE, declent = NOMINATIVE) // BANDASTATION EDIT - Declents
var/examine_icon = get_examine_icon(user)
return "[examine_icon ? "[examine_icon] " : ""][thats ? "[examine_thats] ":""]<em>[get_examine_name(user)]</em>"
return "[examine_icon ? "[examine_icon] " : ""][thats ? "[examine_thats] ":""]<em>[get_examine_name(user, declent)]</em>" // BANDASTATION EDIT - Declents

/**
* Returns an extended list of examine strings for any contained ID cards.
Expand All @@ -152,5 +152,5 @@

/// Used by mobs to determine the name for someone wearing a mask, or with a disfigured or missing face. By default just returns the atom's name. add_id_name will control whether or not we append "(as [id_name])".
/// force_real_name will always return real_name and add (as face_name/id_name) if it doesn't match their appearance
/atom/proc/get_visible_name(add_id_name, force_real_name)
return name
/atom/proc/get_visible_name(add_id_name, force_real_name, declent = NOMINATIVE) // BANDASTATION EDIT - Declents
return declent_ru(declent) // BANDASTATION EDIT - Declents
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
return FALSE
to_chat(src, span_bold(playstyle_string))

/mob/living/basic/construct/get_examine_name(mob/user)
/mob/living/basic/construct/get_examine_name(mob/user, declent) // BANDASTATION EDIT - Declents
var/text_span
switch(theme)
if(THEME_CULT)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/examine.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Adds a newline to the examine list if the above entry is not empty and it is not the first element in the list
#define ADD_NEWLINE_IF_NECESSARY(list) if(length(list) > 0 && list[length(list)]) { list += "" }

/mob/living/carbon/human/get_examine_name(mob/user)
/mob/living/carbon/human/get_examine_name(mob/user, declent) // BANDASTATION EDIT - Declents
if(!HAS_TRAIT(user, TRAIT_PROSOPAGNOSIA))
return ..()

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
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(add_id_name = TRUE, force_real_name = FALSE)
/mob/living/carbon/human/get_visible_name(add_id_name = TRUE, force_real_name = FALSE, declent) // BANDASTATION EDIT - Declents
var/list/identity = list(null, null, null)
SEND_SIGNAL(src, COMSIG_HUMAN_GET_VISIBLE_NAME, identity)
var/signal_face = LAZYACCESS(identity, VISIBLE_NAME_FACE)
Expand Down

0 comments on commit 9ad4488

Please sign in to comment.