Exemplo n.º 1
0
def GetSkintypeColor(skintypePath, isMale):
    if isMale:
        basePath = pdDef.MALE_BASE_PATH
    else:
        basePath = pdDef.FEMALE_BASE_PATH
    if skintypePath.startswith('/'):
        fmt = '{0}{1}'
    else:
        fmt = '{0}/{1}'
    completePath = fmt.format(basePath, skintypePath)
    skintypeData = ReadYamlFile(completePath)
    if skintypeData is None:
        return
    return skintypeData[2]
def GetSkintypeColor(skintypePath, isMale):
    """
    Return skintype colorVariation for resource path. I.e. c0 to c14
    """
    if isMale:
        basePath = pdDef.MALE_BASE_PATH
    else:
        basePath = pdDef.FEMALE_BASE_PATH
    if skintypePath.startswith('/'):
        fmt = '{0}{1}'
    else:
        fmt = '{0}/{1}'
    completePath = fmt.format(basePath, skintypePath)
    skintypeData = ReadYamlFile(completePath)
    if skintypeData is None:
        return
    return skintypeData[2]
Exemplo n.º 3
0
def _LoadDeviceClassifications():
    result = ReadYamlFile('res:/videoCardCategories.yaml')
    if result is None:
        result = {'high': {}, 'medium': {}, 'low': {}}
    return result
Exemplo n.º 4
0
    def LoadHangarBackground(self):
        stationRace = evetypes.GetRaceID(eve.stationItem.stationTypeID)
        stationGraphicsID = hangarUtil.racialHangarScenes[8]
        if stationRace in hangarUtil.racialHangarScenes:
            stationGraphicsID = hangarUtil.racialHangarScenes[stationRace]
        scenePath = GetGraphicFile(stationGraphicsID)
        if stationRace == const.raceAmarr:
            shipPositionData = ReadYamlFile(
                'res:/dx9/scene/hangar/shipPlacementAmarr.yaml')
            positioning = ReadYamlFile(
                'res:/dx9/scene/hangar/amarrbalconyplacement.yaml')
            self.sceneTranslation = positioning['position']
            self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
                positioning['orientation'], 0.0, 0.0)
        elif stationRace == const.raceCaldari:
            shipPositionData = ReadYamlFile(
                'res:/dx9/scene/hangar/shipPlacementCaldari.yaml')
            positioning = ReadYamlFile(
                'res:/dx9/scene/hangar/caldaribalconyplacement.yaml')
            self.sceneTranslation = positioning['position']
            self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
                positioning['orientation'], 0.0, 0.0)
        elif stationRace == const.raceGallente:
            shipPositionData = ReadYamlFile(
                'res:/dx9/scene/hangar/shipPlacementGallente.yaml')
            positioning = ReadYamlFile(
                'res:/dx9/scene/hangar/gallentebalconyplacement.yaml')
            self.sceneTranslation = positioning['position']
            self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
                positioning['orientation'], 0.0, 0.0)
        elif stationRace == const.raceMinmatar:
            shipPositionData = ReadYamlFile(
                'res:/dx9/scene/hangar/shipPlacementMinmatar.yaml')
            positioning = ReadYamlFile(
                'res:/dx9/scene/hangar/minmatarbalconyplacement.yaml')
            self.sceneTranslation = positioning['position']
            self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
                positioning['orientation'], 0.0, 0.0)
        else:
            shipPositionData = ReadYamlFile(
                'res:/dx9/scene/hangar/shipPlacementGallente.yaml')
            positioning = ReadYamlFile(
                'res:/dx9/scene/hangar/gallentebalconyplacement.yaml')
            self.sceneTranslation = positioning['position']
            self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
                positioning['orientation'], 0.0, 0.0)
        self.hangarScene = blue.resMan.LoadObject(scenePath)
        hangarMeshes = self.hangarScene.Find('trinity.EveStation2')
        for hangarMesh in hangarMeshes:
            if hangarMesh.planeSets is not None:
                hangarMesh.planeSets.removeAt(-1)

        self.hangarTraffic.SetupScene(self.hangarScene)
        self.hangarTraffic.RemoveAudio(self.hangarScene)
        self.sceneManager.SetupIncarnaBackground(self.hangarScene,
                                                 self.sceneTranslation,
                                                 self.sceneRotation)
        self.shipPositionMinDistance = shipPositionData['minDistance']
        self.shipPositionMaxDistance = shipPositionData['maxDistance']
        self.shipPositionMaxSize = shipPositionData['shipMaxSize']
        self.shipPositionMinSize = shipPositionData['shipMinSize']
        self.shipPositionTargetHeightMin = shipPositionData[
            'shipTargetHeightMin']
        self.shipPositionTargetHeightMax = shipPositionData[
            'shipTargetHeightMax']
        self.shipPositionCurveRoot = shipPositionData['curveRoot']
        self.shipPositionRotation = shipPositionData['rotation']
        if self.hangarScene is not None:
            stationModel = self.hangarScene.objects[0]
            stationModel.enableShadow = False
Exemplo n.º 5
0
 def LoadHangarBackground(self):
     stationTypeID = eve.stationItem.stationTypeID
     stationType = cfg.invtypes.Get(stationTypeID)
     stationRace = stationType['raceID']
     if stationRace == const.raceAmarr:
         scenePath = 'res:/dx9/model/hangar/amarr/ah1/ah1_fis.red'
         shipPositionData = ReadYamlFile(
             'res:/dx9/scene/hangar/shipPlacementAmarr.yaml')
         positioning = ReadYamlFile(
             'res:/dx9/scene/hangar/amarrbalconyplacement.yaml')
         self.sceneTranslation = positioning['position']
         self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
             positioning['orientation'], 0.0, 0.0)
     elif stationRace == const.raceCaldari:
         scenePath = 'res:/dx9/model/hangar/caldari/ch1/ch1_fis.red'
         shipPositionData = ReadYamlFile(
             'res:/dx9/scene/hangar/shipPlacementCaldari.yaml')
         positioning = ReadYamlFile(
             'res:/dx9/scene/hangar/caldaribalconyplacement.yaml')
         self.sceneTranslation = positioning['position']
         self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
             positioning['orientation'], 0.0, 0.0)
     elif stationRace == const.raceGallente:
         scenePath = 'res:/dx9/model/hangar/gallente/gh1/gh1_fis.red'
         shipPositionData = ReadYamlFile(
             'res:/dx9/scene/hangar/shipPlacementGallente.yaml')
         positioning = ReadYamlFile(
             'res:/dx9/scene/hangar/gallentebalconyplacement.yaml')
         self.sceneTranslation = positioning['position']
         self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
             positioning['orientation'], 0.0, 0.0)
     elif stationRace == const.raceMinmatar:
         scenePath = 'res:/dx9/model/hangar/minmatar/mh1/mh1_fis.red'
         shipPositionData = ReadYamlFile(
             'res:/dx9/scene/hangar/shipPlacementMinmatar.yaml')
         positioning = ReadYamlFile(
             'res:/dx9/scene/hangar/minmatarbalconyplacement.yaml')
         self.sceneTranslation = positioning['position']
         self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
             positioning['orientation'], 0.0, 0.0)
     else:
         scenePath = 'res:/dx9/model/hangar/gallente/gh1/gh1_fis.red'
         shipPositionData = ReadYamlFile(
             'res:/dx9/scene/hangar/shipPlacementGallente.yaml')
         positioning = ReadYamlFile(
             'res:/dx9/scene/hangar/gallentebalconyplacement.yaml')
         self.sceneTranslation = positioning['position']
         self.sceneRotation = geo2.QuaternionRotationSetYawPitchRoll(
             positioning['orientation'], 0.0, 0.0)
     self.hangarScene = blue.resMan.LoadObject(scenePath)
     self.sceneManager.SetupIncarnaBackground(self.hangarScene,
                                              self.sceneTranslation,
                                              self.sceneRotation)
     self.shipPositionMinDistance = shipPositionData['minDistance']
     self.shipPositionMaxDistance = shipPositionData['maxDistance']
     self.shipPositionMaxSize = shipPositionData['shipMaxSize']
     self.shipPositionMinSize = shipPositionData['shipMinSize']
     self.shipPositionTargetHeightMin = shipPositionData[
         'shipTargetHeightMin']
     self.shipPositionTargetHeightMax = shipPositionData[
         'shipTargetHeightMax']
     self.shipPositionCurveRoot = shipPositionData['curveRoot']
     self.shipPositionRotation = shipPositionData['rotation']
     if self.hangarScene is not None:
         stationModel = self.hangarScene.objects[0]
         stationModel.enableShadow = False