mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
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:
1 parent
7de41ceed5
commit
c7efda7030
20 files changed
+6959
-1901
No files matched your search
@@ -20,6 +20,7 @@ const MAX_RECYCLED_AT_ONCE = 500;
|
||||
const MAX_USED_AT_ONCE = 200; // pieces put on or taken off in one message
|
||||
const RECYCLE_FRACTION = 0.3; // matches recyclePercentage sent at login
|
||||
const CURRENCY_GEMS = 0; // ItemXtCommManager.currencyUpdateResponse's currency type
|
||||
const PHOTO_GEMS = 50; // what the photo booth says a picture costs (string 14789)
|
||||
|
||||
module.exports = ({others, sendItemList}) => {
|
||||
// ItemXtCommManager.itemBuyResponse: [status, shopId, newAmount, currencyType]
|
||||
@@ -160,6 +161,25 @@ module.exports = ({others, sendItemList}) => {
|
||||
session.sendXt("cd", -1, 1);
|
||||
},
|
||||
|
||||
// the photo booth's picture (gui.PhotoBooth), PHOTO_GEMS gems. "apc"
|
||||
// asks first: [gems after, or -1 for too few]; "apb", once the player
|
||||
// keeps the picture, pays: [gem total]. neither was answered, and the
|
||||
// booth waited behind its spinner for good.
|
||||
apc(session) {
|
||||
const gems = session.account.currency.gems || 0;
|
||||
session.sendXt("apc", -1, gems >= PHOTO_GEMS ? gems - PHOTO_GEMS : -1);
|
||||
},
|
||||
|
||||
apb(session) {
|
||||
const {account} = session;
|
||||
if ((account.currency.gems || 0) >= PHOTO_GEMS) {
|
||||
account.currency.gems -= PHOTO_GEMS;
|
||||
achievements.currencyChanged(account, "gems", -PHOTO_GEMS);
|
||||
accounts.save(account);
|
||||
}
|
||||
session.sendXt("apb", -1, account.currency.gems || 0);
|
||||
},
|
||||
|
||||
// ItemXtCommManager.requestItemRecycle: [invIdx, ...]. the reply
|
||||
// (itemRecycleResponse) is [count, newGemTotal, ...recycledInvIdx], and
|
||||
// the recycling window then waits, behind its spinner, for the item
|
||||
|
||||
Reference in new issue
Block a user