rarity_icon.py (2277B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\cosmetics\client\ships\skins\static_data\rarity_icon.py 2 from carbonui.util.color import Color 3 from cosmetics.common.ships.skins.static_data.component_rarity import ComponentRarityLevel 4 5 def get_path(rarity): 6 if rarity == ComponentRarityLevel.STANDARD: 7 return 'res:/UI/Texture/Classes/Cosmetics/Ship/cards/rarity/rarity_1.png' 8 if rarity == ComponentRarityLevel.ADVANCED: 9 return 'res:/UI/Texture/Classes/Cosmetics/Ship/cards/rarity/rarity_2.png' 10 if rarity == ComponentRarityLevel.ELITE: 11 return 'res:/UI/Texture/Classes/Cosmetics/Ship/cards/rarity/rarity_3.png' 12 if rarity == ComponentRarityLevel.SUPERIOR: 13 return 'res:/UI/Texture/Classes/Cosmetics/Ship/cards/rarity/rarity_4.png' 14 if rarity == ComponentRarityLevel.STELLAR: 15 return 'res:/UI/Texture/Classes/Cosmetics/Ship/cards/rarity/rarity_5.png' 16 if rarity == ComponentRarityLevel.EMPYREAN: 17 return 'res:/UI/Texture/Classes/Cosmetics/Ship/cards/rarity/rarity_6.png' 18 19 20 COMPONENT_RARITY_COLORS = {ComponentRarityLevel.STANDARD: Color.HextoRGBA(hexARGB='#E6FFFFFF'), 21 ComponentRarityLevel.ADVANCED: Color.HextoRGBA(hexARGB='#FF409FFF'), 22 ComponentRarityLevel.ELITE: Color.HextoRGBA(hexARGB='#FF40FF9F'), 23 ComponentRarityLevel.SUPERIOR: Color.HextoRGBA(hexARGB='#FFCF40FF'), 24 ComponentRarityLevel.STELLAR: Color.HextoRGBA(hexARGB='#FFFF6F40'), 25 ComponentRarityLevel.EMPYREAN: Color.HextoRGBA(hexARGB='#FF40FFFF')} 26 COMPONENT_RARITY_NAMES = {ComponentRarityLevel.STANDARD: 'UI/Personalization/ShipSkins/DesignComponents/Rarities/Standard', 27 ComponentRarityLevel.ADVANCED: 'UI/Personalization/ShipSkins/DesignComponents/Rarities/Advanced', 28 ComponentRarityLevel.ELITE: 'UI/Personalization/ShipSkins/DesignComponents/Rarities/Elite', 29 ComponentRarityLevel.SUPERIOR: 'UI/Personalization/ShipSkins/DesignComponents/Rarities/Superior', 30 ComponentRarityLevel.STELLAR: 'UI/Personalization/ShipSkins/DesignComponents/Rarities/Stellar', 31 ComponentRarityLevel.EMPYREAN: 'UI/Personalization/ShipSkins/DesignComponents/Rarities/Empyrean'} 32 33 def get_color(rarity): 34 return COMPONENT_RARITY_COLORS.get(rarity, None) 35 36 37 def get_name(rarity): 38 return COMPONENT_RARITY_NAMES.get(rarity, None)