mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 01:27:51 -05:00
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:
1 parent
1d9b70f32e
commit
33f56074a4
35 files changed
+2076
-101
No files matched your search
+15
-8
@@ -8,6 +8,7 @@ const accounts = require("./accounts.js");
|
||||
const achievements = require("./achievements.js");
|
||||
const adopt = require("./adopt.js");
|
||||
const badges = require("./badges.js");
|
||||
const discordLinks = require("./discord.js");
|
||||
const bans = require("./bans.js");
|
||||
const colours = require("./colours.js");
|
||||
const chatlog = require("./chatlog.js");
|
||||
@@ -452,16 +453,13 @@ const act = (account, body) => {
|
||||
world.checkNameTag(account);
|
||||
return {ok: account.badges.length ? `${name} has: ${badges.of(account).map(badge => badge.label).join(", ")}.` : `${name} has no badges.`};
|
||||
}
|
||||
// their Discord username, which they otherwise set on the account
|
||||
// page; empty takes it off.
|
||||
// their linked Discord account (lib/discord.js), taken off.
|
||||
case "discord": {
|
||||
const discord = badges.discordName(body.name);
|
||||
if (discord === null) {
|
||||
return {error: "Not a Discord username."};
|
||||
// only taken off: a player links their own (lib/discord.js)
|
||||
if (String(body.name || "") !== "") {
|
||||
return {error: "Players link their Discord themselves, on the account page."};
|
||||
}
|
||||
account.discord = discord;
|
||||
accounts.save(account);
|
||||
return {ok: discord ? `Discord set to "${discord}".` : "Discord cleared."};
|
||||
return discordLinks.unlink(account) ? {ok: "Discord unlinked."} : {error: `${name} has no Discord linked.`};
|
||||
}
|
||||
// their bio, which they otherwise write on the account page; empty
|
||||
// takes it off.
|
||||
@@ -572,6 +570,15 @@ const act = (account, body) => {
|
||||
case "clearDen":
|
||||
actions.clearDen(account);
|
||||
return {ok: `Everything in ${name}'s den went back to their inventory.`};
|
||||
case "clearWallPosts": {
|
||||
const {posts, replies, walls} = actions.clearWallPosts(account);
|
||||
if (!posts) {
|
||||
return {error: `${name} has no posts on any Jammer Wall.`};
|
||||
}
|
||||
const text = `${posts} wall ${posts === 1 ? "post" : "posts"} by ${name} removed from ${walls} ${walls === 1 ? "wall" : "walls"}`
|
||||
+ `${replies ? ` (with ${replies} ${replies === 1 ? "reply" : "replies"} to them)` : ""}.`;
|
||||
return {ok: text, detail: `${posts} posts, ${replies} replies, ${walls} walls`};
|
||||
}
|
||||
case "gems": {
|
||||
const amount = wholeNumber(body.amount, -MAX_GEMS, MAX_GEMS);
|
||||
if (amount === null) {
|
||||
|
||||
Reference in new issue
Block a user