mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 17:37:50 -05:00
feat(guide): guides only by the admin, and seen by everyone
The login's Guide option made a player a guide on their own screen only: the room's avatar packet never said so, so everyone else drew a plain player. "ac" now sends the guide field (bit 4, after a blend colour of 0), which gives the guide's name tag and chat bubble on every client. Guide is now given in the admin panel (Make guide / Remove guide, logged). Asked for at login by anyone else, it is refused, with a plain message on arrival. A guide's custom client can still leave it off; the official launcher asks nothing, and a guide shows as one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
da9f2fd5a6
commit
a860a67626
4 files changed
+32
-8
No files matched your search
@@ -149,6 +149,7 @@ const accountRow = (account, playing) => {
|
||||
twoStep: totp.isOn(account),
|
||||
discord: account.discord,
|
||||
adminDashboardAccess: Boolean(account.adminDashboardAccess),
|
||||
guide: account.guideGiven === true,
|
||||
bio: account.bio,
|
||||
badges: account.badges,
|
||||
featuresOff: accounts.FEATURES.filter(name => !accounts.featureOn(account, name)),
|
||||
@@ -534,6 +535,15 @@ const act = (account, body) => {
|
||||
`+${(account.permGrants || []).join(",") || "none"} -${(account.permDenies || []).join(",") || "none"}`);
|
||||
return {ok: `${name}'s permissions are saved.`};
|
||||
}
|
||||
// guide: lets the player log in as one (lib/accounts.js setLoginChoices).
|
||||
// it shows from their next login.
|
||||
case "guide": {
|
||||
const on = body.on === true;
|
||||
account.guideGiven = on;
|
||||
accounts.save(account);
|
||||
modlog.record("admin", on ? "made a guide" : "no longer a guide", account.username, "");
|
||||
return {ok: on ? `${name} is a guide from their next login.` : `${name} is no longer a guide from their next login.`};
|
||||
}
|
||||
case "adminDashboardAccess": {
|
||||
const on = body.on === true;
|
||||
if (on && !account.discordId) {
|
||||
|
||||
Reference in new issue
Block a user