Merge pull request #9900 from VOREStation/upstream-merge-7958

[MIRROR] Fixes context-menu examine expanding incorrect target
This commit is contained in:
Novacat
2021-03-10 14:46:32 -05:00
committed by Chompstation Bot
parent 9e2af79bc3
commit 6af8ca393b
5 changed files with 22 additions and 28 deletions

View File

@@ -76,10 +76,24 @@
stat(null,"<font color='#8A0808'><b>[description_holders["antag"]]</b></font>") //Red, malicious antag-related text
//override examinate verb to update description holders when things are examined
/mob/examinate(atom/A as mob|obj|turf in view())
if(..())
//mob verbs are faster than object verbs. See http://www.byond.com/forum/?post=1326139&page=2#comment8198716 for why this isn't atom/verb/examine()
/mob/verb/examinate(atom/A as mob|obj|turf in _validate_atom(A))
set name = "Examine"
set category = "IC"
if((is_blind(src) || usr.stat) && !isobserver(src))
to_chat(src, "<span class='notice'>Something is there but you can't see it.</span>")
return 1
//Could be gone by the time they finally pick something
if(!A)
return 1
face_atom(A)
var/list/results = A.examine(src)
if(!results || !results.len)
results = list("You were unable to examine that. Tell a developer!")
to_chat(src, jointext(results, "<br>"))
update_examine_panel(A)
/mob/proc/update_examine_panel(var/atom/A)