fix: eco items, wall, photo booth, chat emoji, den fixes

- the eco den items work: the Eco Shop sells the real eco items, solar
  panels and wind turbines placed in the den in use earn eco credits, lamps
  switch on while there is power for them, and the eco score earns the
  three eco plaques; a first look gives an account its first credits
- the item giver row opens the web item giver
- a painting that cannot be shown is the Burrow logo, not a wait for good
- Jammer Central's buttons work; What's New shows the newest Jamaa Journal
- the Jammer Wall opens even while the HUD is checking the player's own; a
  photo of an animal wearing nothing is kept; a wall photo of an animal the
  game does not know no longer stops the wall
- the photo booth's paid picture is answered
- emoji no longer push the line off centre; "\" keeps an emote or a
  ":name:" as typed; a repeated line with emoji is sent as it was said
- the emoji button hides with the HUD, not a moment after
- the join date on a player's card stays in its corner
- den items whose def is gone no longer garble the den and the inventory;
  custom pictures in a den no longer stop walking
- the den editor's switch and recycle buttons are always there
- the den inventory scrolls to an eleventh item
This commit is contained in:
Burrowdev committed 2026-10-23 23:00:00 +03:00
1 parent 7de41ceed5
commit c7efda7030
20 files changed
+6959 -1901

No files matched your search

+23 -2
View File
@@ -28,6 +28,7 @@ const buddyModule = require("./buddies.js");
const dens = require("./dens.js");
const disguises = require("./disguises.js");
const ecardModule = require("./ecards.js");
const ecoModule = require("./eco.js");
const epicDens = require("./epicdens.js");
const itemHandlers = require("./items.js");
const minigameModule = require("./minigames.js");
@@ -51,6 +52,8 @@ const {CURRENCIES, DIAMOND_TYPES, activeAvatar, avatarById, activePet, equippedB
const GENERIC_LIST_AVATARS = 64;
const GENERIC_LIST_NEWSPAPER = 627;
const GENERIC_LIST_WHATS_NEW = 369;
const WHATS_NEW_PAGES = 6;
// the worlds' names (ServerSelector.getShardName): localization ids, the
// game's own river names, world N being the Nth.
const GENERIC_LIST_WORLD_NAMES = 16;
@@ -143,6 +146,8 @@ const SHOP_LIST_TYPES = [DEF_ITEM, DEF_DEN_ITEM, DEF_DEN_ROOM, DEF_COMBINED_LIST
// a shop's title when its room gives it none (a shop in a land's main room,
// or one opened from elsewhere): what it sells (strings in lib/defpacks.js).
// with no title the shop window's banner was blank.
// shops opened from a window rather than a room, by their list: the Eco Shop.
const SHOP_LIST_TITLES = new Map([[778, 35727]]);
const SHOP_KIND_TITLES = new Map([[DEF_ITEM, 9000010], [DEF_DEN_ITEM, 9000011], [DEF_DEN_ROOM, 9000012],
[DEF_COMBINED_LIST, 9000013], [DEF_CURRENCY_EXCHANGE, 9000014], [DEF_DIAMOND, 9000015]]);
// diamond lists the client reads at login to learn which animals and pets
@@ -854,6 +859,9 @@ const handlers = {
}
let entries = [];
let count;
if (Number(listId) === eco.SHOP_LIST) {
eco.shopOpened(session);
}
if (Number(listId) === GENERIC_LIST_AVATARS) {
entries = defpacks.avatarTypes();
}
@@ -955,6 +963,13 @@ const handlers = {
count = defpacks.petIds().length;
entries = defpacks.petIds().flatMap(id => [id, 1]);
}
// Jammer Central's "What's New" pictures (gui.BulletinBoard, list 369):
// the newest pages of the Jamaa Journal. empty, the window waited on
// its spinner.
if (Number(listId) === GENERIC_LIST_WHATS_NEW && (count === undefined ? entries.length : count) === 0) {
entries = defpacks.newestJournalPages(WHATS_NEW_PAGES).flatMap(id => [id, 0]);
count = entries.length / 2;
}
// what the official server answered, where this one has nothing of its
// own (lib/official-lists.json, from recordings of the official game:
// the Journey Book's facts and pictures among them)
@@ -967,7 +982,8 @@ const handlers = {
}
// for shops the first unused field is the title's string id; left empty
// it keeps the shop window's own title (Shop.gotItemListCallback).
const title = SHOP_LIST_TYPES.includes(type) ? (session.room && roomInfo.shopTitle(session.room.base, listId)) || SHOP_KIND_TITLES.get(type) : 0;
const title = SHOP_LIST_TYPES.includes(type)
? (session.room && roomInfo.shopTitle(session.room.base, listId)) || SHOP_LIST_TITLES.get(Number(listId)) || SHOP_KIND_TITLES.get(type) : 0;
session.sendXt("gl", -1, listId, type, title, 0, 0, 0, count === undefined ? entries.length : count, ...entries);
},
@@ -989,6 +1005,10 @@ const handlers = {
if (vars[id] === undefined && Object.keys(vars).length >= MAX_USER_VARS) {
return;
}
// the eco plaques (lib/eco.js) are given, not set
if (eco.userVar(session, id, value)) {
return;
}
if (Number(id) === USER_VAR_HIDE_BLOCKED) {
setHideBlocked(session, Number(value) === 1);
}
@@ -1497,6 +1517,7 @@ const pets = petModule(context);
const parties = partyModule(context);
const ecards = ecardModule(context);
const walls = wallModule(context);
const eco = ecoModule({others, ecards});
const commands = commandModule(context);
const minigames = minigameModule(context);
const adventures = adventureModule(context);
@@ -1506,7 +1527,7 @@ const trades = tradeHandlers(context);
achievements.setFinder(findOnline);
Object.assign(handlers, avatarHandlers(context), itemHandlers(context), pets.handlers, dens.handlers({...context, others}),
buddies.handlers, moderation.handlers, trades.handlers, achievements.handlers, adopt.handlers, worldItems.handlers,
parties.handlers, ecards.handlers, walls.handlers, minigames.handlers, adventures.handlers, stubHandlers,
parties.handlers, ecards.handlers, eco.handlers, walls.handlers, minigames.handlers, adventures.handlers, stubHandlers,
playerItems.handlers({itemsTaken: (...args) => itemsTaken(...args)}));
// a den's owner, wherever they are, is told how many are in it: the HUD's