mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09: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
@@ -191,6 +191,20 @@ package avatar
|
||||
"water":40,
|
||||
"set":"land",
|
||||
"flip":false
|
||||
},{
|
||||
// sitting facing straight forward, and straight away (the "Front"
|
||||
// and "Back" between the arrows): animations 5 and 1, the ends of
|
||||
// the sitting turn 1-5 (2 the back corners, 4 the front ones; the
|
||||
// slide's spin plays them in turn). the game's own buttons never did.
|
||||
"name":":sitS:",
|
||||
"land":5,
|
||||
"water":40,
|
||||
"flip":false
|
||||
},{
|
||||
"name":":sitN:",
|
||||
"land":1,
|
||||
"water":40,
|
||||
"flip":false
|
||||
}];
|
||||
|
||||
// the landing puff, artwork compiled into the client. its class has a
|
||||
@@ -209,6 +223,21 @@ package avatar
|
||||
private var _platformingCurVel:Number = 0;
|
||||
|
||||
private var _chatBalloon:ChatBalloon;
|
||||
|
||||
// "..." where the chat bubble goes, while the player is typing
|
||||
// (AJClient.onTyping). gone when a line arrives, when they stop, or
|
||||
// TYPING_SHOWN ms after they last said they were, if a "stopped" is lost.
|
||||
private static const TYPING_SHOWN:int = 8000;
|
||||
|
||||
private var _typing:Sprite;
|
||||
|
||||
private var _typingDots:Array;
|
||||
|
||||
private var _typingTimer:Timer;
|
||||
|
||||
private var _typingStep:int;
|
||||
|
||||
private var _typingUntil:int;
|
||||
|
||||
private var _namebar:NameBar;
|
||||
|
||||
@@ -628,6 +657,14 @@ package avatar
|
||||
{
|
||||
_chatLayer.removeChild(_chatBalloon);
|
||||
}
|
||||
hideTyping();
|
||||
if(_typingTimer)
|
||||
{
|
||||
_typingTimer.removeEventListener("timer",onTypingTimer);
|
||||
_typingTimer = null;
|
||||
}
|
||||
_typing = null;
|
||||
_typingDots = null;
|
||||
removeChild(_namebar);
|
||||
if(_secondaryEmot && _chatLayer.contains(_secondaryEmot))
|
||||
{
|
||||
@@ -1023,9 +1060,108 @@ package avatar
|
||||
return false;
|
||||
}
|
||||
|
||||
public function setTyping(param1:Boolean) : void
|
||||
{
|
||||
var _loc2_:Sprite = null;
|
||||
var _loc3_:int = 0;
|
||||
if(!param1 || _chatLayer == null)
|
||||
{
|
||||
hideTyping();
|
||||
return;
|
||||
}
|
||||
if(_typing == null)
|
||||
{
|
||||
_typing = new Sprite();
|
||||
_typing.mouseEnabled = false;
|
||||
_typing.mouseChildren = false;
|
||||
_typing.graphics.lineStyle(2,0x8C6A3C);
|
||||
_typing.graphics.beginFill(0xFFFFFF);
|
||||
_typing.graphics.drawRoundRect(-22,-26,44,22,20,20);
|
||||
_typing.graphics.endFill();
|
||||
_typing.graphics.lineStyle();
|
||||
_typing.graphics.beginFill(0xFFFFFF);
|
||||
_typing.graphics.moveTo(-5,-5);
|
||||
_typing.graphics.lineTo(0,2);
|
||||
_typing.graphics.lineTo(5,-5);
|
||||
_typing.graphics.endFill();
|
||||
_typingDots = [];
|
||||
_loc3_ = 0;
|
||||
while(_loc3_ < 3)
|
||||
{
|
||||
_loc2_ = new Sprite();
|
||||
_loc2_.graphics.beginFill(0x6B5034);
|
||||
_loc2_.graphics.drawCircle(0,0,3);
|
||||
_loc2_.graphics.endFill();
|
||||
_loc2_.x = -10 + _loc3_ * 10;
|
||||
_loc2_.y = -15;
|
||||
_typing.addChild(_loc2_);
|
||||
_typingDots.push(_loc2_);
|
||||
_loc3_++;
|
||||
}
|
||||
_typingTimer = new Timer(300);
|
||||
_typingTimer.addEventListener("timer",onTypingTimer,false,0,true);
|
||||
}
|
||||
_typingUntil = getTimer() + TYPING_SHOWN;
|
||||
if(_typing.parent != _chatLayer)
|
||||
{
|
||||
_chatLayer.addChild(_typing);
|
||||
}
|
||||
placeTyping();
|
||||
_typing.visible = !(_chatBalloon && _chatBalloon.visible);
|
||||
if(!_typingTimer.running)
|
||||
{
|
||||
_typingTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
private function hideTyping() : void
|
||||
{
|
||||
if(_typingTimer)
|
||||
{
|
||||
_typingTimer.stop();
|
||||
}
|
||||
if(_typing && _typing.parent)
|
||||
{
|
||||
_typing.parent.removeChild(_typing);
|
||||
}
|
||||
}
|
||||
|
||||
private function placeTyping() : void
|
||||
{
|
||||
if(_typing && _chatBalloon)
|
||||
{
|
||||
_typing.x = _chatBalloon.x;
|
||||
_typing.y = _chatBalloon.y;
|
||||
}
|
||||
}
|
||||
|
||||
private function onTypingTimer(param1:TimerEvent) : void
|
||||
{
|
||||
var _loc2_:int = 0;
|
||||
if(_typing == null || getTimer() > _typingUntil)
|
||||
{
|
||||
hideTyping();
|
||||
return;
|
||||
}
|
||||
placeTyping();
|
||||
_typing.visible = !(_chatBalloon && _chatBalloon.visible);
|
||||
_typingStep = (_typingStep + 1) % 3;
|
||||
_loc2_ = 0;
|
||||
while(_loc2_ < _typingDots.length)
|
||||
{
|
||||
_typingDots[_loc2_].alpha = _loc2_ == _typingStep ? 1 : 0.35;
|
||||
_typingDots[_loc2_].y = _loc2_ == _typingStep ? -17 : -15;
|
||||
_loc2_++;
|
||||
}
|
||||
}
|
||||
|
||||
public function setMessage(param1:String, param2:int) : void
|
||||
{
|
||||
var _loc3_:Boolean = false;
|
||||
if(param1 != "...")
|
||||
{
|
||||
hideTyping();
|
||||
}
|
||||
if(param2 > 1)
|
||||
{
|
||||
if(param2 == 2)
|
||||
@@ -1220,6 +1356,18 @@ package avatar
|
||||
_pet.setActionByName(_loc2_.replace(/(Land|Swim):$/,":"));
|
||||
}
|
||||
}
|
||||
|
||||
// The base action definitions supply their normal orientation. A local
|
||||
// Mirror selection is applied after that, so it works for every action
|
||||
// without changing the original sit/dance/etc. mappings.
|
||||
public function setActionMirrored(param1:Boolean) : void
|
||||
{
|
||||
if(_lastIdleAnim > 0 && param1)
|
||||
{
|
||||
_lastIdleFlip = !_lastIdleFlip;
|
||||
playAnim(_lastIdleAnim,_lastIdleFlip);
|
||||
}
|
||||
}
|
||||
|
||||
public function circleTest(param1:int, param2:int, param3:int) : Boolean
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user