studioUtil.py (1098B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\cosmetics\ship\pages\studio\studioUtil.py 2 import math 3 from appConst import factionDeathless 4 from eve.client.script.ui.shared.shipTree import shipTreeConst 5 from carbon.common.script.sys.serviceConst import ROLE_GML 6 RANDOMIZE_BUTTON_ANALYTIC_ID = 'ShipSKINR_RandomizeDesign' 7 SHARE_BUTTON_ANALYTIC_ID = 'ShipSKINR_ShareDesign' 8 CIRCULAR_LAYOUT_RATIO = 0.9 9 10 def get_radial_position(radius, angle_deg): 11 x = radius * math.cos(math.radians(angle_deg)) 12 y = radius * math.sin(math.radians(angle_deg)) 13 return (x, y) 14 15 16 def get_circular_layout_radius(width, height): 17 diameter = min(width, height) 18 return diameter * 0.5 * CIRCULAR_LAYOUT_RATIO 19 20 21 def is_green_screen_enabled(): 22 if session.role & ROLE_GML: 23 from eve.devtools.script.insider import qa_green_screen_setting 24 return qa_green_screen_setting.is_enabled() 25 return False 26 27 28 def get_ship_factions(): 29 BLACKLISTED_FACTION_IDS = () 30 return [ x for x in shipTreeConst.FACTIONS if x not in BLACKLISTED_FACTION_IDS ]