structure.py (898B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\behaviors\utility\structure.py 2 from behaviors.utility.groups import get_my_entity_group_owner_id 3 from inventorycommon.const import categoryStructure 4 from npcs.npccorporations import get_corporation_faction_id 5 from structures import SETTING_HOUSING_CAN_DOCK 6 7 def get_structure_profiles(): 8 return sm.GetService('structureProfiles') 9 10 11 def can_dock_at_structure(task, structure_id): 12 corporation_id = get_my_entity_group_owner_id(task) 13 alliance_id = get_corporation_faction_id(corporation_id) 14 structure_profiles = get_structure_profiles() 15 value = structure_profiles.GetSettingValueForCharacter(corporation_id, structure_id, SETTING_HOUSING_CAN_DOCK, corporation_id, alliance_id, None) 16 return value is not None 17 18 19 def is_structure(slim_item): 20 return slim_item.categoryID == categoryStructure