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

__init__.py (739B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\crate\view\__init__.py
      2 from .fixed import FixedView, FixedViewForRandomizedLoot
      3 from .hacking import HackingView
      4 LOOT_PRESENTATION_TO_VIEW_CLASS = {'fixed': FixedView,
      5  'hacking': HackingView}
      6 
      7 def _GetViewClass(controller):
      8     amountOfLoot = len(controller.loot + controller.specialLoot)
      9     presentation = controller.staticData.lootPresentationType
     10     if presentation == 'hacking' and amountOfLoot > 8:
     11         return FixedViewForRandomizedLoot
     12     return LOOT_PRESENTATION_TO_VIEW_CLASS[presentation]
     13 
     14 
     15 def CreateView(controller, **kwargs):
     16     viewClass = _GetViewClass(controller)
     17     return viewClass(controller=controller, **kwargs)