[PORT] Examine Block (#15267)

* bo

* e

* okay gaming

* whiios

* wona
This commit is contained in:
Bop
2022-08-15 00:37:39 +07:00
committed by GitHub
parent ab0a730d15
commit db04f95cb7
25 changed files with 210 additions and 168 deletions

View File

@@ -444,10 +444,10 @@
* COMSIG_ATOM_GET_EXAMINE_NAME signal
*/
/atom/proc/get_examine_name(mob/user)
. = "\a [src]"
. = "\a <b>[src]</b>"
var/list/override = list(gender == PLURAL ? "some" : "a", " ", "[name]")
if(article)
. = "[article] [src]"
. = "[article] <b>[src]</b>"
override[EXAMINE_POSITION_ARTICLE] = article
if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED)
. = override.Join("")
@@ -465,7 +465,11 @@
* Produces a signal COMSIG_PARENT_EXAMINE
*/
/atom/proc/examine(mob/user)
. = list("[get_examine_string(user, TRUE)].")
var/examine_string = get_examine_string(user, thats = TRUE)
if(examine_string)
. = list("[examine_string].")
else
. = list()
if(desc)
. += desc
@@ -480,8 +484,8 @@
. += "It contains:"
if(length(reagents.reagent_list))
if(user.can_see_reagents()) //Show each individual reagent
for(var/datum/reagent/R in reagents.reagent_list)
. += "[R.volume] units of [R.name]"
for(var/datum/reagent/current_reagent in reagents.reagent_list)
. += "&bull; [round(current_reagent.volume, 0.01)] units of [current_reagent.name]"
else //Otherwise, just show the total volume
var/total_volume = 0
for(var/datum/reagent/R in reagents.reagent_list)