mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 17:37: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
+52
-3
@@ -14,6 +14,7 @@ package gui
|
||||
import flash.events.TextEvent;
|
||||
import flash.text.StyleSheet;
|
||||
import flash.text.TextField;
|
||||
import flash.text.TextFormat;
|
||||
import flash.ui.Mouse;
|
||||
import gui.itemWindows.ItemWindowTextNode;
|
||||
import localization.LocalizationManager;
|
||||
@@ -211,6 +212,8 @@ package gui
|
||||
|
||||
public function addMessage(param1:String, param2:String, param3:String, param4:String) : void
|
||||
{
|
||||
// emoji as their names here: this list has no pictures (AJClient.emojiAsNames)
|
||||
param4 = AJClient.emojiAsNames(param4);
|
||||
var _loc5_:Boolean = false;
|
||||
var _loc6_:* = 0;
|
||||
var _loc7_:int = 0;
|
||||
@@ -479,9 +482,10 @@ package gui
|
||||
}
|
||||
else
|
||||
{
|
||||
// 150 here, where the original stopped at 70. the server takes
|
||||
// up to config.maxChatLength.
|
||||
chatMsgText.maxChars = 150;
|
||||
// 200 here, where the original stopped at 70. the server takes
|
||||
// up to config.maxChatLength (more: an emoji goes as a tag of 8
|
||||
// or more), and makes long lines shorter (lib/chatspam.js).
|
||||
chatMsgText.maxChars = 200;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,6 +757,51 @@ package gui
|
||||
{
|
||||
_predictiveTextManager.onTextFieldChanged(param1);
|
||||
}
|
||||
showEmojiInInput();
|
||||
AJClient.noteTyping(chatMsgText.text);
|
||||
}
|
||||
|
||||
// the chat box while it holds an emoji (Windows' emoji panel, say): the
|
||||
// game's font has none, so the box is drawn in the computer's own emoji
|
||||
// font until there are none again. the bubble shows them as pictures
|
||||
// (gui.ChatBalloon).
|
||||
private var _inputShowsEmoji:Boolean = false;
|
||||
|
||||
private var _inputFormat:TextFormat;
|
||||
|
||||
private var _inputEmbedded:Boolean = true;
|
||||
|
||||
public function showEmojiInInput() : void
|
||||
{
|
||||
var _loc1_:Boolean = false;
|
||||
var _loc2_:int = 0;
|
||||
var _loc3_:String = chatMsgText == null ? "" : chatMsgText.text;
|
||||
var _loc4_:TextFormat = null;
|
||||
while(_loc2_ < _loc3_.length && !_loc1_)
|
||||
{
|
||||
_loc1_ = ChatBalloon.emojiLength(_loc3_,_loc2_) > 0;
|
||||
_loc2_++;
|
||||
}
|
||||
if(chatMsgText == null || _loc1_ == _inputShowsEmoji)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(_loc1_)
|
||||
{
|
||||
_inputFormat = chatMsgText.defaultTextFormat;
|
||||
_inputEmbedded = chatMsgText.embedFonts;
|
||||
_loc4_ = new TextFormat("Segoe UI Emoji",_inputFormat.size,_inputFormat.color,_inputFormat.bold);
|
||||
chatMsgText.embedFonts = false;
|
||||
chatMsgText.defaultTextFormat = _loc4_;
|
||||
chatMsgText.setTextFormat(_loc4_);
|
||||
}
|
||||
else
|
||||
{
|
||||
chatMsgText.embedFonts = _inputEmbedded;
|
||||
chatMsgText.defaultTextFormat = _inputFormat;
|
||||
chatMsgText.setTextFormat(_inputFormat);
|
||||
}
|
||||
_inputShowsEmoji = _loc1_;
|
||||
}
|
||||
|
||||
private function keyDownListener(param1:KeyboardEvent) : void
|
||||
|
||||
Reference in new issue
Block a user