KoSoVsKy2013 1 Posted January 7, 2022 (edited) Подскажите, пожалуйста, как получить список танков после входа в ангар? Пробовал вот так, from gui.Scaleform.daapi.view.lobby.storage.inhangar import StorageCarouselDataProvider print StorageCarouselDataProvider.sortedCollection Но вывод показывает <property object at 0x3A59FB10> Возможно StorageCarouselDataProvider не инициализирован, но где-то же должен храниться список в реалтайме, а где понять не могу( Edited January 7, 2022 by KoSoVsKy2013 Share this post Link to post Short link Share on other sites
baka01998 4 #513891 Posted January 7, 2022 from skeletons.gui.shared import IItemsCache from helpers import dependency from gui.Scaleform.daapi.view.common.vehicle_carousel.carousel_environment import CarouselEnvironment class Test: _itemsCache = dependency.descriptor(IItemsCache) dp = None def some(self): print(self._itemsCache.items.inventory.getIventoryVehiclesCDs()) print(self.dp._getCurrentVehicles()) print(self.dp._vehicles) t = Test() @g_overrideLib_main.overrideMethod(CarouselEnvironment, '_populate') def CarouselEnvironment_populate(base, self): print('CarouselEnvironment_populate') base(self) t.dp = self._carouselDP *** [3089, 3329, 577, 5201, 113, 1329, 609, 129, 161, 1169, 51489, 23041, 1025, 46097, 769, 16385, 34593] *** [Vehicle<id:17, intCD:16385, nation:0, lock:(0, 0)>, Vehicle<id:12, intCD:51489, nation:2, lock:(0, 0)>, Vehicle<id:13, intCD:23041, nation:0, lock:(0, 0)>, Vehicle<id:14, intCD:1025, nation:0, lock:(0, 0)>, Vehicle<id:16, intCD:769, nation:0, lock:(0, 0)>] *** [Vehicle<id:4, intCD:577, nation:4, lock:(0, 0)>, Vehicle<id:15, intCD:46097, nation:1, lock:(0, 0)>, Vehicle<id:6, intCD:113, nation:7, lock:(0, 0)>, Vehicle<id:17, intCD:16385, nation:0, lock:(0, 0)>, Vehicle<id:5, intCD:5201, nation:5, lock:(0, 0)>, Vehicle<id:7, intCD:1329, nation:3, lock:(0, 0)>, Vehicle<id:9, intCD:129, nation:8, lock:(0, 0)>, Vehicle<id:10, intCD:161, nation:10, lock:(0, 0)>, Vehicle<id:11, intCD:1169, nation:9, lock:(0, 0)>, Vehicle<id:2, intCD:3329, nation:0, lock:(0, 0)>, Vehicle<id:12, intCD:51489, nation:2, lock:(0, 0)>, Vehicle<id:1, intCD:3089, nation:1, lock:(0, 0)>, Vehicle<id:13, intCD:23041, nation:0, lock:(0, 0)>, Vehicle<id:14, intCD:1025, nation:0, lock:(0, 0)>, Vehicle<id:8, intCD:609, nation:6, lock:(0, 0)>, Vehicle<id:16, intCD:769, nation:0, lock:(0, 0)>, Vehicle<id:18, intCD:34593, nation:2, lock:(0, 0)>] _getCurrentVehicles вернет то что нужно 1 Share this post Link to post Short link Share on other sites
KoSoVsKy2013 1 #513892 Posted January 7, 2022 @baka01998 Спасибо за ответ, как раз писал, что разобрался, мое решение примерно такое: from skeletons.gui.shared import IItemsCache itemsCache = dependency.instance(IItemsCache) print itemsCache.items.getVehicles(REQ_CRITERIA.INVENTORY) 1 Share this post Link to post Short link Share on other sites