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:
SnipzilandClaude Opus 5.5 committed 2026-10-17 21:44:11 -04:00
1 parent 331c3e6025
commit 59d9d7e5fa
26 files changed
+6629 -125

No files matched your search

+125 -1
View File
@@ -47,6 +47,17 @@ package gui
private var _names:Dictionary = new Dictionary(true);
private var _swapBtn:MovieClip;
// Whether the next (and currently selected) action is horizontally
// mirrored. The state is sent with the action to other players.
public var mirrorActions:Boolean = false;
private var _lastAction:Sprite;
// sitting facing forward (":sitS:", AvatarWorldView's animation 1): the
// "Forward" in the middle of the four arrows. its action sprite is a
// class of the client's own (SitForwardAction), not of the HUD's art.
private static const SIT_FORWARD:String = "SitForwardAction";
private const ACTIONWINDOW_DIM_ALPHA:Number = 0.5;
@@ -309,6 +320,7 @@ package gui
_loc12_.addEventListener("mouseDown",actionClickHandler,false,0,true);
_loc8_++;
}
addSitDirectionButtons(_loc3_);
}
else if(_loc6_ >= 4)
{
@@ -393,6 +405,7 @@ package gui
actionStrings["sleepAnim_btnCont"] = actionStrings["diveAnim_btnCont"] = [":sleep:",":dive:"];
actionStrings["hopAnim_btnCont"] = actionStrings["swirlAnim_btnCont"] = [":hop:",":swirl:"];
actionStrings["playAnim_btnCont"] = [":play:"];
actionStrings[SIT_FORWARD] = [":sitS:"];
}
private function setupTitleBanner() : void
@@ -445,6 +458,110 @@ package gui
return _loc2_.length > 1 ? _loc2_[_oceanShown ? 1 : 0] : _loc2_[0];
}
// Front and Back sit facing straight forward and straight away. Mirror
// replays whichever action was picked most recently in the other
// horizontal direction (including dance, sleep, hop and play).
private function addSitDirectionButtons(param1:MovieClip) : void
{
var _loc2_:Rectangle = param1.getBounds(param1);
var _loc3_:Number = _loc2_.x + _loc2_.width * 0.5;
var _loc4_:Number = _loc2_.y + _loc2_.height * 0.5;
var _loc5_:Sprite = addDirectionButton(param1,"Front",0,0,false);
var _loc6_:Sprite = addDirectionButton(param1,"Back",0,0,true);
var _loc7_:Number = _loc3_ - (_loc5_.width + 3 + _loc6_.width) * 0.5;
_loc5_.x = _loc7_;
_loc6_.x = _loc7_ + _loc5_.width + 3;
_loc5_.y = _loc6_.y = _loc4_ - 13;
var _loc8_:Sprite = actionPill("Mirror");
var _loc9_:Sprite = actionHitTarget(_loc8_);
_loc9_.x = _loc3_ - _loc9_.width * 0.5;
_loc9_.y = _loc4_ + 3;
_loc9_.addEventListener("mouseDown",mirrorClickHandler,false,0,true);
_loc9_.addEventListener("mouseOver",function(param1:MouseEvent):void
{
_loc9_.alpha = 0.8;
},false,0,true);
_loc9_.addEventListener("mouseOut",function(param1:MouseEvent):void
{
_loc9_.alpha = 1;
},false,0,true);
param1.addChild(_loc9_);
}
private function addDirectionButton(param1:MovieClip, param2:String, param3:Number, param4:Number, param5:Boolean) : Sprite
{
var _loc6_:Sprite = actionPill(param2);
var _loc7_:Sprite = actionHitTarget(_loc6_);
_loc7_.x = param3;
_loc7_.y = param4;
_loc7_.name = param5 ? "sitBackHit" : "sitFrontHit";
_loc7_.addEventListener("mouseDown",sitDirectionClickHandler,false,0,true);
param1.addChild(_loc7_);
return _loc7_;
}
// Keep the generated controls visually uniform. Invisible trailing
// spaces reserve the same room without changing the labels players see.
private function actionPill(param1:String) : Sprite
{
var _loc2_:String = param1 == "Front" ? "Front " : (param1 == "Back" ? "Back " : param1);
return AJClient.makePill(_loc2_,0x5CB82E,0x2C6E16,false,10);
}
private function sitDirectionClickHandler(param1:MouseEvent) : void
{
param1.stopPropagation();
// one sprite class for both; each sprite is named for the way it faces
var _loc2_:Sprite = new SitForwardAction();
_names[_loc2_] = param1.currentTarget.name == "sitBackHit" ? ":sitN:" : ":sitS:";
selectAction(_loc2_);
}
// The sit artwork is itself a MovieClip with mouse children. A separate
// transparent hit target above it keeps our generated labels clickable.
private function actionHitTarget(param1:Sprite) : Sprite
{
var _loc2_:Sprite = new Sprite();
_loc2_.graphics.beginFill(0,0);
_loc2_.graphics.drawRect(0,0,param1.width,param1.height);
_loc2_.graphics.endFill();
_loc2_.addChild(param1);
_loc2_.buttonMode = true;
_loc2_.useHandCursor = true;
_loc2_.mouseEnabled = true;
_loc2_.mouseChildren = false;
return _loc2_;
}
private function selectAction(param1:Sprite, param2:Boolean = false) : void
{
if(!actionBtn.isGray)
{
mirrorActions = param2;
_lastAction = param1;
setActionCallback(param1);
actionBtn.dispatchEvent(new MouseEvent("mouseDown"));
}
}
private function mirrorClickHandler(param1:MouseEvent) : void
{
param1.stopPropagation();
if(!actionBtn.isGray)
{
mirrorActions = !mirrorActions;
if(_lastAction)
{
setActionCallback(_lastAction);
}
}
}
public function rememberAction(param1:Sprite) : void
{
_lastAction = param1;
}
public function getActionString(param1:Sprite) : String
{
if(_names[param1] != undefined)
@@ -462,6 +579,12 @@ package gui
public function matchActionString(param1:String, param2:Boolean = false) : Sprite
{
var _loc3_:int = 0;
if(param1 == ":sitS:" || param1 == ":sitN:")
{
var _loc9_:Sprite = new SitForwardAction();
_names[_loc9_] = param1;
return _loc9_;
}
var _loc4_:String = OTHER_SET_BUTTONS[param1];
var _loc5_:Sprite = null;
if(_loc4_ && param2 && !playerHasSet(param1.indexOf("Swim") != -1))
@@ -565,7 +688,8 @@ package gui
param1.stopPropagation();
if(!actionBtn.isGray && !param1.currentTarget.isGray)
{
setActionCallback(new param1.currentTarget.constructor());
_lastAction = new param1.currentTarget.constructor();
setActionCallback(_lastAction);
actionBtn.dispatchEvent(new MouseEvent("mouseDown"));
param1.currentTarget.downToUpState();
}