mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09:37:50 -05:00
feat: stats graphs, playtime, ip search against ban evasion, 150-char chat
- stats graphs for the admin and moderator panels (lib/stats.js, public/stats-view.html) - playtime, private unless shown on the card's bio tab; set on the account page - search accounts by ip address, only against ban evasion; mods see no addresses and each search is logged - privacy policy for the above (terms version 2026-10-17) - the per-second save looks only at accounts in play, with a slow sweep of the rest - items in several dens at once; chat filter hides slurs and threats by default - sexual usernames refused; moderators may enter full rooms; guide login allowed - 150-character chat box (client build 55) - fixes: gifts, trades, dens, pets in dens, den recycling, special animals' colours, jammer walls, settings switches; the buddy list sent at login - the item giver, the rules screen and the art studio rework
This commit is contained in:
1 parent
8400d2f928
commit
04f468af2c
56 files changed
+25667
-3894
No files matched your search
+11
-10
@@ -166,22 +166,22 @@ module.exports = ({findOnline, players, watchers, sendItemList, blocks, setHideB
|
||||
const activeDenDef = account => (account.dens.find(den => den.inv === account.activeDen) || account.dens[0]).def;
|
||||
|
||||
const layoutOf = owner => owner.denItems
|
||||
.filter(item => item.placed && item.den === owner.activeDen)
|
||||
.map(item => ({def: item.def, version: item.version, x: item.x, y: item.y, flip: item.flip}));
|
||||
.filter(item => dens.spotOf(item, owner.activeDen))
|
||||
.map(item => ({def: item.def, version: item.version, ...dens.spotOf(item, owner.activeDen)}));
|
||||
|
||||
// lays the account's den in use out as `layout` says, with its own items.
|
||||
// with `giveMissing`, items it lacks are added to its inventory first.
|
||||
// returns how many of the layout's items could not be placed.
|
||||
// lays the account's den in use out as `layout` says, with its own items
|
||||
// (whether or not they stand in other dens too). with `giveMissing`, items
|
||||
// it lacks are added to its inventory first. returns how many of the
|
||||
// layout's items could not be placed.
|
||||
const applyLayout = (session, layout, giveMissing) => {
|
||||
const {account} = session;
|
||||
for (const item of account.denItems.filter(candidate => candidate.den === account.activeDen)) {
|
||||
item.placed = false;
|
||||
item.x = item.y = item.flip = 0;
|
||||
for (const item of account.denItems.filter(candidate => dens.spotOf(candidate, account.activeDen))) {
|
||||
delete item.spots[account.activeDen];
|
||||
}
|
||||
const used = new Set();
|
||||
let missing = 0;
|
||||
for (const spot of layout) {
|
||||
let item = account.denItems.find(candidate => !used.has(candidate) && !candidate.placed
|
||||
let item = account.denItems.find(candidate => !used.has(candidate)
|
||||
&& candidate.def === spot.def && candidate.version === spot.version);
|
||||
if (!item && giveMissing && account.denItems.length < MAX_DEN_ITEMS && defpacks.denItemIds().includes(spot.def)) {
|
||||
item = dens.giveDenItem(account, spot.def, spot.version);
|
||||
@@ -191,7 +191,8 @@ module.exports = ({findOnline, players, watchers, sendItemList, blocks, setHideB
|
||||
continue;
|
||||
}
|
||||
used.add(item);
|
||||
Object.assign(item, {placed: true, den: account.activeDen, x: spot.x, y: spot.y, flip: spot.flip});
|
||||
item.spots = item.spots || {};
|
||||
item.spots[account.activeDen] = {cat: spot.cat || 1, x: spot.x, y: spot.y, flip: spot.flip};
|
||||
}
|
||||
accounts.save();
|
||||
dens.sendDenItems(session);
|
||||
|
||||
Reference in new issue
Block a user