Jump to content
Korean Random
Sign in to follow this  
sl101

А как сейчас (в 0.9.15.1) получить список танков светящихся на миникарте?

Recommended Posts

Раньше было просто: g_AppLoader.getDefBattleApp().minimap._Minimap__entries

Сейчас до миникарты добрался: g_appLoader.getDefBattleApp().containerManager.getContainer(ViewTypes.VIEW).getView().components[bATTLE_VIEW_ALIASES.MINIMAP]

но как добыть список vehicleIDов - не понимаю, нет его там теперь.

 

Share this post


Link to post

Short link
Share on other sites


from gui.app_loader import g_appLoader
from gui.Scaleform.genConsts.BATTLE_VIEW_ALIASES import BATTLE_VIEW_ALIASES
from gui.Scaleform.framework import ViewTypes

app = g_appLoader.getDefBattleApp()
view = app.containerManager.getContainer(ViewTypes.VIEW).getView()
minimap = view.components[BATTLE_VIEW_ALIASES.MINIMAP]
vehicles_plugin = minimap.getPlugin('vehicles')
entries = vehicles_plugin._entries # dict of vid : gui.Scaleform.daapi.view.battle.shared.minimap.entries.VehicleEntry
entries_on_minimap = {vid: v_entry for vid, v_entry in vehicles_plugin._entries.iteritems() if v_entry.isInAoI()}

 

Edited by aks1983

Share this post


Link to post

Short link
Share on other sites

Да, спасибо.

Я вчера весь день курочил компоненты BattleEntry и таки добрался до ArenaVehiclesPlugin и его VehicleEntry

this.isVisible = this.isPlayer or g_AppLoader.getDefBattleApp().containerManager.getContainer(ViewTypes.VIEW).getView().components[BATTLE_VIEW_ALIASES.MINIMAP].getPlugin('vehicles')._entries[VehicleID].isInAoI()
Edited by sl101

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...