示例#1
0
def minimap_setAttentionToCell(func, self, x, y, isRightClick):
    if not isRightClick and modSM.isKeyPress and isBattleChat()["squad"] != None:
        index = minimap_utils.makeCellIndex(x, y)
        _x = (str)(((index - index % 10) / 10) + 1)
        _x = _x[0:-2]
        if _x == '10':
            _x = '0'
        isBattleChat()["squad"].sendMessage('Внимание на квадрат ' + Y_POINT[(int)(index % 10)] + _x + '!')
        return
    func(self, x, y, isRightClick)
示例#2
0
 def setAttentionToCell(self, x, y, isRightClick):
     if isRightClick:
         handler = avatar_getter.getInputHandler()
         if handler is not None:
             matrix = minimap_utils.makePointMatrixByLocal(x, y, *self._boundingBox)
             handler.onMinimapClicked(matrix.translation)
     else:
         commands = g_sessionProvider.shared.chatCommands
         if commands is not None:
             commands.sendAttentionToCell(minimap_utils.makeCellIndex(x, y))
     return
示例#3
0
 def setAttentionToCell(self, x, y, isRightClick):
     if isRightClick:
         handler = avatar_getter.getInputHandler()
         if handler is not None:
             matrix = minimap_utils.makePointMatrixByLocal(
                 x, y, *self._boundingBox)
             handler.onMinimapClicked(matrix.translation)
     else:
         commands = self.sessionProvider.shared.chatCommands
         if commands is not None:
             commands.sendAttentionToCell(minimap_utils.makeCellIndex(x, y))
     return
 def makeCellIndex(localX, localY):
     return int(minimap_utils.makeCellIndex(localX, localY))