[MIRROR] Changeling IDs now have examine string (#27015)

* Changeling IDs now have examine string (#82173)

## About The Pull Request

First examine block is roundstart examine, second one is as a disguised
Changeling

![image](https://github.com/tgstation/tgstation/assets/53777086/ac90225f-372e-4ad7-9784-7f938fd030a0)

This PR adds the icon of the ID at the very bottom, something that was
forgotten about when ID trimming was introduced.

## Why It's Good For The Game

Removes a tell from disguised changelings by seeing that they have an ID
but no icon at the bottom of the examine list.

## Changelog

🆑
fix: Changelings with a flesh ID now properly show the icon of the
disguised ID in examine.
/🆑

* Changeling IDs now have examine string

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-03-25 13:27:35 -04:00
committed by GitHub
co-authored by John Willard
parent a4b0746a31
commit 97d2465233
3 changed files with 11 additions and 7 deletions
+6
View File
@@ -36,3 +36,9 @@
)
/// Wildcard slot define for admin/debug/weird, special abstract cards. Can hold infinite of any access.
#define WILDCARD_LIMIT_ADMIN list(WILDCARD_NAME_ALL = list(limit = -1, usage = list()))
/**
* x1, y1, x2, y2 - Represents the bounding box for the ID card's non-transparent portion of its various icon_states.
* Used to crop the ID card's transparency away when chaching the icon for better use in tgui chat.
*/
#define ID_ICON_BORDERS 1, 9, 32, 24
-7
View File
@@ -1,9 +1,3 @@
/**
* x1, y1, x2, y2 - Represents the bounding box for the ID card's non-transparent portion of its various icon_states.
* Used to crop the ID card's transparency away when chaching the icon for better use in tgui chat.
*/
#define ID_ICON_BORDERS 1, 9, 32, 24
/// Fallback time if none of the config entries are set for USE_LOW_LIVING_HOUR_INTERN
#define INTERN_THRESHOLD_FALLBACK_HOURS 15
@@ -1700,7 +1694,6 @@
icon_state = "ctf_green"
#undef INTERN_THRESHOLD_FALLBACK_HOURS
#undef ID_ICON_BORDERS
#undef HOLOPAY_PROJECTION_INTERVAL
#define INDEX_NAME_COLOR 1
@@ -127,8 +127,13 @@
/obj/item/changeling/id/proc/get_cached_flat_icon()
if(!cached_flat_icon)
cached_flat_icon = getFlatIcon(src)
cached_flat_icon.Crop(ID_ICON_BORDERS)
return cached_flat_icon
/obj/item/changeling/id/get_id_examine_strings(mob/user)
. = ..()
. += list("[icon2html(get_cached_flat_icon(), user, extra_classes = "bigicon")]")
/obj/item/changeling/id/get_examine_string(mob/user, thats = FALSE)
return "[icon2html(get_cached_flat_icon(), user)] [thats? "That's ":""][get_examine_name(user)]" //displays all overlays in chat