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:
BurrowdevandClaude Opus 5.5 committed 2026-10-20 23:44:11 +03:00
1 parent da9f2fd5a6
commit a860a67626
4 files changed
+32 -8

No files matched your search

+9 -3
View File
@@ -459,11 +459,14 @@ const sendAvatarCreate = (to, target) => {
avatar.questLevel || 0,
1, // userNameModeratedFlag
lastSeenField(account, Boolean(findOnline(account.username))), // daysSinceLastLogin: see lib/player.js
// optional-field flags: bit 0 accountType, bit 1 nameBarData, bit 2 pet
pet ? 7 : 3,
// optional-field flags: bit 0 accountType, bit 1 nameBarData, bit 2 pet,
// bit 3 a blend colour (none: 0), bit 4 guide (the name tag and bubble
// every client draws for a guide)
3 | (pet ? 4 : 0) | (account.isGuide ? 24 : 0),
account.accountType,
account.nameBarData,
...(pet ? petFields(pet) : []));
...(pet ? petFields(pet) : []),
...(account.isGuide ? [0, 1] : []));
sendItemList(to, target, false);
disguises.show(to, target);
if (target.invisible) {
@@ -692,6 +695,9 @@ const handlers = {
if (motd) {
tell(session, motd);
}
if (session.account.guideRefused) {
session.sendXt("xtl", -1, "Guide is only for players the Burrow team has made guides.");
}
buddies.greet(session);
minigames.greet(session);
moderation.greet(session);