mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +01:00
Reworks examine (a little) (#86506)
## About The Pull Request Basically, reworks how examining things looks to the user. #86497 is required even though this pretty much replaces the entire PR. Examining random objects and simplemobs:   Examining a person:   Examining an ID card a person is wearing (by clicking the hyperlink adorning the ID card when examining them): (Note, you can only pull up this if you are within 3 tiles of the person)  ## Why It's Good For The Game Examine is very old and very inconsistent between atoms and mobs. So I thought I could spruce it up a bit while bringing some consistency along. This should also help with losing certain details in massive walls of examine text - stuff like names will stick out more. ## Changelog 🆑 Melbert qol: The way examine looks has been updated. qol: A person's ID card no longer appears with a big icon on examine. You can now click on their ID card (in the chat box) to get a bigger picture of it, as well as information about them. refactor: Much of examine backend code has been refactored, report any odd looking text. /🆑
This commit is contained in:
@@ -106,7 +106,7 @@
|
||||
return FALSE
|
||||
to_chat(src, span_bold(playstyle_string))
|
||||
|
||||
/mob/living/basic/construct/examine(mob/user)
|
||||
/mob/living/basic/construct/get_examine_name(mob/user)
|
||||
var/text_span
|
||||
switch(theme)
|
||||
if(THEME_CULT)
|
||||
@@ -115,13 +115,20 @@
|
||||
text_span = "purple"
|
||||
if(THEME_HOLY)
|
||||
text_span = "blue"
|
||||
. = list("<span class='[text_span]'>This is [icon2html(src, user)] \a <b>[src]</b>!\n[desc]")
|
||||
|
||||
if(!text_span)
|
||||
return ..()
|
||||
|
||||
return "<span class='[text_span]'>[..()]</span>"
|
||||
|
||||
/mob/living/basic/construct/examine(mob/user)
|
||||
. = list()
|
||||
if(health < maxHealth)
|
||||
if(health >= maxHealth/2)
|
||||
. += span_warning("[p_They()] look[p_s()] slightly dented.")
|
||||
else
|
||||
. += span_warning(span_bold("[p_They()] look[p_s()] severely dented!"))
|
||||
. += "</span>"
|
||||
|
||||
return .
|
||||
|
||||
/mob/living/basic/construct/narsie_act()
|
||||
|
||||
@@ -276,21 +276,21 @@
|
||||
return icon('icons/mob/butts.dmi', BUTT_SPRITE_DRONE)
|
||||
|
||||
/mob/living/basic/drone/examine(mob/user)
|
||||
. = list("<span class='info'>This is [icon2html(src, user)] \a <b>[src]</b>!")
|
||||
. = list()
|
||||
|
||||
//Hands
|
||||
for(var/obj/item/held_thing in held_items)
|
||||
if(held_thing.item_flags & (ABSTRACT|EXAMINE_SKIP|HAND_ITEM))
|
||||
continue
|
||||
. += "It has [held_thing.get_examine_string(user)] in its [get_held_index_name(get_held_index_of_item(held_thing))]."
|
||||
. += "It has [held_thing.examine_title(user)] in its [get_held_index_name(get_held_index_of_item(held_thing))]."
|
||||
|
||||
//Internal storage
|
||||
if(internal_storage && !(internal_storage.item_flags & ABSTRACT))
|
||||
. += "It is holding [internal_storage.get_examine_string(user)] in its internal storage."
|
||||
. += "It is holding [internal_storage.examine_title(user)] in its internal storage."
|
||||
|
||||
//Cosmetic hat - provides no function other than looks
|
||||
if(head && !(head.item_flags & ABSTRACT))
|
||||
. += "It is wearing [head.get_examine_string(user)] on its head."
|
||||
. += "It is wearing [head.examine_title(user)] on its head."
|
||||
|
||||
//Braindead
|
||||
if(!client && stat != DEAD)
|
||||
@@ -313,8 +313,6 @@
|
||||
. += span_deadsay("A message repeatedly flashes on its display: \"REBOOT -- REQUIRED\".")
|
||||
else
|
||||
. += span_deadsay("A message repeatedly flashes on its display: \"ERROR -- OFFLINE\".")
|
||||
. += "</span>"
|
||||
|
||||
|
||||
/mob/living/basic/drone/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt maintenance drones.
|
||||
return -10
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
. = ..()
|
||||
if(isnull(internal_storage) || (internal_storage.item_flags & ABSTRACT))
|
||||
return
|
||||
. += span_info("It is holding [internal_storage.get_examine_string(user)] in its internal storage.")
|
||||
. += span_info("It is holding [internal_storage.examine_title(user)] in its internal storage.")
|
||||
|
||||
/mob/living/basic/guardian/dextrous/recall_effects()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user