🆕 🐶 have you favorite pet as your best pall next to you

This commit is contained in:
duckietm
2026-03-25 14:11:53 +01:00
parent 4ac0da962f
commit 303b75d378
7 changed files with 236 additions and 2 deletions
@@ -32,6 +32,9 @@ export class AvatarEditorThumbnailsHelper
AvatarFigurePartType.HEAD_ACCESSORY,
AvatarFigurePartType.HEAD_ACCESSORY_EXTRA,
AvatarFigurePartType.RIGHT_HAND_ITEM,
AvatarFigurePartType.PET,
'ptl',
'ptr',
];
private static getThumbnailKey(setType: string, part: IAvatarEditorCategoryPartItem): string
@@ -106,6 +109,22 @@ export class AvatarEditorThumbnailsHelper
container.addChild(sprite);
}
if(container.children.length > 0)
{
const isPetPart = parts.some(p => p.type === 'pt' || p.type === 'ptl' || p.type === 'ptr');
if(isPetPart)
{
const bounds = container.getBounds();
for(const child of container.children)
{
(child as NitroSprite).position.x -= bounds.x;
(child as NitroSprite).position.y -= bounds.y;
}
}
}
return container;
};