NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

careerConst.py (15218B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\careerPortal\careerConst.py
      2 import characterdata.careerpathconst as cpConst
      3 import eveicon
      4 from clientsettings.setting import CharSettingEnum, CharSettingUUID
      5 import careergoals.client.const as careerGoalsConst
      6 from characterdata import careerpath
      7 from eve.client.script.ui import eveColor
      8 from eve.client.script.ui.shared.agencyNew.contentGroups.contentGroupConst import contentGroupAbyssalDeadspace, contentGroupAsteroidBelts, contentGroupCareerAgents, contentGroupCombatAnomalies, contentGroupCorp, contentGroupSignatures, contentGroupMissionAgentsDistribution, contentGroupEpicArcs, contentGroupFactionalWarfareAgents, contentGroupFactionalWarfare, contentGroupFactionalWarfareSystems, contentGroupFleetUp, contentGroupHome, contentGroupMissionAgentsMining, contentGroupMissionAgentsSecurity, contentGroupMissionAgentsHeraldry
      9 from itertoolsext.Enum import Enum
     10 from localization import GetByMessageID, GetByLabel
     11 LEVEL_ANIMATION_DURATION = 0.6
     12 HOVER_ANIMATION_DURATION = 0.2
     13 AURA_BADGE_WIDTH = 68
     14 AURA_BADGE_HEIGHT = 75
     15 AGENCY_PAGE_NAME_ABYSSAL_DEADSPACE = 'ABYSSAL_DEADSPACE'
     16 AGENCY_PAGE_NAME_ASTEROID_BELTS = 'ASTEROID_BELTS'
     17 AGENCY_PAGE_NAME_CAREER_AGENTS = 'CAREER_AGENTS'
     18 AGENCY_PAGE_NAME_COMBAT_ANOMOLIES = 'COMBAT_ANOMOLIES'
     19 AGENCY_PAGE_NAME_CORP_RECRUITMENT = 'CORP_RECRUITMENT'
     20 AGENCY_PAGE_NAME_COSMIC_SIGNATURES = 'COSMIC_SIGNATURES'
     21 AGENCY_PAGE_NAME_DISTRIBUTION_AGENTS = 'DISTRIBUTION_AGENTS'
     22 AGENCY_PAGE_NAME_EPIC_ARCS = 'EPIC_ARCS'
     23 AGENCY_PAGE_NAME_FACTION_WARFARE_AGENTS = 'FACTION_WARFARE_AGENTS'
     24 AGENCY_PAGE_NAME_FACTION_WARFARE_INFO = 'FACTION_WARFARE_INFO'
     25 AGENCY_PAGE_NAME_FACTION_WARFARE_LEARN = 'FACTION_WARFARE_LEARN'
     26 AGENCY_PAGE_NAME_FACTION_WARFARE_SYSTEMS = 'FACTION_WARFARE_SYSTEMS'
     27 AGENCY_PAGE_NAME_FLEET_FINDER = 'FLEET_FINDER'
     28 AGENCY_PAGE_NAME_HOMEPAGE = 'HOMEPAGE'
     29 AGENCY_PAGE_NAME_MINING_AGENTS = 'MINING_AGENTS'
     30 AGENCY_PAGE_NAME_SECURITY_AGENTS = 'SECURITY_AGENTS'
     31 AGENCY_PAGE_NAME_HERALDRY_AGENTS = 'HERALDRY_AGENTS'
     32 AGENCY_SECTION_NAMES_TO_IDS = {AGENCY_PAGE_NAME_ABYSSAL_DEADSPACE: contentGroupAbyssalDeadspace,
     33  AGENCY_PAGE_NAME_ASTEROID_BELTS: contentGroupAsteroidBelts,
     34  AGENCY_PAGE_NAME_CAREER_AGENTS: contentGroupCareerAgents,
     35  AGENCY_PAGE_NAME_COMBAT_ANOMOLIES: contentGroupCombatAnomalies,
     36  AGENCY_PAGE_NAME_CORP_RECRUITMENT: contentGroupCorp,
     37  AGENCY_PAGE_NAME_COSMIC_SIGNATURES: contentGroupSignatures,
     38  AGENCY_PAGE_NAME_DISTRIBUTION_AGENTS: contentGroupMissionAgentsDistribution,
     39  AGENCY_PAGE_NAME_EPIC_ARCS: contentGroupEpicArcs,
     40  AGENCY_PAGE_NAME_FACTION_WARFARE_AGENTS: contentGroupFactionalWarfareAgents,
     41  AGENCY_PAGE_NAME_FACTION_WARFARE_INFO: contentGroupFactionalWarfare,
     42  AGENCY_PAGE_NAME_FACTION_WARFARE_LEARN: contentGroupFactionalWarfare,
     43  AGENCY_PAGE_NAME_FACTION_WARFARE_SYSTEMS: contentGroupFactionalWarfareSystems,
     44  AGENCY_PAGE_NAME_FLEET_FINDER: contentGroupFleetUp,
     45  AGENCY_PAGE_NAME_HOMEPAGE: contentGroupHome,
     46  AGENCY_PAGE_NAME_MINING_AGENTS: contentGroupMissionAgentsMining,
     47  AGENCY_PAGE_NAME_SECURITY_AGENTS: contentGroupMissionAgentsSecurity,
     48  AGENCY_PAGE_NAME_HERALDRY_AGENTS: contentGroupMissionAgentsHeraldry}
     49 CONTENT_FADE_IN_DURATION = 1.5
     50 FANFARE_START_DELAY = CONTENT_FADE_IN_DURATION
     51 FANFARE_PROGRESS_DURATION = 3.0
     52 
     53 def GetCareerPathGroupName(careerPathID, groupID):
     54     if careerPathID not in careerGoalsConst.CAREER_PATH_GROUPS:
     55         return None
     56     careerPathNames = {cpConst.career_path_enforcer: 'Enforcer',
     57      cpConst.career_path_explorer: 'Explorer',
     58      cpConst.career_path_industrialist: 'Industrialist',
     59      cpConst.career_path_soldier_of_fortune: 'SoldierOfFortune'}
     60     for key, val in careerGoalsConst.CAREER_PATH_GROUPS[careerPathID].iteritems():
     61         if val == groupID:
     62             return GetByLabel('Character/CareerGoals/%s/GroupNames/%s' % (careerPathNames[careerPathID], key))
     63 
     64 
     65 def GetCareerPathName(careerPathID):
     66     careerInfo = careerpath.get_career_path(careerPathID)
     67     if careerInfo:
     68         return GetByMessageID(careerInfo.nameID)
     69 
     70 
     71 def GetSortedCareerPaths():
     72     return [cpConst.career_path_explorer,
     73      cpConst.career_path_soldier_of_fortune,
     74      cpConst.career_path_industrialist,
     75      cpConst.career_path_enforcer]
     76 
     77 
     78 def GetAllActivities():
     79     result = []
     80     for values in careerGoalsConst.CAREER_PATH_GROUPS.itervalues():
     81         result.extend([ a for a in values.itervalues() ])
     82 
     83     return result
     84 
     85 
     86 HIGHLIGHTED_ACTIVITIES = {cpConst.career_path_enforcer: [careerGoalsConst.ENFORCER_ENFORCERCAREERAGENTMISSIONS],
     87  cpConst.career_path_soldier_of_fortune: [careerGoalsConst.SOLDIEROFFORTUNE_CAREERAGENTMISSIONS],
     88  cpConst.career_path_explorer: [careerGoalsConst.EXPLORER_CAREERAGENTMISSIONS],
     89  cpConst.career_path_industrialist: [careerGoalsConst.INDUSTRIALIST_CAREERAGENTMISSIONS]}
     90 SELECTED_CAREER_PATH_SETTING = CharSettingEnum('careerPortal_selectedCareerPath', None, [cpConst.career_path_none,
     91  cpConst.career_path_enforcer,
     92  cpConst.career_path_explorer,
     93  cpConst.career_path_industrialist,
     94  cpConst.career_path_soldier_of_fortune])
     95 SELECTED_ACTIVITY_SETTING = CharSettingEnum('careerPortal_selectedActivity', None, GetAllActivities())
     96 SELECTED_GOAL_SETTING = CharSettingUUID('careerPortal_selectedGoal', None)
     97 
     98 @Enum
     99 
    100 class CareerWindowState(object):
    101     CAREERS_VIEW = 'CAREERS_VIEW'
    102     ACTIVITIES_VIEW = 'ACTIVITIES_VIEW'
    103     GOALS_VIEW = 'GOALS_VIEW'
    104 
    105 
    106 CAREER_WINDOW_STATE_SETTING = CharSettingEnum('careerPortal_careerWindowState', CareerWindowState.CAREERS_VIEW, [ x for x in CareerWindowState.iterkeys() ])
    107 
    108 @Enum
    109 
    110 class CareersViewState(object):
    111     IN_FOCUS = 'IN_FOCUS'
    112     ONE_DOWN = 'ONE_DOWN'
    113 
    114 
    115 @Enum
    116 
    117 class ActivitiesViewState(object):
    118     IN_FOCUS = 'IN_FOCUS'
    119     ONE_DOWN = 'ONE_DOWN'
    120     HIDDEN = 'HIDDEN'
    121 
    122 
    123 @Enum
    124 
    125 class GoalsViewState(object):
    126     IN_FOCUS = 'IN_FOCUS'
    127     HIDDEN = 'HIDDEN'
    128 
    129 
    130 ICON_BY_CAREER_ID = {cpConst.career_path_enforcer: eveicon.enforcer.resolve(128),
    131  cpConst.career_path_soldier_of_fortune: eveicon.soldier_of_fortune.resolve(128),
    132  cpConst.career_path_explorer: eveicon.explorer.resolve(128),
    133  cpConst.career_path_industrialist: eveicon.industrialist.resolve(128)}
    134 COLOR_BY_CAREER_ID = {cpConst.career_path_enforcer: eveColor.CRYO_BLUE,
    135  cpConst.career_path_explorer: eveColor.LEAFY_GREEN,
    136  cpConst.career_path_industrialist: eveColor.SAND_YELLOW,
    137  cpConst.career_path_soldier_of_fortune: eveColor.DANGER_RED}
    138 BG_IMAGE_BY_CAREER_ID = {cpConst.career_path_enforcer: 'res:/UI/Texture/classes/careerPortal/backgrounds/bg_Enforcer.png',
    139  cpConst.career_path_explorer: 'res:/UI/Texture/classes/careerPortal/backgrounds/bg_Explorer.png',
    140  cpConst.career_path_industrialist: 'res:/UI/Texture/classes/careerPortal/backgrounds/bg_Industrialist.png',
    141  cpConst.career_path_soldier_of_fortune: 'res:/UI/Texture/classes/careerPortal/backgrounds/bg_SoldierOfFortune.png'}
    142 BG_DETAIL_BY_CAREER_ID = {cpConst.career_path_enforcer: 'res:/UI/Texture/classes/careerPortal/backgrounds/bg_detail_topLeft.png',
    143  cpConst.career_path_explorer: 'res:/UI/Texture/classes/careerPortal/backgrounds/bg_detail_topRight.png',
    144  cpConst.career_path_industrialist: 'res:/UI/Texture/classes/careerPortal/backgrounds/bg_detail_bottomLeft.png',
    145  cpConst.career_path_soldier_of_fortune: 'res:/UI/Texture/classes/careerPortal/backgrounds/bg_detail_bottomRight.png'}
    146 ICON_BY_ACTIVITY_ID = {careerGoalsConst.EXPLORER_CAREERAGENTMISSIONS: 'res:/UI/Texture/classes/careerPortal/activities/explorer_agent_32.png',
    147  careerGoalsConst.EXPLORER_SCANNING: 'res:/UI/Texture/classes/careerPortal/activities/scanning_32.png',
    148  careerGoalsConst.EXPLORER_HACKING: 'res:/UI/Texture/classes/careerPortal/activities/hacking_32.png',
    149  careerGoalsConst.EXPLORER_HACKING2: 'res:/UI/Texture/classes/careerPortal/activities/advanced_hacking_32.png',
    150  careerGoalsConst.EXPLORER_WORMHOLES: 'res:/UI/Texture/classes/careerPortal/activities/wormholes_32.png',
    151  careerGoalsConst.EXPLORER_GASSITES: 'res:/UI/Texture/classes/careerPortal/activities/gas_sites_32.png',
    152  careerGoalsConst.EXPLORER_COMBATSITES: 'res:/UI/Texture/classes/careerPortal/activities/combat_sites_32.png',
    153  careerGoalsConst.EXPLORER_NAVIGATION: 'res:/UI/Texture/classes/careerPortal/activities/navigation_32.png',
    154  careerGoalsConst.EXPLORER_NAVIGATION2: 'res:/UI/Texture/classes/careerPortal/activities/advanced_navigation_32.png',
    155  careerGoalsConst.EXPLORER_PROJECTDISCOVERY: 'res:/UI/Texture/classes/careerPortal/activities/project_discovery_32.png',
    156  careerGoalsConst.INDUSTRIALIST_CAREERAGENTMISSIONS: 'res:/UI/Texture/classes/careerPortal/activities/industrialist_agent_32.png',
    157  careerGoalsConst.INDUSTRIALIST_MARKET: 'res:/UI/Texture/classes/careerPortal/activities/market_32.png',
    158  careerGoalsConst.INDUSTRIALIST_SALVAGE: 'res:/UI/Texture/classes/careerPortal/activities/salvaging_32.png',
    159  careerGoalsConst.INDUSTRIALIST_RESOURCEHARVESTING: 'res:/UI/Texture/classes/careerPortal/activities/explorer_agent_32.png',
    160  careerGoalsConst.INDUSTRIALIST_REFINING: 'res:/UI/Texture/classes/careerPortal/activities/refining_32.png',
    161  careerGoalsConst.INDUSTRIALIST_MANUFACTURING: 'res:/UI/Texture/classes/careerPortal/activities/industry_32.png',
    162  careerGoalsConst.INDUSTRIALIST_DISTRIBUTIONAGENT: 'res:/UI/Texture/classes/careerPortal/activities/industrialist_agent_32.png',
    163  careerGoalsConst.INDUSTRIALIST_MININGAGENT: 'res:/UI/Texture/classes/careerPortal/activities/mining_agent_32.png',
    164  careerGoalsConst.INDUSTRIALIST_RESEARCH: 'res:/UI/Texture/classes/careerPortal/activities/research_32.png',
    165  careerGoalsConst.ENFORCER_ENFORCERCAREERAGENTMISSIONS: 'res:/UI/Texture/classes/careerPortal/activities/enforcer_agent_32.png',
    166  careerGoalsConst.ENFORCER_SECURITYAGENT: 'res:/UI/Texture/classes/careerPortal/activities/enforcer_agent_32.png',
    167  careerGoalsConst.ENFORCER_ABYSSALDEADSPACE: 'res:/UI/Texture/classes/careerPortal/activities/abyssal_filament_32.png',
    168  careerGoalsConst.ENFORCER_COMBAT: 'res:/UI/Texture/classes/careerPortal/activities/combat_32.png',
    169  careerGoalsConst.ENFORCER_BOUNTIES: 'res:/UI/Texture/classes/careerPortal/activities/bounties_32.png',
    170  careerGoalsConst.ENFORCER_COMBATSITES: 'res:/UI/Texture/classes/careerPortal/activities/combat_sites_32.png',
    171  careerGoalsConst.ENFORCER_EPICARC: 'res:/UI/Texture/classes/careerPortal/activities/epic_arc_32.png',
    172  careerGoalsConst.ENFORCER_MARKET: 'res:/UI/Texture/classes/careerPortal/activities/market_32.png',
    173  careerGoalsConst.ENFORCER_STANDINGS: 'res:/UI/Texture/classes/careerPortal/activities/standings_32.png',
    174  careerGoalsConst.ENFORCER_LOYALTYPOINTS: 'res:/UI/Texture/classes/careerPortal/activities/loyalty_points_32.png',
    175  careerGoalsConst.SOLDIEROFFORTUNE_CAREERAGENTMISSIONS: 'res:/UI/Texture/classes/careerPortal/activities/sof_agent_32.png',
    176  careerGoalsConst.SOLDIEROFFORTUNE_SOCIAL: 'res:/UI/Texture/classes/careerPortal/activities/social_32.png',
    177  careerGoalsConst.SOLDIEROFFORTUNE_ELECTRONICWARFARE: 'res:/UI/Texture/classes/careerPortal/activities/electronicwarfare_32.png',
    178  careerGoalsConst.SOLDIEROFFORTUNE_COMBAT1: 'res:/UI/Texture/classes/careerPortal/activities/combat_32.png',
    179  careerGoalsConst.SOLDIEROFFORTUNE_PVP: 'res:/UI/Texture/classes/careerPortal/activities/duel_pvp_32.png',
    180  careerGoalsConst.SOLDIEROFFORTUNE_CAPACITORWARFARE: 'res:/UI/Texture/classes/careerPortal/activities/cap_warfare_32.png',
    181  careerGoalsConst.SOLDIEROFFORTUNE_FACTIONWARFARE: 'res:/UI/Texture/classes/careerPortal/activities/faction_warfare_32.png',
    182  careerGoalsConst.SOLDIEROFFORTUNE_SUPPORT: 'res:/UI/Texture/classes/careerPortal/activities/fleet_support_32.png',
    183  careerGoalsConst.SOLDIEROFFORTUNE_DESTRUCTION: 'res:/UI/Texture/classes/careerPortal/activities/destroy_32.png',
    184  careerGoalsConst.SOLDIEROFFORTUNE_DUELS: 'res:/UI/Texture/classes/careerPortal/activities/duel_pvp_32.png'}
    185 THREAT_NAMES = {careerGoalsConst.GoalThreat.THREAT_NONE: 'UI/CareerPortal/Threat0',
    186  careerGoalsConst.GoalThreat.THREAT_LOW: 'UI/CareerPortal/Threat1',
    187  careerGoalsConst.GoalThreat.THREAT_MEDIUM: 'UI/CareerPortal/Threat2',
    188  careerGoalsConst.GoalThreat.THREAT_HIGH: 'UI/CareerPortal/Threat3'}
    189 
    190 def get_threat_name(threat_level):
    191     labelPath = THREAT_NAMES.get(threat_level, None)
    192     if labelPath:
    193         return GetByLabel(labelPath)
    194     return ''
    195 
    196 
    197 CRATE_128_SIZES = {cpConst.career_path_enforcer: 'res:/UI/Texture/classes/careerPortal/crates/enforcerCrate_128.png',
    198  cpConst.career_path_soldier_of_fortune: 'res:/UI/Texture/classes/careerPortal/crates/sofCrate_128.png',
    199  cpConst.career_path_explorer: 'res:/UI/Texture/classes/careerPortal/crates/explorerCrate_128.png',
    200  cpConst.career_path_industrialist: 'res:/UI/Texture/classes/careerPortal/crates/industrialistCrate_128.png'}
    201 CRATE_64_SIZES = {cpConst.career_path_enforcer: 'res:/UI/Texture/classes/careerPortal/crates/enforcerCrate_64.png',
    202  cpConst.career_path_soldier_of_fortune: 'res:/UI/Texture/classes/careerPortal/crates/sofCrate_64.png',
    203  cpConst.career_path_explorer: 'res:/UI/Texture/classes/careerPortal/crates/explorerCrate_64.png',
    204  cpConst.career_path_industrialist: 'res:/UI/Texture/classes/careerPortal/crates/industrialistCrate_64.png'}
    205 CAREERS_32_SIZES = {cpConst.career_path_enforcer: eveicon.enforcer.resolve(32),
    206  cpConst.career_path_soldier_of_fortune: eveicon.soldier_of_fortune.resolve(32),
    207  cpConst.career_path_explorer: eveicon.explorer.resolve(32),
    208  cpConst.career_path_industrialist: eveicon.industrialist.resolve(32),
    209  cpConst.career_path_none: eveicon.unclassified.resolve(32)}
    210 CAREERS_16_SIZES = {cpConst.career_path_enforcer: eveicon.enforcer.resolve(16),
    211  cpConst.career_path_soldier_of_fortune: eveicon.soldier_of_fortune.resolve(16),
    212  cpConst.career_path_explorer: eveicon.explorer.resolve(16),
    213  cpConst.career_path_industrialist: eveicon.industrialist.resolve(16),
    214  cpConst.career_path_none: eveicon.unclassified.resolve(16)}
    215 CAREERS_BG_FLAIR = {cpConst.career_path_enforcer: 'res:/UI/Texture/Shared/CareerPaths/enforcer_flair.png',
    216  cpConst.career_path_soldier_of_fortune: 'res:/UI/Texture/Shared/CareerPaths/sof_flair.png',
    217  cpConst.career_path_explorer: 'res:/UI/Texture/Shared/CareerPaths/explorer_flair.png',
    218  cpConst.career_path_industrialist: 'res:/UI/Texture/Shared/CareerPaths/industrialist_flair.png',
    219  cpConst.career_path_none: 'res:/UI/Texture/Shared/CareerPaths/unclassified_flair.png'}
    220 CAREER_VIDEOS = {cpConst.career_path_enforcer: 'res:/video/AIRCareerProgram/CareerIntros/Enforcer_Intro.webm',
    221  cpConst.career_path_soldier_of_fortune: 'res:/video/AIRCareerProgram/CareerIntros/SOF_Intro.webm',
    222  cpConst.career_path_explorer: 'res:/video/AIRCareerProgram/CareerIntros/Exploration_Intro.webm',
    223  cpConst.career_path_industrialist: 'res:/video/AIRCareerProgram/CareerIntros/Industry_Intro.webm'}
    224 CIRCLE_ROTATION_BY_CAREER = {cpConst.career_path_none: 0,
    225  cpConst.career_path_enforcer: -45,
    226  cpConst.career_path_soldier_of_fortune: -45,
    227  cpConst.career_path_explorer: 45,
    228  cpConst.career_path_industrialist: 45}
    229 CAREER_DESCRIPTIONS = {cpConst.career_path_enforcer: 'UI/CareerPortal/EnforcerDescriptionShort',
    230  cpConst.career_path_explorer: 'UI/CareerPortal/ExplorerDescriptionShort',
    231  cpConst.career_path_industrialist: 'UI/CareerPortal/IndustrialistDescriptionShort',
    232  cpConst.career_path_soldier_of_fortune: 'UI/CareerPortal/SoldierDescriptionShort'}