Files
John Willard e698a66f5e Fixes a merge conflict that broke stat panel (#96071)
## About The Pull Request

Fixes a merge conflict between 2 of my stat panel PRs that caused the
'Toggle Stat Panel' button to not work.
Also converts more skin stuff to defines that I missed in the last PR.

## Why It's Good For The Game

Button works wahoo!

## Changelog

🆑
fix: Stat panel's "Toggle Stat Panel" button now works.
/🆑
2026-05-14 22:35:12 -07:00

22 lines
803 B
Plaintext

/client/verb/toggle_stat_panel()
set name = "Toggle Stat Panel"
set hidden = TRUE
//Flip it
prefs.write_preference(GLOB.preference_entries[/datum/preference/toggle/statpanel], !prefs.read_preference(/datum/preference/toggle/statpanel))
set_stat_panel()
///Sets the stat panel's visibility to the player, depending on whether they need it/have it enabled or not.
/client/proc/set_stat_panel()
if(prefs.read_preference(/datum/preference/toggle/statpanel) || needs_stat_panel())
winset(src, SKIN_INFOWINDOW_CHILD, "left=statwindow")
else
winset(src, SKIN_INFOWINDOW_CHILD, "left=null")
///Returns TRUE if the player has something that necessitates the stat panel.
/client/proc/needs_stat_panel()
if(holder || interviewee)
return TRUE
. = mob.get_status_tab_items()
return length(.) >= 2