SoprachevAK Posted August 4, 2024 Share Posted August 4, 2024 Подскажите пожалуйста как получить текущий выбранный режим боя в ангаре. Не получается найти. (вот то что случайный/стальной/тренировка) @ Quote Link to comment Short link Share on other sites More sharing options...
StranikS_Scan Posted August 4, 2024 Share Posted August 4, 2024 (edited) Думаю надо импортить что-то из этого from gui.prb_control import prbEntityProperty from gui.prb_control.dispatcher import g_prbLoader from gui.prb_control.entities.base.unit.ctx import BattleQueueUnitCtx и пытаться смотреть в их свойствах. Edited August 4, 2024 by StranikS_Scan 2 @ Quote Link to comment Short link Share on other sites More sharing options...
Solution Valberton Posted August 4, 2024 Solution Share Posted August 4, 2024 (edited) from gui.prb_control.dispatcher import g_prbLoader # Диспатчер. prbDispatcher = g_prbLoader.getDispatcher() # Название режима боя, исходя из constants.PREBATTLE_TYPE. modeName = prbDispatcher.getEntity().getEntityType() # Проверка на взвод. isInSquad = prbDispatcher.getFunctionalState().isInUnit() and self.prbEntity.getEntityType() in PREBATTLE_TYPE.SQUAD_PREBATTLES Edited August 4, 2024 by Valberton 3 @ Quote Link to comment Short link Share on other sites More sharing options...
SoprachevAK Posted August 4, 2024 Author Share Posted August 4, 2024 3 часа назад, Valberton сказал: from gui.prb_control.dispatcher import g_prbLoader # Диспатчер. prbDispatcher = g_prbLoader.getDispatcher() # Название режима боя, исходя из constants.PREBATTLE_TYPE. modeName = prbDispatcher.getEntity().getEntityType() # Проверка на взвод. isInSquad = prbDispatcher.getFunctionalState().isInUnit() and self.prbEntity.getEntityType() in PREBATTLE_TYPE.SQUAD_PREBATTLES Спасибо. Оно. Оно так интересно работает. Если ты во взводе, то оно из constants.QUEUE_TYPE, а если соло, то constants.PREBATTLE_TYPE Вдруг кому нибудь ещё понадобится 2 @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
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.