mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
Makes Ghost HUD toggle persistent
This commit is contained in:
@@ -32,6 +32,7 @@ var/list/preferences_datums = list()
|
||||
var/chat_toggles = TOGGLES_DEFAULT_CHAT
|
||||
var/ghost_form = "ghost"
|
||||
var/ghost_orbit = GHOST_ORBIT_CIRCLE
|
||||
var/ghost_hud = 1
|
||||
var/allow_midround_antag = 1
|
||||
var/preferred_map = null
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["ghost_orbit"] >> ghost_orbit
|
||||
S["preferred_map"] >> preferred_map
|
||||
S["ignoring"] >> ignoring
|
||||
S["ghost_hud"] >> ghost_hud
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
if(needs_update >= 0)
|
||||
@@ -220,6 +221,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["ghost_orbit"] << ghost_orbit
|
||||
S["preferred_map"] << preferred_map
|
||||
S["ignoring"] << ignoring
|
||||
S["ghost_hud"] << ghost_hud
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -253,3 +253,14 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
set desc = "Allows you to access the Setup Character screen. Changes to your character won't take effect until next round, but other changes will."
|
||||
prefs.current_tab = 1
|
||||
prefs.ShowChoices(usr)
|
||||
|
||||
/client/verb/toggle_ghost_hud_pref()
|
||||
set name = "Toggle Ghost HUD"
|
||||
set category = "Preferences"
|
||||
set desc = "Hide/Show Ghost HUD"
|
||||
|
||||
prefs.ghost_hud = !prefs.ghost_hud
|
||||
src << "Ghost HUD will now be [prefs.ghost_hud ? "visible" : "hidden"]."
|
||||
prefs.save_preferences()
|
||||
if(istype(mob,/mob/dead/observer))
|
||||
mob.hud_used.ghost_hud()
|
||||
|
||||
Reference in New Issue
Block a user