Move asset_type helper to WearableType, where it belongs

This commit is contained in:
Salad Dais
2025-06-14 03:21:44 +00:00
parent c8dc67ea37
commit 22fb44ef28
2 changed files with 7 additions and 7 deletions

View File

@@ -285,6 +285,12 @@ class WearableType(IntEnum):
PHYSICS = 15
UNIVERSAL = 16
@property
def asset_type(self) -> AssetType:
if self in (WearableType.HAIR, WearableType.SKIN, WearableType.EYES, WearableType.SHAPE):
return AssetType.BODYPART
return AssetType.CLOTHING
def _register_permissions_flags(message_name, block_name):
def _wrapper(flag_cls):

View File

@@ -16,7 +16,7 @@ from hippolyzer.lib.base.datatypes import UUID
from hippolyzer.lib.base.helpers import get_resource_filename
from hippolyzer.lib.base.inventory import InventorySaleInfo, InventoryPermissions
from hippolyzer.lib.base.legacy_schema import SchemaBase, parse_schema_line, SchemaParsingError
from hippolyzer.lib.base.templates import WearableType, AssetType
from hippolyzer.lib.base.templates import WearableType
LOG = logging.getLogger(__name__)
_T = TypeVar("_T")
@@ -77,12 +77,6 @@ class AvatarTEIndex(enum.IntEnum):
def is_baked(self) -> bool:
return self.name.endswith("_BAKED")
@property
def asset_type(self) -> AssetType:
if self in (WearableType.HAIR, WearableType.SKIN, WearableType.EYES, WearableType.SHAPE):
return AssetType.BODYPART
return AssetType.CLOTHING
@dataclasses.dataclass
class VisualParam: