mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
## About The Pull Request Un-hides the secret toggle-stat-panel verb ## Why It's Good For The Game Friday somehow hid the stat panel and didn't know how to fix it. It'll probably happen again with somebody else. ## Changelog 🆑 LT3 add: Toggle Stat Panel is now available in the OOC panel /🆑
23 lines
924 B
Plaintext
23 lines
924 B
Plaintext
/client/verb/toggle_stat_panel()
|
|
set name = "Toggle Stat Panel"
|
|
set category = "OOC" // BUBBER EDIT ADDITION - SHOW STAT PANEL TOGGLE
|
|
// set hidden = TRUE // BUBBER EDIT CHANGE - SHOW STAT PANEL TOGGLE
|
|
|
|
//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
|