map.py (765B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\behaviors\actions\map.py 2 from behaviors.tasks import Task 3 from bluepy import TimedFunction 4 5 class GetSolarSystemFactionID(Task): 6 7 @TimedFunction('behaviors::actions::map::GetSolarSystemFactionID::OnEnter') 8 def OnEnter(self): 9 faction_id = self.GetFactionIdBySolarSystemContextValue() 10 if faction_id: 11 self.SendBlackboardValue(self.attributes.messageAddress, faction_id) 12 self.SetStatusToSuccess() 13 else: 14 self.SetStatusToFailed() 15 16 def GetFactionIdBySolarSystemContextValue(self): 17 solarSystem = cfg.mapSystemCache.get(self.context.solarSystemId, None) 18 return getattr(solarSystem, 'factionID', None)