KILLS STATPANEL (#4877)

Co-authored-by: VM_USER <VM_USER>
Co-authored-by: silicons <no@you.cat>
This commit is contained in:
silicons
2023-01-11 09:12:35 -06:00
committed by GitHub
co-authored by VM_USER <VM_USER> silicons
parent 55da42c20a
commit fb429e51a4
245 changed files with 2957 additions and 1926 deletions
@@ -35,44 +35,44 @@
description_info = "Click the door to open or close it. It only stops air while closed.<br>\
To remove these safely, use the 'deflate' verb. Hitting these with any objects will probably puncture and break it forever."
/obj/machinery/door/get_description_interaction()
/obj/machinery/door/get_description_interaction(mob/user)
var/list/results = list()
if(!repairing && (health < maxhealth) && !(machine_stat & BROKEN))
results += "[desc_panel_image("metal sheet")]to start repairing damage (May require different material type)."
if(repairing && density)
results += "[desc_panel_image("welder")]to finish repairs."
results += "[desc_panel_image("crowbar")]to undo adding sheets for repairs."
results += "[desc_panel_image("welder", user)]to finish repairs."
results += "[desc_panel_image("crowbar", user)]to undo adding sheets for repairs."
return results
/obj/machinery/door/airlock/get_description_interaction()
/obj/machinery/door/airlock/get_description_interaction(mob/user)
var/list/results = list()
if(can_remove_electronics())
results += "[desc_panel_image("crowbar")]to remove the airlock electronics."
results += "[desc_panel_image("crowbar", user)]to remove the airlock electronics."
else
results += "[desc_panel_image("crowbar")]to open or close if unpowered/broken, and unbolted."
results += "[desc_panel_image("crowbar", user)]to open or close if unpowered/broken, and unbolted."
if(welded)
results += "[desc_panel_image("welder")]to unweld, allowing it to open again."
results += "[desc_panel_image("welder", user)]to unweld, allowing it to open again."
else
results += "[desc_panel_image("welder")]to weld, preventing it from opening."
results += "[desc_panel_image("welder", user)]to weld, preventing it from opening."
if(p_open)
results += "[desc_panel_image("screwdriver")]to close the wire panel."
results += "[desc_panel_image("wirecutters")]to cut an internal wire while hacking."
results += "[desc_panel_image("multitool")]to pulse an internal wire while hacking."
results += "[desc_panel_image("screwdriver", user)]to close the wire panel."
results += "[desc_panel_image("wirecutters", user)]to cut an internal wire while hacking."
results += "[desc_panel_image("multitool", user)]to pulse an internal wire while hacking."
else
results += "[desc_panel_image("screwdriver")]to open the wire panel, enabling the ability to hack."
results += "[desc_panel_image("screwdriver", user)]to open the wire panel, enabling the ability to hack."
results += ..()
return results
/obj/machinery/portable_atmospherics/canister/get_description_interaction()
/obj/machinery/portable_atmospherics/canister/get_description_interaction(mob/user)
var/list/results = list()
results += "[desc_panel_image("wrench")]to connect or disconnect from a connector port below."
results += "[desc_panel_image("wrench", user)]to connect or disconnect from a connector port below."
results += "[desc_panel_image("air tank")]to fill the air tank from this canister."
return results
+12 -12
View File
@@ -1,33 +1,33 @@
/turf/simulated/wall
description_info = "You can build a wall by using metal sheets and making a girder, then adding more metal or plasteel."
/turf/simulated/wall/get_description_interaction()
/turf/simulated/wall/get_description_interaction(mob/user)
var/list/results = list()
if(damage)
results += "[desc_panel_image("welder")]to repair."
results += "[desc_panel_image("welder", user)]to repair."
if(isnull(construction_stage) || !reinf_material)
results += "[desc_panel_image("welder")]to deconstruct if undamaged."
results += "[desc_panel_image("welder", user)]to deconstruct if undamaged."
else
switch(construction_stage)
if(6)
results += "[desc_panel_image("wirecutters")]to begin deconstruction."
results += "[desc_panel_image("wirecutters", user)]to begin deconstruction."
if(5)
results += list(
"[desc_panel_image("screwdriver")]to continue deconstruction.",
"[desc_panel_image("wirecutters")]to reverse deconstruction."
"[desc_panel_image("screwdriver", user)]to continue deconstruction.",
"[desc_panel_image("wirecutters", user)]to reverse deconstruction."
)
if(4)
results += list(
"[desc_panel_image("welder")]to continue deconstruction.",
"[desc_panel_image("screwdriver")]to reverse deconstruction."
"[desc_panel_image("welder", user)]to continue deconstruction.",
"[desc_panel_image("screwdriver", user)]to reverse deconstruction."
)
if(3)
results += "[desc_panel_image("crowbar")]to continue deconstruction."
results += "[desc_panel_image("crowbar", user)]to continue deconstruction."
if(2)
results += "[desc_panel_image("wrench")]to continue deconstruction."
results += "[desc_panel_image("wrench", user)]to continue deconstruction."
if(1)
results += "[desc_panel_image("welder")]to continue deconstruction."
results += "[desc_panel_image("welder", user)]to continue deconstruction."
if(0)
results += "[desc_panel_image("crowbar")]to finish deconstruction."
results += "[desc_panel_image("crowbar", user)]to finish deconstruction."
return results
+16 -14
View File
@@ -29,12 +29,12 @@
return
// This one is slightly different, in that it must return a list.
/atom/proc/get_description_interaction()
/atom/proc/get_description_interaction(mob/user)
return list()
// Quickly adds the boilerplate code to add an image and padding for the image.
/proc/desc_panel_image(var/icon_state)
return "\icon[description_icons[icon_state]][EXAMINE_PANEL_PADDING]"
/proc/desc_panel_image(var/icon_state, mob/user)
return "[icon2html(description_icons[icon_state], user)][EXAMINE_PANEL_PADDING]"
/mob/living/get_description_fluff()
if(flavor_text) //Get flavor text for the green text.
@@ -53,27 +53,29 @@
description_holders["info"] = A.get_description_info()
description_holders["fluff"] = A.get_description_fluff()
description_holders["antag"] = (update_antag_info)? A.get_description_antag() : ""
description_holders["interactions"] = A.get_description_interaction()
description_holders["interactions"] = A.get_description_interaction(mob)
description_holders["name"] = "[A.name]"
description_holders["icon"] = "\icon[A]" //this is icon not icon2html
description_holders["icon"] = "[icon2html(A, src)]" //this is icon not icon2html
description_holders["desc"] = A.desc
/mob/Stat()
/mob/statpanel_data(client/C)
. = ..()
if(client && statpanel("Examine"))
var/description_holders = client.description_holders
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.
if(C.statpanel_tab("Examine", TRUE))
var/description_holders = C.description_holders
if(!description_holders)
return // piece of shit don't update when it's not there
STATPANEL_DATA_LINE("[description_holders["icon"]] <font size='5'>[description_holders["name"]]</font>") //The name, written in big letters.
STATPANEL_DATA_LINE("[description_holders["desc"]]") //the default examine text.
if(description_holders["info"])
stat(null,"<font color='#084B8A'><b>[description_holders["info"]]</b></font>") //Blue, informative text.
STATPANEL_DATA_LINE("<font color='#084B8A'><b>[description_holders["info"]]</b></font>") //Blue, informative text.
if(description_holders["interactions"])
for(var/line in description_holders["interactions"])
stat(null, "<font color='#084B8A'><b>[line]</b></font>")
STATPANEL_DATA_LINE("<font color='#084B8A'><b>[line]</b></font>")
if(description_holders["fluff"])
stat(null,"<font color='#298A08'><b>[description_holders["fluff"]]</b></font>") //Yellow, fluff-related text.
STATPANEL_DATA_LINE("<font color='#298A08'><b>[description_holders["fluff"]]</b></font>") //Yellow, fluff-related text.
if(description_holders["antag"])
stat(null,"<font color='#8A0808'><b>[description_holders["antag"]]</b></font>") //Red, malicious antag-related text
STATPANEL_DATA_LINE("<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())