mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
feat(items): beta-era colours for seven clothing items
colours from a dump of a beta-era inventory, added after each item's own so the colours already given keep their place: Rare Eyeball Hat, Creature Mask, Tiara (two), Arctic Hood, Elf Helmet, Furry Hat and Turquoise Ring. the shop shows a list's first 8, so these are had from the item givers.
This commit is contained in:
1 parent
7cfef493fa
commit
e9097a9a4f
1 file changed
+26
-1
+26
-1
@@ -239,6 +239,31 @@ const withCustomRows = id => pack => {
|
||||
return pack;
|
||||
};
|
||||
|
||||
// colours of clothing items from a dump of a beta-era inventory (art id,
|
||||
// then the colour as 4 bytes, little-endian), added after each item's own
|
||||
// so the colours already given keep their place. the shop shows a list's
|
||||
// first 8 only, so these are had from the item givers.
|
||||
const DUMP_COLOURS = new Map([
|
||||
[231, [0x6929C069]], // Rare Eyeball Hat (Beta EyeBall; tried in the game)
|
||||
[224, [0x67520169]], // Creature Mask (Beta Creature Mask)
|
||||
[136, [0x2C083069, 0x55153131]], // Tiara (Beta Tiara, Milky Tiara)
|
||||
[135, [0x83550505]], // Arctic Hood (Beta Hood)
|
||||
[169, [0x937FF63B]], // Elf Helmet (Beta Elf)
|
||||
[714, [0x00000069]], // Furry Hat (Real Magenta Furry Hat)
|
||||
[649, [0x2E2D1906]], // Turquoise Ring (1st Glitched Ring)
|
||||
]);
|
||||
|
||||
const withDumpColours = pack => {
|
||||
for (const def of Object.values(pack)) {
|
||||
const added = def && DUMP_COLOURS.get(Number(def.id));
|
||||
if (added) {
|
||||
const colours = String(def.colors).split(",").filter(Boolean);
|
||||
def.colors = [...colours, ...added.map(String).filter(colour => !colours.includes(colour))].join(",");
|
||||
}
|
||||
}
|
||||
return pack;
|
||||
};
|
||||
|
||||
const withAddedStrings = pack => Object.assign(withLineBreaks(withOurName(Object.assign(pack, ADDED_STRINGS, extraMusic.strings()))), customStrings);
|
||||
|
||||
// the extra music tracks (lib/extramusic.js), as den items like the
|
||||
@@ -301,7 +326,7 @@ const SHARED_CHANGES = new Map([
|
||||
[DEF_PARTY, withRestoredParties],
|
||||
[DEF_DEN_ROOM, withoutPrices(DEF_DEN_ROOM, withAddedDens)],
|
||||
[DEF_DEN_ITEM, withoutPrices(DEF_DEN_ITEM, pack => withCustomRows(DEF_DEN_ITEM)(withExtraMusic(pack)))],
|
||||
[DEF_ITEM, withoutPrices(DEF_ITEM, withCustomRows(DEF_ITEM))],
|
||||
[DEF_ITEM, withoutPrices(DEF_ITEM, pack => withCustomRows(DEF_ITEM)(withDumpColours(pack)))],
|
||||
[DEF_DIAMOND, withoutPrices(DEF_DIAMOND)],
|
||||
[DEF_PET, withoutPrices(DEF_PET)],
|
||||
[DEF_LOCALIZATION_EN, withAddedStrings],
|
||||
|
||||
Reference in new issue
Block a user