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

chargeDogmaItem.py (1578B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\dogma\items\chargeDogmaItem.py
      2 from dogma.const import attributeQuantity
      3 from dogma.items.fittableDogmaItem import FittableDogmaItem
      4 from eve.common.lib import appConst as const
      5 
      6 class ChargeDogmaItem(FittableDogmaItem):
      7 
      8     def GetOtherID(self):
      9         if self.location:
     10             otherID = self.dogmaLocation.GetSlotOther(self.location.itemID, self.flagID)
     11             if otherID is None and self.dogmaLocation.IsItemSubLocation(self.itemID):
     12                 otherID = self.location.itemID
     13             return otherID
     14 
     15     def IsValidFittingLocation(self, location):
     16         return location.categoryID in (const.categoryShip, const.categoryStarbase, const.categoryStructure)
     17 
     18     def IsOwnerModifiable(self):
     19         if not self.location:
     20             return False
     21         pilotID = self.location.GetPilot()
     22         if not pilotID:
     23             return False
     24         shipID = self.locationID
     25         if not shipID:
     26             return False
     27         if self.dogmaLocation.IsItemSubLocation(self.itemID):
     28             if shipID == self.dogmaLocation.shipsByPilotID.get(pilotID, None):
     29                 return True
     30         return False
     31 
     32     def GetStructureID(self):
     33         pilotID = self.GetPilot()
     34         shipID = self.dogmaLocation.shipsByPilotID.get(pilotID, None)
     35         return self.dogmaLocation.GetStructureIdForEnvironment(shipID)
     36 
     37     def GetCharacterID(self):
     38         return self.GetPilot()
     39 
     40     def GetQuantity(self):
     41         return self.attributes[attributeQuantity].GetBaseValue()