mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
feat: all four pattern colours, the in-game item giver again, and 18 and over
- a special animal's pattern has four colours, as its presets do: the pattern tab's 1 to 4 each have a colour table - the Item Giver opens in the game again; the Item Maker's previews keep their own colours instead of the giver's colour box - the drawn trading sign is gone - sign-up, the terms and the privacy policy say 18 and over (terms version 2026-10-24) - builds 92
This commit is contained in:
1 parent
29c0eff454
commit
8e117ff26f
12 files changed
+152
-131
No files matched your search
+24
-29
@@ -539,14 +539,7 @@ package
|
||||
}
|
||||
else
|
||||
{
|
||||
// the item giver is the web one now (the account page's
|
||||
// /account/items, signed in as there), opened in the browser:
|
||||
// the one in the game is retired. it shared its colour box
|
||||
// with the Item Maker, whose colours turned up in it.
|
||||
if(ExternalInterface.available)
|
||||
{
|
||||
ExternalInterface.call("ajOpenPage",gMainFrame.clientInfo.websiteURL + "account/items");
|
||||
}
|
||||
_toolsInstance.showItemFinder(true);
|
||||
}
|
||||
}
|
||||
catch(e:Error)
|
||||
@@ -1540,17 +1533,6 @@ package
|
||||
}
|
||||
}
|
||||
|
||||
// "xtr": [.., .., sfsId, 1 | 0]: another player trading, or not
|
||||
// (lib/world.js showTrading).
|
||||
public static function onTrading(param1:Object) : void
|
||||
{
|
||||
var _loc2_:AvatarWorldView = AvatarManager.avatarViewList != null ? AvatarManager.avatarViewList[int(param1[2])] as AvatarWorldView : null;
|
||||
if(_loc2_ != null)
|
||||
{
|
||||
_loc2_.setTrading(String(param1[3]) == "1");
|
||||
}
|
||||
}
|
||||
|
||||
// "xyn": [.., .., id, text]. A yes-or-no box; the answer goes back as
|
||||
// "xyn" [id, 1 | 0].
|
||||
public static function askYesNo(param1:Object) : void
|
||||
@@ -4573,7 +4555,7 @@ package
|
||||
_loc3_.currTxt.text = (_loc5_ ? "> " : "") + makerShort(String(_loc4_.name || "(no name)"),24) + (_makerMode == "mine" ? (_loc4_.waiting == "item" ? " (waiting)" : _loc4_.waiting == "picture" ? " (picture waiting)" : _loc4_.art ? (_loc4_.kind == "clothing" ? (_loc4_.artMode == "texture" ? " (texture)" : " (sticker)") : " (picture)") : "") : " #" + _loc4_.id);
|
||||
_loc3_.addEventListener("mouseDown",onMakerButton);
|
||||
_makerRowsSprite.addChild(_loc3_);
|
||||
_makerRowsSprite.addChild(finderPreview(_loc4_,_loc2_,186,_loc3_.y));
|
||||
_makerRowsSprite.addChild(finderPreview(_loc4_,_loc2_,186,_loc3_.y,false));
|
||||
_loc2_++;
|
||||
}
|
||||
if(_makerMode == "mine" && _loc1_.length == 0)
|
||||
@@ -5240,6 +5222,17 @@ package
|
||||
return _loc4_;
|
||||
}
|
||||
|
||||
// the item's own colour that a row is on (param1.colorIndex), or 0
|
||||
private function itemOwnColour(param1:Object) : uint
|
||||
{
|
||||
var _loc2_:Object = ItemXtCommManager.getItemDef(int(param1.id));
|
||||
if(_loc2_ == null || _loc2_.colors == null || _loc2_.colors.length == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return uint(_loc2_.colors[Math.min(int(param1.colorIndex),_loc2_.colors.length - 1)]);
|
||||
}
|
||||
|
||||
// the colour a clothing row is drawn in: the box's colour id or hex
|
||||
// colour, else the item's own colour that the row is on
|
||||
private function finderPreviewColour(param1:Object) : uint
|
||||
@@ -5268,16 +5261,15 @@ package
|
||||
// a negative id is the same colour written signed
|
||||
return uint(Number(_loc2_));
|
||||
}
|
||||
_loc4_ = ItemXtCommManager.getItemDef(int(param1.id));
|
||||
if(_loc4_ == null || _loc4_.colors == null || _loc4_.colors.length == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return uint(_loc4_.colors[Math.min(int(param1.colorIndex),_loc4_.colors.length - 1)]);
|
||||
return itemOwnColour(param1);
|
||||
}
|
||||
|
||||
// the row's item as the game draws it in a shop, in a box at the row's end
|
||||
private function finderPreview(param1:Object, param2:int, param3:Number, param4:Number) : Sprite
|
||||
// param5: a row of the item giver's, drawn in its colour box's colour
|
||||
// and recoloured as that changes. the Item Maker's rows are drawn by
|
||||
// this too, in the item's own colour: the giver's box coloured them,
|
||||
// and its colour turned up in the maker.
|
||||
private function finderPreview(param1:Object, param2:int, param3:Number, param4:Number, param5:Boolean = true) : Sprite
|
||||
{
|
||||
var _loc5_:Sprite = new Sprite();
|
||||
var _loc6_:Sprite = new Sprite();
|
||||
@@ -5317,7 +5309,7 @@ package
|
||||
return _loc5_;
|
||||
}
|
||||
_loc8_ = new Item();
|
||||
Item(_loc8_).init(int(param1.id),0,finderPreviewColour(param1),null,true);
|
||||
Item(_loc8_).init(int(param1.id),0,param5 ? finderPreviewColour(param1) : itemOwnColour(param1),null,true);
|
||||
}
|
||||
// fitted to the box once drawn, which may be before the icon is
|
||||
// handed back when its picture was loaded already
|
||||
@@ -5343,7 +5335,10 @@ package
|
||||
_loc8_.imageLoadedCallback();
|
||||
}
|
||||
}
|
||||
_finderIcons[param2] = _loc8_;
|
||||
if(param5)
|
||||
{
|
||||
_finderIcons[param2] = _loc8_;
|
||||
}
|
||||
}
|
||||
catch(e:Error)
|
||||
{
|
||||
|
||||
+112
-1
@@ -224,6 +224,17 @@ package gui
|
||||
private var _colorTableColor2:ColorTable;
|
||||
|
||||
private var _colorTablePatterns:ColorTable;
|
||||
|
||||
// a special animal's pattern has four colours, a byte each of its
|
||||
// colour number (its presets set all four; LayerBitmap draws them and
|
||||
// the blends between them): the tables of the second, third and
|
||||
// fourth, each shown in place of the first's while its number beside
|
||||
// them is chosen
|
||||
private var _patternColorTables:Array;
|
||||
|
||||
private var _patternColorBtns:Array;
|
||||
|
||||
private var _patternColorSlot:int;
|
||||
|
||||
private var _colorTableEyes:ColorTable;
|
||||
|
||||
@@ -434,6 +445,15 @@ package gui
|
||||
_colorTableColor1.destroy();
|
||||
_colorTableColor2.destroy();
|
||||
_colorTablePatterns.destroy();
|
||||
for each(var _loc9_:ColorTable in _patternColorTables)
|
||||
{
|
||||
if(_loc9_ != _colorTablePatterns)
|
||||
{
|
||||
_loc9_.destroy();
|
||||
}
|
||||
}
|
||||
_patternColorTables = null;
|
||||
_patternColorBtns = null;
|
||||
_colorTableEyes.destroy();
|
||||
_namebarBadgeMediaIds = null;
|
||||
_nameBars = null;
|
||||
@@ -622,6 +642,17 @@ package gui
|
||||
_colorTableColor2.init(1,240,150,10,5,_gamePalette,_avatarPalette2,_loc10_,onColorChanged,102);
|
||||
_colorTablePatterns = new ColorTable();
|
||||
_colorTablePatterns.init(3,240,150,10,5,_gamePalette,_avatarPalette1,_loc8_,onColorChanged,102);
|
||||
_patternColorTables = [_colorTablePatterns];
|
||||
var _loc13_:int = 1;
|
||||
while(_loc13_ < 4)
|
||||
{
|
||||
_patternColorTables[_loc13_] = new ColorTable();
|
||||
ColorTable(_patternColorTables[_loc13_]).init(3 + _loc13_,240,150,10,5,_gamePalette,_avatarPalette1,_loc2_[1] >> 24 - _loc13_ * 8 & 0xFF,onColorChanged,102);
|
||||
ColorTable(_patternColorTables[_loc13_]).x = 21;
|
||||
ColorTable(_patternColorTables[_loc13_]).y = 176;
|
||||
_loc13_++;
|
||||
}
|
||||
_patternColorSlot = 0;
|
||||
_colorTableEyes = new ColorTable();
|
||||
_colorTableEyes.init(2,240,150,10,5,_gamePalette,_avatarPalette1,_loc5_,onColorChanged,102);
|
||||
_colorTableColor1.x = 21;
|
||||
@@ -916,9 +947,16 @@ package gui
|
||||
_loc9_ = _loc6_ >> 8 & 0xFF;
|
||||
_loc3_ = _loc6_ & 0xFF;
|
||||
_loc6_ = uint(_loc5_ << 24 | _loc7_ << 16 | _loc9_ << 8 | _loc3_);
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
// a special animal's pattern's second, third or fourth colour
|
||||
_loc5_ = 24 - (param1 - 3) * 8;
|
||||
_loc6_ = uint(_loc6_ & ~(0xFF << _loc5_) | (param2 & 0xFF) << _loc5_);
|
||||
}
|
||||
_avatarEditorView.colors = [_loc4_,_loc6_,_loc8_];
|
||||
if(param1 == 2 || param1 == 3)
|
||||
if(param1 >= 2)
|
||||
{
|
||||
colorCurrEyePattIcon();
|
||||
}
|
||||
@@ -1263,6 +1301,7 @@ package gui
|
||||
avEditor.colorTableBlock.patternsAndEyes.removeChild(_colorTableEyes);
|
||||
}
|
||||
avEditor.colorTableBlock.patternsAndEyes.addChild(_colorTablePatterns);
|
||||
showPatternColorChoice(_worldAvatar.customAvId != -1);
|
||||
if(_patterns.length > 0)
|
||||
{
|
||||
if(_patterns.length <= 1 && _worldAvatar.customAvId == -1)
|
||||
@@ -1293,6 +1332,7 @@ package gui
|
||||
{
|
||||
avEditor.colorTableBlock.patternsAndEyes.removeChild(_colorTablePatterns);
|
||||
}
|
||||
showPatternColorChoice(false);
|
||||
if(_customAvtIcon && avEditor.colorTableBlock.patternsAndEyes.specialAvtIconCont.contains(_customAvtIcon))
|
||||
{
|
||||
avEditor.colorTableBlock.patternsAndEyes.specialAvtIconCont.removeChild(_customAvtIcon);
|
||||
@@ -1323,6 +1363,77 @@ package gui
|
||||
avEditor.colorTableBlock.colors.visible = false;
|
||||
}
|
||||
|
||||
// the "1" to "4" left of the pattern's colour table, choosing which of
|
||||
// its four colours it sets, with that colour's table (param1), or
|
||||
// neither, and the first's table back
|
||||
private function showPatternColorChoice(param1:Boolean) : void
|
||||
{
|
||||
var _loc2_:MovieClip = avEditor.colorTableBlock.patternsAndEyes;
|
||||
var _loc3_:int = 0;
|
||||
var _loc4_:Sprite = null;
|
||||
if(_patternColorBtns == null)
|
||||
{
|
||||
_patternColorBtns = [];
|
||||
while(_loc3_ < 4)
|
||||
{
|
||||
_loc4_ = createSmallButton(String(_loc3_ + 1));
|
||||
_loc4_.name = "patternColor" + _loc3_;
|
||||
_loc4_.x = 2;
|
||||
_loc4_.y = 176 + _loc3_ * 20;
|
||||
_loc4_.addEventListener("mouseDown",onPatternColorBtn,false,0,true);
|
||||
_patternColorBtns.push(_loc4_);
|
||||
_loc3_++;
|
||||
}
|
||||
}
|
||||
_loc3_ = 0;
|
||||
while(_loc3_ < _patternColorBtns.length)
|
||||
{
|
||||
_loc4_ = _patternColorBtns[_loc3_];
|
||||
if(param1)
|
||||
{
|
||||
_loc2_.addChild(_loc4_);
|
||||
_loc4_.alpha = _loc3_ == _patternColorSlot ? 1 : 0.45;
|
||||
}
|
||||
else if(_loc4_.parent)
|
||||
{
|
||||
_loc4_.parent.removeChild(_loc4_);
|
||||
}
|
||||
_loc3_++;
|
||||
}
|
||||
// the first's table is added and taken away with the tab
|
||||
_loc3_ = 1;
|
||||
while(_loc3_ < _patternColorTables.length)
|
||||
{
|
||||
if(_loc2_.contains(_patternColorTables[_loc3_]))
|
||||
{
|
||||
_loc2_.removeChild(_patternColorTables[_loc3_]);
|
||||
}
|
||||
_loc3_++;
|
||||
}
|
||||
if(param1)
|
||||
{
|
||||
if(_patternColorSlot == 0)
|
||||
{
|
||||
_loc2_.addChild(_colorTablePatterns);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_loc2_.contains(_colorTablePatterns))
|
||||
{
|
||||
_loc2_.removeChild(_colorTablePatterns);
|
||||
}
|
||||
_loc2_.addChild(_patternColorTables[_patternColorSlot]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function onPatternColorBtn(param1:MouseEvent) : void
|
||||
{
|
||||
param1.stopPropagation();
|
||||
_patternColorSlot = int(Sprite(param1.currentTarget).name.charAt(12));
|
||||
showPatternColorChoice(true);
|
||||
}
|
||||
|
||||
private function onCustomIconLoaded(param1:MovieClip) : void
|
||||
{
|
||||
if(_avatarEditorView)
|
||||
|
||||
@@ -241,8 +241,6 @@ package avatar
|
||||
|
||||
private var _typing:Sprite;
|
||||
|
||||
private var _tradingSign:Sprite;
|
||||
|
||||
private var _typingDots:Array;
|
||||
|
||||
private var _typingTimer:Timer;
|
||||
@@ -683,8 +681,6 @@ package avatar
|
||||
}
|
||||
_typing = null;
|
||||
_typingDots = null;
|
||||
setTrading(false);
|
||||
_tradingSign = null;
|
||||
removeChild(_namebar);
|
||||
if(_secondaryEmot && _chatLayer.contains(_secondaryEmot))
|
||||
{
|
||||
@@ -1159,49 +1155,6 @@ package avatar
|
||||
}
|
||||
}
|
||||
|
||||
// trading (lib/world.js showTrading): a round sign with two arrows by
|
||||
// the head, for as long as the trade goes on. a child of the animal's
|
||||
// own, so it goes where the animal goes.
|
||||
public function setTrading(param1:Boolean) : void
|
||||
{
|
||||
var _loc2_:Point = null;
|
||||
if(!param1)
|
||||
{
|
||||
if(_tradingSign && _tradingSign.parent)
|
||||
{
|
||||
_tradingSign.parent.removeChild(_tradingSign);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(_tradingSign == null)
|
||||
{
|
||||
_tradingSign = new Sprite();
|
||||
_tradingSign.mouseEnabled = false;
|
||||
_tradingSign.mouseChildren = false;
|
||||
_tradingSign.graphics.lineStyle(2,0x7F6744);
|
||||
_tradingSign.graphics.beginFill(0xFFF2C4);
|
||||
_tradingSign.graphics.drawCircle(0,0,12);
|
||||
_tradingSign.graphics.endFill();
|
||||
// an arrow to the right over one to the left
|
||||
_tradingSign.graphics.lineStyle(2,0x4FA52F,1,false,"normal","round","round");
|
||||
_tradingSign.graphics.moveTo(-6,-3);
|
||||
_tradingSign.graphics.lineTo(6,-3);
|
||||
_tradingSign.graphics.moveTo(3,-6);
|
||||
_tradingSign.graphics.lineTo(6,-3);
|
||||
_tradingSign.graphics.lineTo(3,0);
|
||||
_tradingSign.graphics.lineStyle(2,0xD4482A,1,false,"normal","round","round");
|
||||
_tradingSign.graphics.moveTo(6,4);
|
||||
_tradingSign.graphics.lineTo(-6,4);
|
||||
_tradingSign.graphics.moveTo(-3,1);
|
||||
_tradingSign.graphics.lineTo(-6,4);
|
||||
_tradingSign.graphics.lineTo(-3,7);
|
||||
}
|
||||
_loc2_ = _avatar ? AvatarUtility.getAvatarChatOffset(_avatar.avTypeId) : new Point(0,-80);
|
||||
_tradingSign.x = _loc2_.x + 26;
|
||||
_tradingSign.y = _loc2_.y + 16;
|
||||
addChild(_tradingSign);
|
||||
}
|
||||
|
||||
private function hideTyping() : void
|
||||
{
|
||||
if(_typingTimer)
|
||||
|
||||
@@ -160,10 +160,9 @@ package gui
|
||||
}
|
||||
var _loc4_:Array = [{
|
||||
"type":TOGGLE_TYPE_JOIN,
|
||||
// the web item giver (AJClient.openTool), in the browser
|
||||
"frame":"itemFinder",
|
||||
"iconFrame":"redeemCode",
|
||||
"labelLabel":"Item Giver (web)",
|
||||
"labelLabel":"Item Giver",
|
||||
"btnLabel":"Open"
|
||||
},{
|
||||
// a player's own items (AJClient's Item Maker)
|
||||
|
||||
@@ -135,11 +135,6 @@ package
|
||||
AJClient.onMentions(param1.obj);
|
||||
return;
|
||||
}
|
||||
if(param1.obj[0] == "xtr")
|
||||
{
|
||||
AJClient.onTrading(param1.obj);
|
||||
return;
|
||||
}
|
||||
if(param1.obj[0] == "xty")
|
||||
{
|
||||
AJClient.onTyping(param1.obj);
|
||||
|
||||
Reference in new issue
Block a user