'T-Shirt', self::GroupEmblem => 'Group Emblem', self::RightArm => 'Right Arm', self::LeftArm => 'Left Arm', self::LeftLeg => 'Left Leg', self::RightLeg => 'Right Leg', self::GamePass => 'Game Pass', default => $this->name }; } public static function sellableTypes(): array { return [ self::TShirt, self::Audio, self::Hat, self::Model, self::Shirt, self::Pants, self::Decal, self::Face, self::Gear, self::Badge ]; } public function isSellable(): bool { return in_array($this, self::sellableTypes()); } public static function freeTypes(): array { return [ self::Audio, self::Model, self::Decal, ]; } public function isFree(): bool { return in_array($this, self::freeTypes()); } /** * Gets the asset types that can be worn by a user. * * @return array */ public static function wearableTypes(): array { return [ self::Head, self::Face, self::Gear, self::Hat, self::TShirt, self::Shirt, self::Pants ]; } /** * Checks if the asset type is a wearable type. * * @return bool */ public function isWearable(): bool { return in_array($this, self::wearableTypes()); } /** * Gets the asset types that are shown on the inventory sections. * * @return array */ public static function inventoryTypes(): array { return [ self::Head, self::Face, self::Gear, self::Hat, self::TShirt, self::Shirt, self::Pants, self::Decal, self::Model, self::Plugin, self::Animation, self::Place, self::GamePass, self::Audio, self::Badge, self::LeftArm, self::RightArm, self::LeftLeg, self::RightLeg, self::Torso, self::Package ]; } /** * Checks if the asset type is shown on the inventory selection. * * @return bool */ public function isInventoryType(): bool { return in_array($this, self::inventoryTypes()); } /** * Gets the asset types that are shown on the favorites section on user profiles. * * @return array */ public static function favoriteTypes(): array { return [ self::Head, self::Face, self::Gear, self::Hat, self::TShirt, self::Shirt, self::Pants, self::Decal, self::Model ]; } /** * Checks if the asset type is shown on the favorites selection. * * @return bool */ public function isFavoriteType(): bool { return in_array($this, self::favoriteTypes()); } /** * Gets the Font Awesome icon for this asset type. * * @return string */ public function fontAwesomeIcon(): string { return match($this) { self::Place => 'fa-image-landscape', self::Model => 'fa-cubes', self::Decal => 'fa-file-image', self::Badge => 'fa-certificate', self::GamePass => 'fa-ticket', self::Audio => 'fa-volume-high', self::Animation => 'fa-person-running', self::Shirt => 'fa-shirt', self::TShirt => 'fa-shirt-tank-top', self::Pants => 'fa-clothes-hanger', self::Plugin => 'fa-puzzle-piece', }; } /** * Gets the asset types that are shown on the develop page. * Note that not everything here is creatable through the develop page (places, models, etc). * * @return array */ public static function developTypes(): array { return [ self::Place, self::Model, self::Decal, self::Badge, self::GamePass, self::Audio, self::Animation, self::Shirt, self::TShirt, self::Pants, self::Plugin, ]; } /** * Checks if the asset type is shown on the develop page. * * @return bool */ public function isDevelopType(): bool { return in_array($this, self::developTypes()); } /** * Checks if the asset type can be uploaded through the develop page * * @return bool */ public function isDevelopCreatable(): bool { return match($this) { self::TShirt => true, self::Decal => true, self::Audio => true, self::Animation => true, default => false }; } /** * Gets the upload validator for the asset type * * @return array */ public function rules(): array { return match($this) { self::TShirt => ['file', 'mimes:png,jpeg', 'max:8192'], self::Decal => ['file', 'mimes:png,jpeg', 'max:8192'], self::Audio => ['file', 'mimes:mp3,wav,wmv,midi,txt', 'max:8192'], self::Animation => ['file', 'max:8192', new IsRobloxXml], default => [] }; } }