def showCurrentMode(self): if self._isEnabled: log.info('Sixth Sense Message enabled') Utils.addClientMessage(sm_settings.get('EnableSystemMsg'), True) else: log.info('Sixth Sense Message disabled') Utils.addClientMessage(sm_settings.get('DisableSystemMsg'), True)
def showSixthSenseIndicator(self): if not self._isEnabled or not self._activeParams: log.info('sixth sense message is disabled or nothing to do.') return currentTime = Utils.getTime() cooldownTime = self._getCooldownTime(currentTime, self._cooldownInterval) if cooldownTime > 0: log.info('[time:{:.1f}] invoke sixth sense, but it\'s not time yet. (rest {:.1f}s)'.format(currentTime, cooldownTime)) Utils.addClientMessage(sm_settings.get('CooldownMsg').format(rest=int(math.ceil(cooldownTime)))) return log.info('[time:{:.1f}] invoke sixth sense.'.format(currentTime)) player = Utils.getPlayer() teamAmount = Utils.getTeamAmount() cellIndex = MinimapInfo.getCellIndexByPosition(Utils.getPos()) messenger = IngameMessanger() log.info('current chat channel: {}'.format(messenger.getChannelLabels())) log.info('current team amount: {}'.format(teamAmount)) self._isDone = {} for index, param in enumerate(self._activeParams): self._currentIndex = index self._currentParam = param self._doSixthSense(messenger, currentTime, player, cellIndex, teamAmount) if self._isDone: log.debug('success commands, update last activity.') self._lastActivity = currentTime