Skip to content

Commit

Permalink
Adds a link to the examine tab when examining things that have extra …
Browse files Browse the repository at this point in the history
…examine info (#6568)

## About The Pull Request

![dreamseeker_k3TNlM68aV](https://github.com/Citadel-Station-13/Citadel-Station-13-RP/assets/6356337/00f9ec5d-dcc4-47d2-b618-fd8d2c110e55)


## Why It's Good For The Game

![krita_GRHFVqsQ49](https://github.com/Citadel-Station-13/Citadel-Station-13-RP/assets/6356337/5bf8f7d2-aa83-420e-91fd-f860d05650a8)

(There's currently no notice at all that something has extra examine
information. Which in turn means it's *very* easy to miss information
that would otherwise prevent incidents like what the above image
represents the prelude of)

## Changelog

:cl: Bhijn and Myr
qol: When examining something that has extra info, the examine box will
now contain a link that opens up the examine tab
/:cl:
  • Loading branch information
deathride58 committed Jul 5, 2024
1 parent 450ecba commit 1c80e92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/game/atoms/atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@
. += get_name_chaser(user)
if(desc)
. += "<hr>[desc]"
if(get_description_info() || get_description_fluff() || length(get_description_interaction(user)))
. += SPAN_TINYNOTICE("<a href='byond://winset?command=.statpanel_goto_tab \"Examine\"'>For more information, click here.</a>") //This feels VERY HACKY but eh its PROBABLY fine
if(integrity_flags & INTEGRITY_INDESTRUCTIBLE)
. += SPAN_NOTICE("It doesn't look like it can be damaged through common means.")
/*
Expand Down
9 changes: 9 additions & 0 deletions code/modules/client/statpanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,15 @@

statpanel_tab = tab

/**
* This cleanly and gracefully attempts to go to a specific tab via , for the hyperspecific purpose of interacting with the statpanel from other HTML UI
*/
/client/verb/hook_statpanel_goto_tab(tab as text)
set name = ".statpanel_goto_tab"
set hidden = TRUE
set instant = TRUE
src << output(tab, "statbrowser:change_tab")

//! verb hooks - byond stat

//! verb hooks - tab switcher
Expand Down

0 comments on commit 1c80e92

Please sign in to comment.