mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09:37:50 -05:00
fix: eggs, pets, minigames, themes, HQ facts and more
- egg stands sell an egg again; a bought egg hatches and is named at once - pets whose bits name no pet the game has no longer stop loading - the adopt-a-pet gift path opens with nothing adopted yet - Spider Zapper and Wind Rider start with their players: spiders can be shot, and Wind Rider is played; Spider Zapper's waves are answered - Phantom's Treasure can be left from its title screen and level choice - the Touch Pool's fact window always closes - the last key in Return of the Phantoms lies where it can be reached - the Alpha HQ's bios and relics open and close - a land animal in water (and a sea one on land) is drawn when it stands - a seasonal theme's room has today's shops in it (lib/themerooms.js) - the Forgotten Archive sells its own stock, not unfinished pieces - custom items whose def is gone stay out of trade lists - the captcha is always shown, and tried again when it fails - builds 85
This commit is contained in:
1 parent
c7efda7030
commit
4355994253
19 files changed
+4891
-28
No files matched your search
+8
-3
@@ -53,8 +53,11 @@ module.exports = ({findOnline, blocks, showTrading}) => {
|
||||
// createdTs, lBits, uBits, eBits, name, personality, toy, food)...]
|
||||
const sendTradeList = (to, account) => {
|
||||
const listed = type => account.tradeList.filter(entry => entry.type === type).map(entry => entry.inv);
|
||||
const clothing = account.items.filter(item => listed(TYPE_CLOTHING).includes(item.inv));
|
||||
const denItems = account.denItems.filter(item => listed(TYPE_DEN_ITEM).includes(item.inv) && masterpieces.itemApproved(item));
|
||||
// one whose def is gone (a custom item deleted) is left out: the client
|
||||
// cannot make an item of it, and the list stopped there.
|
||||
const clothing = account.items.filter(item => listed(TYPE_CLOTHING).includes(item.inv) && defpacks.itemDef(item.def));
|
||||
const denItems = account.denItems.filter(item => listed(TYPE_DEN_ITEM).includes(item.inv) && masterpieces.itemApproved(item)
|
||||
&& defpacks.denItemDef(item.def));
|
||||
const pets = account.pets.filter(pet => listed(TYPE_PET).includes(pet.inv));
|
||||
to.sendXt("tl", -1, account.username,
|
||||
clothing.length, ...clothing.flatMap(item => [item.def, item.inv, item.color]),
|
||||
@@ -71,8 +74,10 @@ module.exports = ({findOnline, blocks, showTrading}) => {
|
||||
(type === TYPE_CLOTHING ? account.items : type === TYPE_DEN_ITEM ? account.denItems : type === TYPE_PET ? account.pets : []);
|
||||
|
||||
// A masterpiece still waiting for review is nobody's to trade.
|
||||
// nor one whose def is gone.
|
||||
const find = (account, type, inv) => collectionOf(account, type)
|
||||
.find(entry => entry.inv === inv && (type !== TYPE_DEN_ITEM || masterpieces.itemApproved(entry)));
|
||||
.find(entry => entry.inv === inv && (type !== TYPE_DEN_ITEM || masterpieces.itemApproved(entry))
|
||||
&& (type === TYPE_CLOTHING ? Boolean(defpacks.itemDef(entry.def)) : type === TYPE_DEN_ITEM ? Boolean(defpacks.denItemDef(entry.def)) : true));
|
||||
|
||||
// the field layouts differ between the offer the owner is shown (no
|
||||
// inventory ids for clothing and den items) and the completed trade.
|
||||
|
||||
Reference in new issue
Block a user