feat: discord linking, @tags, music and sfx sliders, required device ids

- Discord: the account page links a player's Discord account through
  Discord's sign-in (lib/discord.js); only linked names are shown on cards
  (typed ones are cleared). A bot keeps the Server Booster badge on linked
  accounts that boost. The game tells the client where the player is, for
  the client's Discord rich presence (flashvars discordAppId).
- @username tags in chat, chat balloons and wall posts: only real players'
  names (asked of the server, "xmn"), names with spaces too, drawn on a
  blue box; a click opens the player's card.
- Settings: separate Music and SFX volume sliders for the old one.
- Device ids required: a launcher that sends none (before 1.3.0) is told
  at the game's login "Your client is outdated. Update at
  https://burrow.moe/download". AJ_REQUIRE_DEVICE=0 turns it off.
- Panels: clear a player's Jammer Wall posts; turning away masterpieces
  and player items asks first.
- Item Giver: negative colour ids (the same colour written signed).
- buildVersion 71; the client rebuilt with Snipzil's sitting fix.
This commit is contained in:
Burrowdev committed 2026-10-18 19:35:51 +03:00
1 parent 1d9b70f32e
commit 33f56074a4
35 files changed
+2076 -101

No files matched your search

+4 -2
View File
@@ -164,8 +164,10 @@ const run = async () => {
assert.match(await told(a), /0 read Jam-A-Grams deleted/);
say(a, roomId, "!music all");
const tracks = await a.untilXt("di");
assert.match(await told(a), /66 music tracks added/);
assert.ok(Number(tracks[3]) >= 66);
// the game's 55 tracks and this server's own (lib/extramusic.js)
const allTracks = 55 + require("../lib/extramusic.js").TRACKS.length;
assert.match(await told(a), new RegExp(`${allTracks} music tracks added`));
assert.ok(Number(tracks[3]) >= allTracks);
say(a, roomId, "!music all");
await a.untilXt("di");
assert.match(await told(a), /every music track already/);
+12 -2
View File
@@ -339,7 +339,10 @@ const run = async () => {
a.xt("al", denId, "Alice");
assert.deepStrictEqual((await a.nextXt("al")).slice(5, 7), ["2", aa[3]]);
a.xt("ak", denId, aa[3]); // cannot remove the animal in use
assert.strictEqual((await a.nextXt("ak"))[2], "0");
const notRemoved = await a.nextXt("ak");
assert.strictEqual(notRemoved[2], "0");
// the second field is the gems the animal switcher then shows: the total
assert.ok(Number(notRemoved[3]) > 0, `gems after "ak": ${notRemoved[3]}`);
a.xt("gl", denId, 312);
const petShop = await a.nextXt("gl");
@@ -427,6 +430,10 @@ const run = async () => {
assert.strictEqual((await giveJson({username: "Alice", kind: "clothing", id: hat.id, colorIndex: 0})).status, 200);
const pushed = await a.nextXt("il");
assert.deepStrictEqual([pushed[2], pushed[10]], ["2", String(hat.id)]);
// a colour id written signed is the same colour, kept unsigned (lib/admin.js)
assert.strictEqual((await giveJson({username: "Alice", kind: "clothing", id: hat.id, color: "-16777216"})).status, 200);
assert.strictEqual((await a.nextXt("il"))[6], "4278190080");
assert.strictEqual((await giveJson({username: "Alice", kind: "clothing", id: hat.id, color: "-99999999999"})).status, 400);
assert.strictEqual((await giveJson({username: "Alice", kind: "clothing", id: 1})).status, 400);
assert.strictEqual((await giveJson({username: "Nobody", kind: "den", id: 6})).status, 404);
assert.strictEqual((await giveJson({username: "Alice", kind: "den", id: 6})).status, 200);
@@ -608,7 +615,10 @@ const run = async () => {
await a.untilXt("il");
a.xt("il", denId, "Alice", 1, 1);
assert.ok((await a.untilXt("il")).includes("123456789"));
assert.strictEqual((await giveJson({username: "Alice", kind: "clothing", id: hat.id, color: "-5"})).status, 400);
// negative: the same colour written signed (-5 is 4294967291); not a number at all is refused
assert.strictEqual((await giveJson({username: "Alice", kind: "clothing", id: hat.id, color: "-5"})).status, 200);
assert.ok((await a.untilXt("il")).includes("4294967291"));
assert.strictEqual((await giveJson({username: "Alice", kind: "clothing", id: hat.id, color: "5x"})).status, 400);
// --- the item defs clients get: ocean eyes (314) allowed on every animal
const {decode} = require("../lib/amf3.js");