oreAnomalySystemContentPiece.py (1579B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\agencyNew\contentPieces\oreAnomalySystemContentPiece.py 2 from eve.client.script.ui.shared.agencyNew.contentPieces.baseContentPiece import BaseContentPiece 3 from eve.client.script.ui.shared.agencyNew.contentPieces.oreAnomalyContentPiece import OreAnomalyContentPiece 4 from eve.client.script.ui.shared.agencyNew.contentPieces.siteSystemContentPiece import SiteSystemContentPiece 5 from eve.common.lib import appConst 6 from evedungeons.client.oreTypesInDungeons.util import get_consolidated_ore_types 7 from localization import GetByLabel 8 9 class OreAnomalySystemContentPiece(SiteSystemContentPiece): 10 archetypeID = appConst.dunArchetypeOreAnomaly 11 12 def __init__(self, dungeonInstances, resourceTypeIDs, *args, **kwargs): 13 super(OreAnomalySystemContentPiece, self).__init__(dungeonInstances, *args, **kwargs) 14 self.resourceTypeIDs = resourceTypeIDs 15 16 def GetResourceTypeIDs(self): 17 return get_consolidated_ore_types(self.resourceTypeIDs) 18 19 def _ConstructSiteContentPiece(self, site): 20 if site: 21 return OreAnomalyContentPiece(solarSystemID=self.solarSystemID, enemyOwnerID=site.factionID, itemID=site.siteID, locationID=site.siteID, site=site, dungeonNameID=site.dungeonNameID, position=site.position) 22 else: 23 return UnknownOreAnomalyContentPiece(solarSystemID=self.solarSystemID) 24 25 26 class UnknownOreAnomalyContentPiece(BaseContentPiece): 27 28 def GetName(self): 29 return GetByLabel('UI/Agency/UnknownOreAnomaly')