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

standings.py (1057B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\behaviors\utility\standings.py
      2 from behaviors.utility.blackboards import get_response_thresholds
      3 from behaviors.utility.owner import get_owner_id
      4 from npcs.common.standings import classify_standings
      5 from npcs.server.standings import get_standings_from_npc_to_item
      6 
      7 def get_standings_between(task, to_id):
      8     return get_standings_from_npc_to_item(_get_standing_manager(task), get_owner_id(task), to_id)
      9 
     10 
     11 def classify_standings_between(task, to_id):
     12     standing_thresholds = get_response_thresholds(task)
     13     return classify_standings(standing_thresholds.hostile_response_threshold, standing_thresholds.friendly_response_threshold, get_standings_between(task, to_id))
     14 
     15 
     16 def _get_standing_manager(task):
     17     return task.context.ballpark.broker.standingMgr
     18 
     19 
     20 def is_hostile_towards(task, to_id):
     21     standing_thresholds = get_response_thresholds(task)
     22     standings = get_standings_between(task, to_id)
     23     return standings < standing_thresholds.hostile_response_threshold