def SkipBidDueToStructureRestrictions(self, bid, itemStationID): if util.IsStation(itemStationID) and util.IsStation(bid.stationID): return False inStructure = itemStationID and not util.IsStation(itemStationID) if inStructure and bid.stationID != itemStationID: return True return False
def OnMouseDown_thread(self): destinationID = self.destinationID if util.IsStation(destinationID ) and session.solarsystemid2 != self.solarSystemID: systemNeighbors = sm.GetService('map').GetNeighbors( self.solarSystemID) if session.solarsystemid2 in systemNeighbors: destinationID = self.solarSystemID if util.IsSolarSystem(destinationID): localStargate = uix.FindLocalStargate(destinationID) if localStargate: destinationID = localStargate.itemID typeID = localStargate.typeID else: typeID = const.typeSolarSystem elif util.IsStation(destinationID): station = sm.StartService('ui').GetStation(destinationID) typeID = station.stationTypeID else: structure = sm.GetService('structureDirectory').GetStructureInfo( destinationID) if structure is not None: typeID = structure.typeID sm.GetService('menu').TryExpandActionMenu(itemID=destinationID, clickedObject=self, typeID=typeID)
def OnItemChange(self, item, change): itemLocationIDs = [item.locationID] if const.ixLocationID in change: itemLocationIDs.append(change[const.ixLocationID]) wnd = self.GetWnd() if wnd and not wnd.destroyed: if change.keys() == [const.ixLocationID ] and change.values() == [0]: return if util.IsStation( item.locationID ) or const.ixLocationID in change and util.IsStation( change[const.ixLocationID]): key = wnd.sr.maintabs.GetSelectedArgs() if key is not None: if key[:7] == 'station': if util.IsSolarSystem( item.locationID ) and const.ixLocationID in change and change[ const.ixLocationID] == eve.session.stationid: return if eve.session.stationid in itemLocationIDs: wnd.sr.maintabs.ReloadVisible() elif key in ('allitems', 'regitems', 'conitems', 'sysitems'): uthread.new( wnd.UpdateLite, item.locationID, key, change.get(const.ixLocationID, item.locationID))
def Linkify(self, locationID, linkText): if util.IsRegion(locationID): locationTypeID = const.typeRegion elif util.IsConstellation(locationID): locationTypeID = const.typeConstellation elif util.IsSolarSystem(locationID): locationTypeID = const.typeSolarSystem else: if util.IsCelestial(locationID): warnText = "LOCALIZATION ERROR: 'linkify' argument used for a location of type celestial." warnText += " This is not supported. Please use the 'linkinfo' tag with arguments instead. locID:" localization.LogWarn(warnText, locationID) return linkText if util.IsStation(locationID): try: locationTypeID = cfg.stations.Get(locationID).stationTypeID except KeyError: return '[no station: %d]' % locationID else: localization.LogInfo( "LOCALIZATION LINK: The 'linkify' argument was used for a location whose type can not be identified.", locationID) return linkText return '<a href=showinfo:%d//%d>%s</a>' % (locationTypeID, locationID, linkText)
def IsItemIDLocked(self, itemID, locationID=None, typeID=None): stationID = None if locationID is not None: if eve.session.stationid: office = self.corp__locations.GetOffice() if office is not None: if locationID == office.itemID: stationID = eve.session.stationid if stationID is None: rows = self.corp__locations.GetMyCorporationsOffices( ).SelectByUniqueColumnValues('officeID', [locationID]) if rows and len(rows): for row in rows: if locationID == row.officeID and util.IsStation( row.locationID): stationID = row.locationID break if typeID is not None: if stationID is None and evetypes.GetCategoryID( typeID) == const.categoryStation: stationID = locationID if stationID is None: stationID = eve.session.stationid or eve.session.solarsystemid if stationID is not None: return self.GetLockedItemsByLocation(stationID).has_key(itemID) return 0
def OpenContainer(self): if self.rec.ownerID not in (eve.session.charid, eve.session.corpid): eve.Message('CantDoThatWithSomeoneElsesStuff') return wnd = uiutil.GetWindowAbove(self) if self.rec.typeID == const.typePlasticWrap: InventoryWindow.OpenOrShow(invID=('StationContainer', self.rec.itemID), openFromWnd=wnd) elif sm.StartService('menu').CheckSameLocation(self.rec): invID = ('StationContainer', self.rec.itemID) InventoryWindow.OpenOrShow(invID=invID, openFromWnd=wnd) else: location = self.rec.locationID if not session.stationid or util.IsStation( location) and location != session.stationid: log.LogInfo('Trying to open a container in', location, 'while actor is in', session.stationid) return inventory = sm.GetService('invCache').GetInventoryFromId(location) if not inventory: return item = inventory.GetItem() if not item: return category = getattr(item, 'categoryID', None) if category == const.categoryShip and item.locationID == session.stationid: InventoryWindow.OpenOrShow(invID=('StationContainer', self.rec.itemID), openFromWnd=wnd)
def FindButtonAction(self, itemID, solarsystemID, bookmark, *args): text = '' if solarsystemID != session.solarsystemid: text = localization.GetByLabel('UI/Inflight/SetDestination') funcAndArgs = (sm.StartService('starmap').SetWaypoint, itemID, True) icon = 'res:/UI/Texture/classes/LocationInfo/destination.png' elif util.IsStation(itemID): text = localization.GetByLabel('UI/Inflight/DockInStation') funcAndArgs = (sm.GetService('menu').Dock, itemID) icon = 'res:/ui/texture/icons/44_32_9.png' else: bp = sm.StartService('michelle').GetBallpark() ownBall = bp and bp.GetBall(session.shipid) or None dist = sm.GetService('menu').FindDist(0, bookmark, ownBall, bp) checkApproachDist = dist and dist < const.minWarpDistance if checkApproachDist: text = localization.GetByLabel('UI/Inflight/ApproachObject') funcAndArgs = (ApproachLocation, bookmark) icon = 'res:/ui/texture/icons/44_32_23.png' else: defaultWarpDist = sm.GetService( 'menu').GetDefaultActionDistance('WarpTo') text = localization.GetByLabel('UI/Inflight/WarpToBookmark') funcAndArgs = (WarpToBookmark, bookmark, defaultWarpDist) icon = 'res:/ui/texture/icons/44_32_18.png' return (text, funcAndArgs, icon)
def Startup(self, *etc): self.sr.originalChildren = [] listentry.Generic.Startup(self, *etc) self.sr.columns = [] self.sr.roleGroupings = sm.GetService('corp').GetRoleGroupings() for childControl in self.children: self.sr.originalChildren.append(childControl) self.sr.label.state = uiconst.UI_HIDDEN self.sr.loadingCharacterID = [] self.sr.lock = None self.sr.rowHeader = [ 'characterID', 'name', 'roles', 'oldRoles', 'grantableRoles', 'oldGrantableRoles', 'rolesAtHQ', 'oldRolesAtHQ', 'grantableRolesAtHQ', 'oldGrantableRolesAtHQ', 'rolesAtBase', 'oldRolesAtBase', 'grantableRolesAtBase', 'oldGrantableRolesAtBase', 'rolesAtOther', 'oldRolesAtOther', 'grantableRolesAtOther', 'oldGrantableRolesAtOther', 'baseID', 'oldBaseID', 'titleMask', 'oldTitleMask', 'isCEO', 'isDirector', 'IAmCEO', 'IAmDirector' ] self.sr.offices = sm.GetService('corp').GetMyCorporationsOffices() self.sr.offices.Fetch(0, len(self.sr.offices)) self.sr.bases = [('-', None)] rows = self.sr.offices if rows and len(rows): for row in rows: if util.IsStation(row.locationID): self.sr.bases.append( (cfg.evelocations.Get(row.locationID).locationName, row.locationID))
def GetParentLocationID(self, locationID): if util.IsSolarSystem(locationID): solarSystem = cfg.mapSystemCache.Get(locationID) return (const.locationUniverse, solarSystem.regionID, solarSystem.constellationID, locationID, None) if util.IsConstellation(locationID): constellation = cfg.mapConstellationCache.Get(locationID) return (const.locationUniverse, constellation.regionID, locationID, None, None) if util.IsRegion(locationID): return (const.locationUniverse, locationID, None, None, None) if util.IsCelestial(locationID): solarSystemID = cfg.mapCelestialLocationCache[locationID] solarSystem = cfg.mapSystemCache.Get(solarSystemID) return (const.locationUniverse, solarSystem.regionID, solarSystem.constellationID, solarSystemID, locationID) if util.IsStation(locationID): station = cfg.stations.Get(locationID) ssID = station.solarSystemID solarSystem = cfg.mapSystemCache.Get(ssID) return (const.locationUniverse, solarSystem.regionID, solarSystem.constellationID, ssID, locationID) ssID = cfg.evelocations.Get(locationID).solarSystemID if ssID is None: structureInfo = sm.GetService( 'structureDirectory').GetStructureInfo(locationID) if structureInfo is not None: ssID = structureInfo.solarSystemID if ssID is not None: mapData = cfg.mapSystemCache.Get(ssID) return (const.locationUniverse, mapData.regionID, mapData.constellationID, ssID, locationID) return (const.locationUniverse, None, None, None, locationID)
def IsStationInaccessible(self, stationID): if stationID is None: return False if util.IsStation(stationID): station = sm.GetService('ui').GetStation(stationID) isPlayerOwnable = sm.GetService('godma').GetType( station.stationTypeID).isPlayerOwnable if isPlayerOwnable: if station.ownerID == session.corpid or stationID == session.stationid: return False corpStationMgr = moniker.GetCorpStationManagerEx(stationID) try: corpStationMgr.DoStandingCheckForStationService( const.stationServiceDocking) except UserError: return True else: structure = sm.GetService('structureDirectory').GetStructureInfo( stationID) if structure: if stationID == session.structureid: return False if sm.GetService('structureSettings').CharacterHasService( stationID, structures.SERVICE_DOCKING): return False return True return False
def GetWorldSpaceTypeIDFromWorldSpaceID(self, worldSpaceID): """ Look in our instance allocation to see what world space this instance corresponds to. """ if util.IsStation(worldSpaceID): stationType = cfg.invtypes.Get(eve.stationItem.stationTypeID) stationRace = stationType['raceID'] configVals = sm.GetService('machoNet').GetGlobalConfig() if stationRace == const.raceCaldari: if configVals.get('CaldariCQEnabled', '1') == '1': return const.typeCaldariCaptainsQuarters else: if stationRace == const.raceMinmatar: return const.typeMinmatarCaptainsQuarters if stationRace == const.raceAmarr: if configVals.get('AmarrCQEnabled', '1') == '1': return const.typeAmarrCaptainsQuarters elif stationRace == const.raceGallente: if configVals.get('GallenteCQEnabled', '1') == '1': return const.typeGallenteCaptainsQuarters elif stationRace == const.raceJove: if configVals.get('GallenteCQEnabled', '1') == '1': return const.typeGallenteCaptainsQuarters return const.typeMinmatarCaptainsQuarters return sm.RemoteSvc('worldSpaceServer').GetWorldSpaceTypeIDFromWorldSpaceID(worldSpaceID)
def MatchLocation(job, locationID=None, flagID=None): """ In the time between installing a job and completing it, the output location could have been moved or destroyed. This method will try to find the best location that is still valid and doesn't break any corporate security rules. """ for location in job.locations: if location.flagID == flagID and location.itemID == locationID: return copy.copy(location) for location in job.locations: if location.flagID == flagID and location.ownerID == job.ownerID: return copy.copy(location) if locationID and util.IsCorporation(job.ownerID) and util.IsStation( job.facility.facilityID): return industry.Location(itemID=job.facility.facilityID, ownerID=job.ownerID, flagID=const.flagHangar, typeID=cfg.stations.Get( job.facility.facilityID).stationTypeID) try: return copy.copy(job.locations[0]) except IndexError: return None
def GodmaItemChanged(self, item, change): if item.itemID == session.charid: return if self.dogmaLocation is not None: shipID = self.dogmaLocation.shipID if item.locationID in (shipID, session.charid): self.dogmaLocation.OnItemChange(item, change) elif change.get(const.ixLocationID, None) in (shipID, session.charid): self.dogmaLocation.OnItemChange(item, change) elif item.itemID == shipID and session.stationid2 is not None: if item.locationID != session.stationid or item.flagID != const.flagHangar: if util.IsWorldSpace( item.locationID) or util.IsSolarSystem( item.locationID): self.LogInfo( 'ActiveShip moved as we are undocking. Ignoring') elif util.IsStation( item.locationID ) and item.flagID == const.flagHangar and item.ownerID == session.charid: self.LogInfo( "Active ship moved stations but is still in it's hangar", item, change, session.stationid) else: sm.GetService('station').TryLeaveShip(item) self.dogmaLocation.UnboardShip(session.charid) self.LogError('Our active ship got moved', item, change)
def LoadView(self, change=None, **kwargs): """ Called when the view is loaded """ settings.user.ui.Set('defaultDockingView', 'station') self.activeShip = None self.activeshipmodel = None self.hangarScene = None self.stationID = None self.loadingBackground = uiprimitives.Container( name='loadingBackground', bgColor=util.Color.BLACK, state=uiconst.UI_HIDDEN) height = uicore.desktop.height width = 1.6 * height uiprimitives.Sprite( name='aura', parent=self.loadingBackground, texturePath= 'res:/UI/Texture/Classes/CQLoadingScreen/IncarnaDisabled.png', align=uiconst.CENTER, width=width, height=height) self.loadingBackground.Show() self.loadingBackground.opacity = 1.0 oldWorldSpaceID = newWorldSpaceID = session.worldspaceid if 'worldspaceid' in change: oldWorldSpaceID, newWorldSpaceID = change['worldspaceid'] changes = change.copy() if 'stationid' not in changes: changes['stationid'] = (None, newWorldSpaceID) factory = sm.GetService('paperDollClient').dollFactory factory.compressTextures = True factory.allowTextureCache = True clothSimulation = sm.GetService('device').GetAppFeatureState( 'Interior.clothSimulation', False) factory.clothSimulationActive = clothSimulation scene = self.entityClient.LoadEntitySceneAndBlock(newWorldSpaceID) scene.WaitOnStartupEntities() if self.entityClient.IsClientSideOnly(newWorldSpaceID): if self.cachedPlayerPos is None or self.cachedPlayerRot is None: self.entitySpawnClient.SpawnClientOnlyPlayer(scene, changes) else: self.clientOnlyPlayerSpawnClient.SpawnClientSidePlayer( scene, self.cachedPlayerPos, self.cachedPlayerRot) if self.cachedCameraYaw is not None and self.cachedCameraPitch is not None and self.cachedCameraZoom is not None: self.cameraClient.RegisterCameraStartupInfo( self.cachedCameraYaw, self.cachedCameraPitch, self.cachedCameraZoom) self.cachedPlayerPos = None self.cachedPlayerRot = None self.cachedPlayerYaw = None self.cachedPlayerPitch = None self.cachedPlayerZoom = None if util.IsStation(session.stationid): self._GoStation(changes) self.loading.ProgressWnd() self.loadingBackground.Hide() self.loadingBackground.Flush()
def OnClick(self, *args): if util.IsSolarSystem(self.destinationID): sm.GetService('info').ShowInfo(const.typeSolarSystem, self.destinationID) elif util.IsStation(self.destinationID): station = sm.StartService('ui').GetStation(self.destinationID) sm.GetService('info').ShowInfo(station.stationTypeID, self.destinationID)
def GetMenu(self, *args): if util.IsSolarSystem(self.destinationID): return sm.GetService('menu').GetMenuFormItemIDTypeID( self.destinationID, const.typeSolarSystem) if util.IsStation(self.destinationID): station = sm.StartService('ui').GetStation(self.destinationID) return sm.GetService('menu').GetMenuFormItemIDTypeID( self.destinationID, station.stationTypeID)
def GetSolarSystemForMarketLocation(self, stationID): if util.IsStation(stationID): station = sm.GetService('ui').GetStation(stationID) return station.solarSystemID else: structureInfo = sm.GetService( 'structureDirectory').GetStructureInfo(stationID) return structureInfo.solarSystemID
def GetHint(self, *args): ret = sm.GetService('infoPanel').GetSolarSystemTrace( self.destinationID, traceFontSize=None) if not util.IsSolarSystem(self.destinationID): if util.IsStation(self.destinationID) or sm.GetService( 'structureDirectory').GetStructureInfo(self.destinationID): ret += '<br>' + cfg.evelocations.Get(self.destinationID).name return ret
def UnrentOffice(self, stationID): if eve.Message('crpUnrentOffice', {}, uiconst.YESNO) != uiconst.ID_YES: return if util.IsStation(stationID): corpStationMgr = moniker.GetCorpStationManagerEx(stationID) corpStationMgr.CancelRentOfOffice() else: sm.GetService('structureOffices').UnrentOffice(stationID)
def GetStationOrStructureTypeID(self, destinationID): if util.IsStation(self.destinationID): station = sm.StartService('ui').GetStation(self.destinationID) return station.stationTypeID structureInfo = sm.GetService('structureDirectory').GetStructureInfo( self.destinationID) if structureInfo: return structureInfo.typeID
def GetItem(self, itemID, retall=False): if util.IsStation(itemID): station = cfg.stations.Get(itemID) return util.KeyVal(itemID=itemID, locationID=station.solarSystemID, itemName=cfg.evelocations.Get(itemID).name, typeID=station.stationTypeID, groupID=const.groupStation, x=station.x, y=station.y, z=station.z) if util.IsSolarSystem(itemID): solarSystem = cfg.mapSystemCache.Get(itemID) return util.KeyVal( itemID=itemID, locationID=solarSystem.constellationID, itemName=cfg.evelocations.Get(itemID).name, typeID=const.typeSolarSystem, groupID=const.groupSolarSystem, factionID=getattr(solarSystem, 'factionID', None), neighbours=[i.solarSystemID for i in solarSystem.neighbours], x=solarSystem.center.x, y=solarSystem.center.y, z=solarSystem.center.z, security=solarSystem.securityStatus) if util.IsConstellation(itemID): constellation = cfg.mapConstellationCache.Get(itemID) return util.KeyVal(itemID=itemID, locationID=constellation.regionID, itemName=cfg.evelocations.Get(itemID).name, typeID=const.typeConstellation, neighbours=list(constellation.neighbours), groupID=const.groupConstellation, x=constellation.center.x, y=constellation.center.y, z=constellation.center.z) if util.IsRegion(itemID): region = cfg.mapRegionCache.Get(itemID) return util.KeyVal(itemID=itemID, locationID=const.locationUniverse, itemName=cfg.evelocations.Get(itemID).name, neighbours=list(region.neighbours), typeID=const.typeRegion, groupID=const.groupRegion, x=region.center.x, y=region.center.y, z=region.center.z) if util.IsCelestial(itemID): solarSystemID = cfg.mapCelestialLocationCache[itemID] typeID, pos = self._GetCelestialsTypeIdAndPosition( itemID, solarSystemID) return util.KeyVal(itemID=itemID, locationID=solarSystemID, itemName=cfg.evelocations.Get(itemID).name, typeID=typeID, x=pos[0], y=pos[1], z=pos[2])
def GetSolarSystemIDForStationOrStructure(self, stationID): if util.IsStation(stationID): return sm.GetService('ui').GetStation(stationID).solarSystemID else: structureInfo = sm.GetService( 'structureDirectory').GetStructureInfo(stationID) if structureInfo is not None: return structureInfo.solarSystemID return
def SanitizedDestinationID(destinationID): try: destinationID = int(destinationID) except: log.LogError('Unable to convert destinationID into an integer!') return None if util.IsSolarSystem(destinationID) or util.IsStation(destinationID): return destinationID
def GetSubContent(self, nodedata, *args): which = FLAG_TO_FLAGNAME[nodedata.flag] items = sm.RemoteSvc('corpmgr').GetAssetInventoryForLocation(eve.session.corpid, nodedata.locationID, which) scrolllist = [] if len(items) == 0: label = localization.GetByLabel('/Carbon/UI/Controls/Common/NoItem') if nodedata.flag == FLAG_OFFICES: label = localization.GetByLabel('UI/Corporations/Assets/UnusedCorpOffice') return [listentry.Get('Generic', {'label': label, 'sublevel': nodedata.Get('sublevel', 0) + 1})] items.header.virtual = items.header.virtual + [('groupID', lambda row: evetypes.GetGroupID(row.typeID)), ('categoryID', lambda row: evetypes.GetCategoryID(row.typeID))] searchCondition = nodedata.Get('searchCondition', None) if which == FLAGNAME_OFFICES and searchCondition is None: divisionNames = sm.GetService('corp').GetDivisionNames() if util.IsStation(nodedata.locationID): divisionIdFromHangarFlag = {const.flagHangar: 1} else: divisionIdFromHangarFlag = {const.flagCorpSAG1: 1} divisionIdFromHangarFlag.update({const.flagCorpSAG2: 2, const.flagCorpSAG3: 3, const.flagCorpSAG4: 4, const.flagCorpSAG5: 5, const.flagCorpSAG6: 6, const.flagCorpSAG7: 7}) for flag, divisionNumber in divisionIdFromHangarFlag.iteritems(): label = divisionNames[divisionNumber] data = {'GetSubContent': self.GetSubContentDivision, 'label': label, 'groupItems': None, 'flag': flag, 'id': ('corpofficeassets', (nodedata.locationID, flag)), 'tabs': [], 'state': 'locked', 'locationID': nodedata.locationID, 'showicon': 'hide', 'sublevel': nodedata.Get('sublevel', 0) + 1, 'viewMode': self.sr.viewMode, 'scrollID': nodedata.scrollID} scrolllist.append(listentry.Get('Group', data)) uicore.registry.SetListGroupOpenState(('corpofficeassets', (nodedata.locationID, flag)), 0) else: if nodedata.flag in (FLAG_OFFICES, FLAG_JUNK): sm.GetService('corp').GetLockedItemsByLocation(nodedata.locationID) for each in items: if searchCondition is not None: if searchCondition.typeID is not None and searchCondition.typeID != each.typeID or searchCondition.groupID is not None and searchCondition.groupID != each.groupID or searchCondition.categoryID is not None and searchCondition.categoryID != each.categoryID or searchCondition.qty > each.stacksize: continue data = uix.GetItemData(each, self.sr.viewMode, viewOnly=1, scrollID=nodedata.scrollID) data.id = each.itemID data.remote = True if nodedata.flag in (FLAG_OFFICES, FLAG_JUNK) and each.categoryID == const.categoryBlueprint: data.locked = sm.GetService('corp').IsItemLocked(each) scrolllist.append(listentry.Get('InvItem', data=data)) return scrolllist
def GetWaypointPath(self, waypoints): if len(waypoints) < 2: raise AttributeError, 'There should be at least two waypoints' fromID = waypoints[0] path = [] for toID in waypoints[1:]: if util.IsStation(fromID): path.append(cfg.stations.Get(fromID).solarSystemID) path.append(fromID) segment = self.GetPathBetween(fromID, toID) if segment is None: return [] path += segment[:-1] fromID = toID if util.IsStation(toID): path.append(cfg.stations.Get(toID).solarSystemID) path.append(toID) return path
def ConvertStationIDToSolarSystemIDIfNecessary(waypointID): if util.IsStation(waypointID): return cfg.stations.Get(waypointID).solarSystemID if util.IsSolarSystem(waypointID): return waypointID structure = sm.GetService('structureDirectory').GetStructureInfo( waypointID) if structure is not None: return structure.solarSystemID return waypointID
def GetFacilityName(facilityID, typeID = None, solarSystemID = None): name = cfg.evelocations.Get(facilityID).name if not name and typeID: name = cfg.invtypes.Get(typeID).name if not util.IsStation(facilityID) and solarSystemID: if name: name = localization.GetByLabel('UI/Industry/LocationAndFacility', locationName=cfg.evelocations.Get(solarSystemID).name, facilityName=name) else: name = cfg.evelocations.Get(solarSystemID).name return name
def GetBaseOptions(self): offices = self.corpSvc.GetMyCorporationsOffices() offices.Fetch(0, len(offices)) bases = [('-', None)] if offices: for office in offices: if util.IsStation(office.locationID): bases.append((cfg.evelocations.Get(office.locationID).locationName, office.locationID)) return bases
def GetLocationText(self, solarSystemID, regionID, stationID=None): solarSystemName = cfg.evelocations.Get(solarSystemID).name dot = sm.GetService('contracts').GetSystemSecurityDot(solarSystemID) txt = '%s %s' % (dot, solarSystemName) if stationID and not util.IsStation(stationID): txt += '<color=0xffff6666> <!> </color>' if regionID and regionID != session.regionid: txt += '<br><color=0xffff6666> %s</color>' % cfg.evelocations.Get( regionID).name return txt
def IsItemLocked(self, item): itemID = item.itemID if not util.IsCorporation(item.ownerID): return 0 if util.IsStation(item.locationID): if item.flagID == const.flagCorpMarket: roles = const.corpRoleAccountant | const.corpRoleTrader if eve.session.corprole & roles != 0: return 0 return 1 return self.IsItemIDLocked(itemID, item.locationID, item.typeID)