mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
feat: custom pictures setting, to hide the pictures players give items
A "Custom pictures" row in the game's settings menu, as Blocked players: shown by default; hidden, every custom item is drawn with its base item's art (icons, worn, placed in dens, Jam-A-Grams). Kept in user var 9006 (1 for hidden), which the server stores like the other settings. buildVersion 62.
This commit is contained in:
1 parent
6db96325dd
commit
b551a587a9
5 files changed
+49
-5
No files matched your search
@@ -133,7 +133,8 @@ module.exports = {
|
||||
// 48: the item giver (the item finder renamed) with previews and hex colours;
|
||||
// 49 and 50: its link to a colour picker.
|
||||
// 61: the Owner, Moderator and Verified name tag badges seen by everyone.
|
||||
buildVersion: env.AJ_BUILD_VERSION || "61",
|
||||
// 62: "Custom pictures" in the settings menu, to hide players' item pictures.
|
||||
buildVersion: env.AJ_BUILD_VERSION || "62",
|
||||
// what the official CDN is asked for; not ours to change.
|
||||
upstreamBuildVersion: "3",
|
||||
|
||||
|
||||
+18
-4
@@ -579,17 +579,31 @@ package
|
||||
// the pictures as bitmaps, for wearing: "kind:id" -> {bmp, art, waiting}
|
||||
private static var _artBitmaps:Object = {};
|
||||
|
||||
// "Custom pictures" in the settings menu (gui.ItemWindowToggle): the
|
||||
// pictures players give their items, shown (the default) or not, when
|
||||
// every item is drawn with its base's art. user var 9006, 1 for hidden.
|
||||
public static function customArtOn() : Boolean
|
||||
{
|
||||
return settingOf(9006) != 1;
|
||||
}
|
||||
|
||||
// an item's picture version, or null for none or with them hidden
|
||||
private static function artOf(param1:String, param2:int) : String
|
||||
{
|
||||
return customArtOn() ? _customArt[param1 + ":" + param2] : null;
|
||||
}
|
||||
|
||||
// the look a worn item has, or null for one drawn as the game draws it
|
||||
public static function customArtMode(param1:String, param2:int) : String
|
||||
{
|
||||
return _customArt[param1 + ":" + param2] == null ? null : _customArtMode[param1 + ":" + param2];
|
||||
return artOf(param1,param2) == null ? null : _customArtMode[param1 + ":" + param2];
|
||||
}
|
||||
|
||||
// what makes a painted frame of it different from its base's, for a
|
||||
// cache key ("" for none)
|
||||
public static function customArtKey(param1:String, param2:int) : String
|
||||
{
|
||||
var _loc3_:String = _customArt[param1 + ":" + param2];
|
||||
var _loc3_:String = artOf(param1,param2);
|
||||
return _loc3_ == null ? "" : param2 + ":" + _loc3_ + ":" + _customArtMode[param1 + ":" + param2];
|
||||
}
|
||||
|
||||
@@ -598,7 +612,7 @@ package
|
||||
public static function customArtBitmap(param1:String, param2:int, param3:Object = null) : BitmapData
|
||||
{
|
||||
var _loc4_:String = param1 + ":" + param2;
|
||||
var _loc5_:String = _customArt[_loc4_];
|
||||
var _loc5_:String = artOf(param1,param2);
|
||||
var _loc6_:Object = _artBitmaps[_loc4_];
|
||||
if(_loc5_ == null)
|
||||
{
|
||||
@@ -653,7 +667,7 @@ package
|
||||
// the picture's address, or null when the item has none.
|
||||
public static function customArtUrl(param1:String, param2:int) : String
|
||||
{
|
||||
var _loc3_:String = _customArt[param1 + ":" + param2];
|
||||
var _loc3_:String = artOf(param1,param2);
|
||||
return _loc3_ == null ? null : gMainFrame.clientInfo.websiteURL + "itemart/" + param1 + "/" + param2 + ".png?v=" + encodeURIComponent(_loc3_);
|
||||
}
|
||||
|
||||
|
||||
@@ -179,6 +179,9 @@ package gui.itemWindows
|
||||
case "hideBlocked":
|
||||
showHideBlocked();
|
||||
break;
|
||||
case "customArt":
|
||||
showCustomArt();
|
||||
break;
|
||||
case "wasd":
|
||||
showWasd();
|
||||
break;
|
||||
@@ -457,6 +460,24 @@ package gui.itemWindows
|
||||
showHideBlocked();
|
||||
}
|
||||
|
||||
// "Custom pictures": the pictures players give their items, or every
|
||||
// item with its base's art (AJClient.customArtOn). user var 9006.
|
||||
private function showCustomArt() : void
|
||||
{
|
||||
var _loc1_:String = AJClient.customArtOn() ? "Hide" : "Show";
|
||||
_window.goNowBtn.down.txt.text = _loc1_;
|
||||
_window.goNowBtn.mouse.mouse.txt.text = _loc1_;
|
||||
_window.goNowBtn.mouse.up.txt.text = _loc1_;
|
||||
_window.labelTxtCont.labelTxt.text = AJClient.customArtOn() ? "Custom pictures: shown" : "Custom pictures: hidden";
|
||||
}
|
||||
|
||||
private function setCustomArt(param1:Boolean) : void
|
||||
{
|
||||
gMainFrame.userInfo.userVarCache.updateUserVar(9006,param1 ? 0 : 1);
|
||||
AchievementXtCommManager.requestSetUserVar(9006,param1 ? 0 : 1);
|
||||
showCustomArt();
|
||||
}
|
||||
|
||||
private function handleMouseDown(param1:MouseEvent) : void
|
||||
{
|
||||
var _loc2_:Number = NaN;
|
||||
@@ -682,6 +703,9 @@ package gui.itemWindows
|
||||
case "hideBlocked":
|
||||
setHideBlocked(!blockedAreHidden());
|
||||
break;
|
||||
case "customArt":
|
||||
setCustomArt(!AJClient.customArtOn());
|
||||
break;
|
||||
case "wasd":
|
||||
setWasd(!AJClient.wasdOn());
|
||||
break;
|
||||
|
||||
@@ -220,6 +220,11 @@ package gui
|
||||
"type":TOGGLE_TYPE_JOIN,
|
||||
"frame":"hideBlocked",
|
||||
"iconFrame":"buddyRequest"
|
||||
},{
|
||||
// the pictures players give their items (AJClient.customArtOn)
|
||||
"type":TOGGLE_TYPE_JOIN,
|
||||
"frame":"customArt",
|
||||
"iconFrame":"redeemCode"
|
||||
},{
|
||||
"type":TOGGLE_TYPE_JOIN,
|
||||
"frame":"redeemCode",
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user