mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Examine tab modularity
Also fixes antag info text sticking around if antag/observer status is lost
This commit is contained in:
@@ -201,6 +201,7 @@ its easier to just keep the beam vertical.
|
|||||||
f_name += "oil-stained [name][infix]."
|
f_name += "oil-stained [name][infix]."
|
||||||
|
|
||||||
user << "\icon[src] That's [f_name] [suffix]"
|
user << "\icon[src] That's [f_name] [suffix]"
|
||||||
|
user << desc
|
||||||
|
|
||||||
return distance == -1 || (get_dist(src, user) <= distance)
|
return distance == -1 || (get_dist(src, user) <= distance)
|
||||||
|
|
||||||
|
|||||||
@@ -40,18 +40,17 @@
|
|||||||
|
|
||||||
/client/var/description_holders[0]
|
/client/var/description_holders[0]
|
||||||
|
|
||||||
/client/proc/update_description_holders(atom/A)
|
/client/proc/update_description_holders(atom/A, update_antag_info=0)
|
||||||
description_holders["info"] = A.get_description_info()
|
description_holders["info"] = A.get_description_info()
|
||||||
description_holders["fluff"] = A.get_description_fluff()
|
description_holders["fluff"] = A.get_description_fluff()
|
||||||
if(mob.mind && mob.mind.special_role || isobserver(src)) //ghosts don't have minds.
|
description_holders["antag"] = (update_antag_info)? A.get_description_antag() : ""
|
||||||
description_holders["antag"] = A.get_description_antag()
|
|
||||||
|
|
||||||
description_holders["name"] = "[A.name]"
|
description_holders["name"] = "[A.name]"
|
||||||
description_holders["icon"] = "\icon[A]"
|
description_holders["icon"] = "\icon[A]"
|
||||||
description_holders["desc"] = A.desc
|
description_holders["desc"] = A.desc
|
||||||
|
|
||||||
/client/Stat()
|
/client/Stat()
|
||||||
..()
|
. = ..()
|
||||||
if(statpanel("Examine"))
|
if(statpanel("Examine"))
|
||||||
stat(null,"[description_holders["icon"]] <font size='5'>[description_holders["name"]]</font>") //The name, written in big letters.
|
stat(null,"[description_holders["icon"]] <font size='5'>[description_holders["name"]]</font>") //The name, written in big letters.
|
||||||
stat(null,"[description_holders["desc"]]") //the default examine text.
|
stat(null,"[description_holders["desc"]]") //the default examine text.
|
||||||
@@ -60,4 +59,13 @@
|
|||||||
if(description_holders["fluff"])
|
if(description_holders["fluff"])
|
||||||
stat(null,"<font color='#298A08'><b>[description_holders["fluff"]]</b></font>") //Yellow, fluff-related text.
|
stat(null,"<font color='#298A08'><b>[description_holders["fluff"]]</b></font>") //Yellow, fluff-related text.
|
||||||
if(description_holders["antag"])
|
if(description_holders["antag"])
|
||||||
stat(null,"<font color='#8A0808'><b>[description_holders["antag"]]</b></font>") //Red, malicious antag-related text
|
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(..())
|
||||||
|
return 1
|
||||||
|
|
||||||
|
var/is_antag = ((mind && mind.special_role) || isobserver(src)) //ghosts don't have minds
|
||||||
|
if(client)
|
||||||
|
client.update_description_holders(A, is_antag)
|
||||||
|
|||||||
@@ -228,13 +228,10 @@ var/list/slot_equipment_priority = list( \
|
|||||||
|
|
||||||
if((is_blind(src) || usr.stat) && !isobserver(src))
|
if((is_blind(src) || usr.stat) && !isobserver(src))
|
||||||
src << "<span class='notice'>Something is there but you can't see it.</span>"
|
src << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||||
return
|
return 1
|
||||||
|
|
||||||
face_atom(A)
|
face_atom(A)
|
||||||
A.examine(src)
|
A.examine(src)
|
||||||
|
|
||||||
if(client)
|
|
||||||
client.update_description_holders(A)
|
|
||||||
|
|
||||||
/mob/verb/pointed(atom/A as mob|obj|turf in view())
|
/mob/verb/pointed(atom/A as mob|obj|turf in view())
|
||||||
set name = "Point To"
|
set name = "Point To"
|
||||||
|
|||||||
Reference in New Issue
Block a user