mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
feat(client): item maker, worn pictures, emoji, sitting, typing, AFK, staff window
Rebuilt swf/ajclient.swf from swf-src (tools/build-client.sh). New patched
classes: KeepAlive, AvatarView, AvatarUtility, Item, DenItemHelper,
SitForwardAction.
Custom items
- The Item Maker in Settings, in the game's own style: make an item from one
of the game's, name it, upload a picture (PNG encoded in the client and
shrunk when too big), choose sticker or texture, rename, delete.
- Pictures stand in for the item's icon and, for den items, the placed item.
- Worn pictures: LayerBitmap paints a sticker or a texture. Fixed it showing
only until the player moved:
- AvatarView rebuilt the worn layers on every new animation without the
item id, so walking drew the base item. It now carries the id ("d").
- Frames painted while the picture loaded stayed cached as the base item.
They are all painted again when it arrives (LayerBitmap.artArrived).
- The picture loader checks the server's crossdomain policy before its pixels
are read.
Chat
- Windows emoji and the AJ emotes inline with text in chat bubbles; emoji are
sent as \{hex} tags. An emoji picker and :shortcodes:.
- Chat box limit 200 characters; the box shows emoji in the system font.
- Clicking an emote while typing puts its code in the chat box.
- Two new base emotes: 💀 and 😭 (HUDAssets.swf, EmoticonUtility).
- Typing bubble: a "..." over a player's animal while they type ("xty").
It goes on a new line, when they stop, or after 8 seconds.
- loadArt shares pictures by address: emoji and icons load and decode once.
Actions
- Sit Front and Sit Back between the sit arrows, plus Mirror for any action
(from the other session). Front now plays animation 5 (facing the camera)
and Back animation 1 (facing away); both had played animation 1.
Staff
- The Moderate window from a player card's Report button for staff: warn
(custom text too), kick, silence, ban, summon, goto, notes.
- Invisible staff drawn half see-through; staff land on the exact spot on
goto and summon ("xgt").
Other
- AFK sign-out after 75 minutes instead of 7, with a 60-second warning
(com.sbi.client.KeepAlive).
- Jam-a-Grams show custom items and colours; Jammer Wall avatar photos fixed.
- The Item Maker row in the settings menu and the item window toggle.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
331c3e6025
commit
59d9d7e5fa
26 files changed
+6629
-125
No files matched your search
+11
-3
@@ -23,6 +23,7 @@ cd "$(dirname "$(readlink -f "$0")")/.."
|
||||
out=${1:-swf/ajclient.swf}
|
||||
set -- \
|
||||
AJClient AJClient.as \
|
||||
com.sbi.client.KeepAlive KeepAlive.as \
|
||||
GlobalErrorCatch GlobalErrorCatch.as \
|
||||
XtReplyDemuxer XtReplyDemuxer.as \
|
||||
loader.MediaHelper MediaHelper.as \
|
||||
@@ -56,6 +57,7 @@ set -- \
|
||||
gui.PetInventory PetInventory.as \
|
||||
gui.DenEditor DenEditor.as \
|
||||
gui.TradeManager TradeManager.as \
|
||||
avatar.AvatarView AvatarView.as \
|
||||
avatar.AvatarWorldView AvatarWorldView.as \
|
||||
room.RoomManagerWorld RoomManagerWorld.as \
|
||||
gskinner.motion.GTween GTween.as \
|
||||
@@ -77,10 +79,16 @@ set -- \
|
||||
game.artStudioPainting.ArtStudioPainting ArtStudioPainting.as \
|
||||
game.artStudioGridDrawing.ArtStudioGridDrawing ArtStudioGridDrawing.as \
|
||||
item.ItemXtCommManager ItemXtCommManager.as \
|
||||
den.DenXtCommManager DenXtCommManager.as
|
||||
den.DenXtCommManager DenXtCommManager.as \
|
||||
gui.ActionManager ActionManager.as \
|
||||
gui.SitForwardAction SitForwardAction.as \
|
||||
avatar.AvatarUtility AvatarUtility.as \
|
||||
item.Item Item.as \
|
||||
loader.DenItemHelper DenItemHelper.as
|
||||
# not in the game: added before the replace (game.ArtStudioKit is Strawberry
|
||||
# Jam's, shared by its two art studio painters)
|
||||
NEW_CLASSES="game.ArtStudioKit"
|
||||
# Jam's, shared by its two art studio painters; gui.SitForwardAction is the
|
||||
# action of sitting facing forward)
|
||||
NEW_CLASSES="game.ArtStudioKit gui.SitForwardAction"
|
||||
args=""
|
||||
while [ $# -gt 0 ]; do
|
||||
args="$args $1 swf-src/$2"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
+13
-6
@@ -1,4 +1,4 @@
|
||||
"""make-emote.py <picture.png> [name] [--black-background]
|
||||
"""make-emote.py <picture.png> [name] [--slot=N] [--black-background]
|
||||
|
||||
Adds an emote of our own to swf/HUDAssets.swf, from a picture: the classes
|
||||
"<name>" (the emote over an animal's head and in a chat bubble) and
|
||||
@@ -10,7 +10,9 @@ The game makes an emote by its class name (gui.EmoticonUtility), so the
|
||||
name also has to be in that class's lists: swf-src/EmoticonUtility.cinit.pcode,
|
||||
which tools/build-client.sh puts into the client.
|
||||
|
||||
Running it again replaces what an earlier run added. The picture must be an
|
||||
Each emote of ours has a slot (--slot=N, 0 by default: emo_temp's), its
|
||||
own character ids and its own code: running it again for a slot replaces
|
||||
what an earlier run put there, and leaves the other slots as they are. The picture must be an
|
||||
8-bit RGBA PNG, not interlaced; --black-background is for one that came on
|
||||
black where it should be see-through. Needs nothing but Python.
|
||||
"""
|
||||
@@ -267,18 +269,23 @@ def main():
|
||||
sys.exit(__doc__)
|
||||
words = [word for word in sys.argv[1:] if not word.startswith("--")]
|
||||
name = words[1] if len(words) > 1 else "emo_temp"
|
||||
slots = [word for word in sys.argv[1:] if word.startswith("--slot=")]
|
||||
slot = int(slots[0].split("=", 1)[1]) if slots else 0
|
||||
first_id = FIRST_ID + slot * 5
|
||||
# slot 0 keeps the name it always had, so that a run for it replaces it
|
||||
abc_name = ABC_NAME if slot == 0 else ABC_NAME + b"_" + str(slot).encode()
|
||||
picture = read_png(Path(words[0]))
|
||||
if "--black-background" in sys.argv:
|
||||
picture = without_background(*picture)
|
||||
width, height, pixels = shrunk(*picture, SHRINK)
|
||||
bitmap, large_shape, small_shape, large, small = range(FIRST_ID, FIRST_ID + 5)
|
||||
bitmap, large_shape, small_shape, large, small = range(first_id, first_id + 5)
|
||||
ours = [
|
||||
tag(36, struct.pack("<HBHH", bitmap, 5, width, height) + zlib.compress(pixels, 9)),
|
||||
picture_shape(large_shape, bitmap, width, height, LARGE_WIDTH),
|
||||
picture_shape(small_shape, bitmap, width, height, SMALL_WIDTH),
|
||||
clip(large, large_shape),
|
||||
clip(small, small_shape),
|
||||
tag(82, struct.pack("<I", 1) + ABC_NAME + b"\0" + abc([name, f"{name}_sml"])),
|
||||
tag(82, struct.pack("<I", 1) + abc_name + b"\0" + abc([name, f"{name}_sml"])),
|
||||
tag(76, struct.pack("<H", 2) + struct.pack("<H", large) + name.encode() + b"\0" + struct.pack("<H", small) + f"{name}_sml".encode() + b"\0"),
|
||||
]
|
||||
|
||||
@@ -295,9 +302,9 @@ def main():
|
||||
|
||||
def is_ours(code, whole, inner):
|
||||
if code in (2, 36, 39):
|
||||
return FIRST_ID <= struct.unpack_from("<H", inner)[0] < FIRST_ID + 5
|
||||
return first_id <= struct.unpack_from("<H", inner)[0] < first_id + 5
|
||||
if code == 82:
|
||||
return inner[4:4 + len(ABC_NAME) + 1] == ABC_NAME + b"\0"
|
||||
return inner[4:4 + len(abc_name) + 1] == abc_name + b"\0"
|
||||
return code == 76 and struct.unpack_from("<H", inner, 2)[0] == large
|
||||
kept = [entry for entry in tags if not is_ours(*entry)]
|
||||
first_frame = next(index for index, (code, _, _) in enumerate(kept) if code == 1)
|
||||
|
||||
Reference in new issue
Block a user