mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #9900 from VOREStation/upstream-merge-7958
[MIRROR] Fixes context-menu examine expanding incorrect target
This commit is contained in:
committed by
Chompstation Bot
parent
9e2af79bc3
commit
6af8ca393b
@@ -10,3 +10,7 @@
|
||||
viewX = text2num(viewrangelist[1])
|
||||
viewY = text2num(viewrangelist[2])
|
||||
return list(viewX, viewY)
|
||||
|
||||
// Used to get `atom/O as obj|mob|turf in view()` to match against strings containing apostrophes immediately after substrings that match to other objects. Somehow. - Ater
|
||||
/proc/_validate_atom(atom/A)
|
||||
return view()
|
||||
@@ -76,9 +76,4 @@
|
||||
onclose(usr, "admin_dialogue_log")
|
||||
|
||||
|
||||
feedback_add_details("admin_verb","PDL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
// Used to get `atom/O as obj|mob|turf in view()` to match against strings containing apostrophes immediately after substrings that match to other objects. Somehow. - Ater
|
||||
/proc/admin_atom_validate(atom/A)
|
||||
return view()
|
||||
feedback_add_details("admin_verb","PDL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -629,7 +629,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("[key_name_admin(src)] has created a command report", 1)
|
||||
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in admin_atom_validate(O)) // I don't understand precisely how this fixes the string matching against a substring, but it does - Ater
|
||||
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in _validate_atom(O)) // I don't understand precisely how this fixes the string matching against a substring, but it does - Ater
|
||||
set category = "Admin"
|
||||
set name = "Delete"
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -194,25 +194,6 @@
|
||||
client.eye = loc
|
||||
return TRUE
|
||||
|
||||
//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 view())
|
||||
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>"))
|
||||
|
||||
/mob/verb/pointed(atom/A as mob|obj|turf in view())
|
||||
set name = "Point To"
|
||||
set category = "Object"
|
||||
|
||||
Reference in New Issue
Block a user