Allow localhosts to set "dev override preferences" to load a specific preference savefile for guests (#92770)

## About The Pull Request

A verb is now available on localhost called `"Export Save as Dev
Preferences"`

This exports your current savefile to `/config/dev_preferences.json`

If you then connect to your localhost as a guest, it will load
`dev_preferences.json` as your preference datum

This allows for devs testing the game locally to load preferences for
guests.
(Guests connecting to live servers are completely unaffected.)

## Why It's Good For The Game

Initially I only did this because the recent keybinding changes have
destroyed my muscle memory when testing w/o logging in.

But as I worked on it I thought of a few other usecases, like when
implementing preference version migration - the dev preference is never
saved which means you can re-compile as much as you want without needing
to revert your save manually.
This commit is contained in:
MrMelbert
2025-08-29 18:36:56 -04:00
committed by GitHub
parent 69f21ff997
commit c2b8ef1d09
8 changed files with 40 additions and 2 deletions
@@ -132,6 +132,8 @@ SUBSYSTEM_DEF(admin_verbs)
// refresh their verbs
admin_visibility_flags[admin.ckey] ||= list()
if(admin.is_localhost())
admin_visibility_flags[admin.ckey] |= list(ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
for(var/datum/admin_verb/verb_singleton as anything in get_valid_verbs_for_admin(admin))
verb_singleton.assign_to_client(admin)
admin.init_verbs()