Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v2.2.0 #57

Merged
merged 17 commits into from
Sep 29, 2021
Merged
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TranqRotate

This addon is meant to help hunters to setup tranqshot rotation and give them real time visual feedback about it.
This addon is meant to help hunters to setup tranqshot rotation and give them real time feedback about it.

It also allow non-hunter raid leaders to easily manage, report and watch the tranq rotation live.

Expand All @@ -10,9 +10,9 @@ This addon will work even if you are the only one using it in your raid. (With s

## Feedback

I'm looking for feedback ! I've set up a small discord server to get in touch : https://discord.gg/bPFyvDe
I've set up a small discord server to talk about the project, get feedback and troubleshoot problems : https://discord.gg/bPFyvDe

Please report any issue on github : https://github.com/Slivo-fr/TranqRotate/issues
Please report any issue at https://github.com/Slivo-fr/TranqRotate/issues

## Features

Expand Down Expand Up @@ -60,7 +60,6 @@ The `/tranq check` command allows you to list TranqRotate versions used by other

Here is a list of feature I want to implement at some point, no specific order is decided yet.

- Automatic reset of rotation when raid wipe
- Customization of the tranq window, size, textures, colors, fonts...

## Download
Expand Down
5 changes: 3 additions & 2 deletions TranqRotate.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Interface: 11307
## Title: TranqRotate |cff00aa002.1.0|r
## Title: TranqRotate |cff00aa002.2.0|r
## Notes: A tranqshot rotation assistant
## Author: Slivo
## Version: 2.1.0
## Version: 2.2.0
## SavedVariables: TranqRotateDb
## OptionalDeps: Ace3

Expand Down Expand Up @@ -37,3 +37,4 @@ src\utils.lua
src\debuff.lua
src\migration.lua
src\raidIcons.lua
src\encounter.lua
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## TranqRotate Changelog

#### v2.2.0

- Adds several translations
- Adds a button to reset window position in general settings
- Update Ace3 libs
- Improves rotation automatic reset after boss fight
- Drag and drop backend changes

#### v2.1.0

- Removes server suffixes from player names everywhere (connected realms)
Expand Down
28 changes: 23 additions & 5 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ local L = {

["LOCK_WINDOW"] = "Lock window",
["LOCK_WINDOW_DESC"] = "Lock window",
["RESET_WINDOW_POSITION"] = "Reset position",
["RESET_WINDOW_POSITION_DESC"] = "Reset the main window position",
["HIDE_WINDOW_NOT_IN_RAID"] = "Hide the window when not in a raid",
["HIDE_WINDOW_NOT_IN_RAID_DESC"] = "Hide the window when not in a raid",
["DO_NOT_SHOW_WHEN_JOINING_RAID"] = "Do not show window when joining a raid",
Expand Down Expand Up @@ -93,6 +95,11 @@ local L = {
["USE_MULTILINE_ROTATION_REPORT"] = "Use multiline for main rotation when reporting",
["USE_MULTILINE_ROTATION_REPORT_DESC"] = "Check this option if you want more comprehensible order display",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "Hunter tranqshot setup",
["BROADCAST_ROTATION_PREFIX"] = "Rotation",
["BROADCAST_BACKUP_PREFIX"] = "Backup",

--- Sounds
["SETTING_SOUNDS"] = "Sounds",
["ENABLE_NEXT_TO_TRANQ_SOUND"] = "Play a sound when you are the next to shoot",
Expand All @@ -103,11 +110,6 @@ local L = {
--- Profiles
["SETTING_PROFILES"] = "Profiles",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "Hunter tranqshot setup",
["BROADCAST_ROTATION_PREFIX"] = "Rotation",
["BROADCAST_BACKUP_PREFIX"] = "Backup",

-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "This player does not use TranqRotate",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "Or runs an outdated version below 1.6.0",
Expand All @@ -119,6 +121,22 @@ local L = {

-- Rotation reset
["RESET_UNAUTHORIZED"] = "You must be raid assist to reset the rotation",

-- Comms chat messages
["COMMS_SENT_BACKUP_REQUEST"] = "Sending backup request to %s",
["COMMS_RECEIVED_NEW_ROTATION"] = "Received new rotation configuration from %s",
["COMMS_RECEIVED_BACKUP_REQUEST"] = "%s asked for backup !",
["COMMS_RECEIVED_RESET_BROADCAST"] = "%s has reset the rotation.",

-- Failed tranq printed messages
["PRINT_FAILED_TRANQ_MISS"] = "%s missed his tranqshot!",
["PRINT_FAILED_TRANQ_RESIST"] = "%s's tranqshot was resisted!",
["PRINT_FAILED_TRANQ_MISS_OR_RESIST"] = "%s's tranqshot was missed or resisted!",

-- Version check printed messages
["VERSION_CHECK_HEADER"] = "Version check",
["VERSION_CHECK_YOU"] = "You",
["VERSION_CHECK_NONE_OR_BELOW_1.6.0"] = "None or below 1.6.0",
}

TranqRotate.L = L
28 changes: 23 additions & 5 deletions locales/frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ local L = {

["LOCK_WINDOW"] = "Verrouiller la position de la fênetre",
["LOCK_WINDOW_DESC"] = "Verrouiller la position de la fênetre",
["RESET_WINDOW_POSITION"] = "Reset position",
["RESET_WINDOW_POSITION_DESC"] = "Reinitialise la position de la fenêtre principale",
["HIDE_WINDOW_NOT_IN_RAID"] = "Masquer la fenêtre principale hors raid",
["HIDE_WINDOW_NOT_IN_RAID_DESC"] = "Masquer la fenêtre principale hors raid",
["DO_NOT_SHOW_WHEN_JOINING_RAID"] = "Ne pas afficher la fenêtre principale lorsque vous rejoignez un raid",
Expand Down Expand Up @@ -95,6 +97,11 @@ local L = {
["USE_MULTILINE_ROTATION_REPORT"] = "Utiliser plusieurs lignes pour la rotation principale",
["USE_MULTILINE_ROTATION_REPORT_DESC"] = "Chaque chasseur de la rotation apparaitra sur une ligne numérotée",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "Hunter tranqshot setup",
["BROADCAST_ROTATION_PREFIX"] = "Rotation",
["BROADCAST_BACKUP_PREFIX"] = "Backup",

--- Sounds
["SETTING_SOUNDS"] = "Sons",
["ENABLE_NEXT_TO_TRANQ_SOUND"] = "Jouer un son lorsque vous êtes le prochain à devoir tranq",
Expand All @@ -105,11 +112,6 @@ local L = {
--- Profiles
["SETTING_PROFILES"] = "Profils",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "Hunter tranqshot setup",
["BROADCAST_ROTATION_PREFIX"] = "Rotation",
["BROADCAST_BACKUP_PREFIX"] = "Backup",

-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "Ce joueur n'utilise pas TranqRotate",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "Ou possède une version obsolète inférieure à 1.6.0",
Expand All @@ -121,6 +123,22 @@ local L = {

-- Rotation reset
["RESET_UNAUTHORIZED"] = "Vous devez être assistant raid pour réinitialiser la rotation",

-- Comms chat messages
["COMMS_SENT_BACKUP_REQUEST"] = "Envoi d'une demande de backup à %s",
["COMMS_RECEIVED_NEW_ROTATION"] = "Nouvelle rotation reçue de %s",
["COMMS_RECEIVED_BACKUP_REQUEST"] = "%s demande un backup !",
["COMMS_RECEIVED_RESET_BROADCAST"] = "%s à réinitialisé la rotation",

-- Failed tranq printed messages
["PRINT_FAILED_TRANQ_MISS"] = "%s a raté son tranqshot!",
["PRINT_FAILED_TRANQ_RESIST"] = "Le tranqshot de %s a été résisté!",
["PRINT_FAILED_TRANQ_MISS_OR_RESIST"] = "Le tranqshot de %s a raté ou a été résisté!",

-- Version check printed messages
["VERSION_CHECK_HEADER"] = "Controle des versions",
["VERSION_CHECK_YOU"] = "Vous",
["VERSION_CHECK_NONE_OR_BELOW_1.6.0"] = "Aucune ou inférieure à 1.6.0",
}

TranqRotate.L = L
28 changes: 23 additions & 5 deletions locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ local L = {

["LOCK_WINDOW"] = "Закрепить окно",
["LOCK_WINDOW_DESC"] = "Препятствует перемещению окна с помощью мыши",
["RESET_WINDOW_POSITION"] = "Reset position",
["RESET_WINDOW_POSITION_DESC"] = "Reset the main window position",
["HIDE_WINDOW_NOT_IN_RAID"] = "Показывать окно только в рейде",
["HIDE_WINDOW_NOT_IN_RAID_DESC"] = "Окно будет отображаться только в рейдовой группе",
["DO_NOT_SHOW_WHEN_JOINING_RAID"] = "Не показывать окно во время присоединения к рейду",
Expand Down Expand Up @@ -95,6 +97,11 @@ local L = {
["USE_MULTILINE_ROTATION_REPORT"] = "Использовать многострочный вывод при объявлении очередности",
["USE_MULTILINE_ROTATION_REPORT_DESC"] = "Выберите для более понятного порядка отображения очередности",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "Очередность Усмиряющего выстрела",
["BROADCAST_ROTATION_PREFIX"] = "Очередность",
["BROADCAST_BACKUP_PREFIX"] = "Запасные",

--- Sounds
["SETTING_SOUNDS"] = "Звуки",
["ENABLE_NEXT_TO_TRANQ_SOUND"] = "Проигрывать звук когда подходит ваша очередь",
Expand All @@ -105,11 +112,6 @@ local L = {
--- Profiles
["SETTING_PROFILES"] = "Профили",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "Очередность Усмиряющего выстрела",
["BROADCAST_ROTATION_PREFIX"] = "Очередность",
["BROADCAST_BACKUP_PREFIX"] = "Запасные",

-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "Этот игрок не использует TranqRotate",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "Или используется версия ниже 1.6.0",
Expand All @@ -121,6 +123,22 @@ local L = {

-- Rotation reset
["RESET_UNAUTHORIZED"] = "You must be raid assist to reset the rotation",

-- Comms chat messages
["COMMS_SENT_BACKUP_REQUEST"] = "Sending backup request to %s",
["COMMS_RECEIVED_NEW_ROTATION"] = "Received new rotation configuration from %s",
["COMMS_RECEIVED_BACKUP_REQUEST"] = "%s asked for backup !",
["COMMS_RECEIVED_RESET_BROADCAST"] = "%s has reset the rotation.",

-- Failed tranq printed messages
["PRINT_FAILED_TRANQ_MISS"] = "%s missed his tranqshot!",
["PRINT_FAILED_TRANQ_RESIST"] = "%s's tranqshot was resisted!",
["PRINT_FAILED_TRANQ_MISS_OR_RESIST"] = "%s's tranqshot was missed or resisted!",

-- Version check printed messages
["VERSION_CHECK_HEADER"] = "Version check",
["VERSION_CHECK_YOU"] = "You",
["VERSION_CHECK_NONE_OR_BELOW_1.6.0"] = "None or below 1.6.0",
}

TranqRotate.L = L
28 changes: 23 additions & 5 deletions locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ local L = {

["LOCK_WINDOW"] = "锁定窗口",
["LOCK_WINDOW_DESC"] = "锁定窗口",
["RESET_WINDOW_POSITION"] = "Reset position",
["RESET_WINDOW_POSITION_DESC"] = "Reset the main window position",
["HIDE_WINDOW_NOT_IN_RAID"] = "不在团队时隐藏窗口",
["HIDE_WINDOW_NOT_IN_RAID_DESC"] = "不在团队时隐藏窗口",
["DO_NOT_SHOW_WHEN_JOINING_RAID"] = "加入团队时隐藏窗口",
Expand Down Expand Up @@ -95,6 +97,11 @@ local L = {
["USE_MULTILINE_ROTATION_REPORT"] = "连续多行发送宁神通告",
["USE_MULTILINE_ROTATION_REPORT_DESC"] = "如果您想要更易于理解的顺序显示,请选中此选项",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "猎人宁神顺序",
["BROADCAST_ROTATION_PREFIX"] = "循环",
["BROADCAST_BACKUP_PREFIX"] = "替补",

--- Sounds
["SETTING_SOUNDS"] = "音效",
["ENABLE_NEXT_TO_TRANQ_SOUND"] = "当下一个宁神射击是您时,播放提示音",
Expand All @@ -105,11 +112,6 @@ local L = {
--- Profiles
["SETTING_PROFILES"] = "配置文件",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "猎人宁神顺序",
["BROADCAST_ROTATION_PREFIX"] = "循环",
["BROADCAST_BACKUP_PREFIX"] = "替补",

-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "此玩家没有使用TranqRotate插件",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "或者运行低于1.6.0的过时版本",
Expand All @@ -121,6 +123,22 @@ local L = {

-- Rotation reset
["RESET_UNAUTHORIZED"] = "You must be raid assist to reset the rotation",

-- Comms chat messages
["COMMS_SENT_BACKUP_REQUEST"] = "Sending backup request to %s",
["COMMS_RECEIVED_NEW_ROTATION"] = "Received new rotation configuration from %s",
["COMMS_RECEIVED_BACKUP_REQUEST"] = "%s asked for backup !",
["COMMS_RECEIVED_RESET_BROADCAST"] = "%s has reset the rotation.",

-- Failed tranq printed messages
["PRINT_FAILED_TRANQ_MISS"] = "%s missed his tranqshot!",
["PRINT_FAILED_TRANQ_RESIST"] = "%s's tranqshot was resisted!",
["PRINT_FAILED_TRANQ_MISS_OR_RESIST"] = "%s's tranqshot was missed or resisted!",

-- Version check printed messages
["VERSION_CHECK_HEADER"] = "Version check",
["VERSION_CHECK_YOU"] = "You",
["VERSION_CHECK_NONE_OR_BELOW_1.6.0"] = "None or below 1.6.0",
}

TranqRotate.L = L
28 changes: 23 additions & 5 deletions locales/zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ local L = {

["LOCK_WINDOW"] = "鎖定窗口",
["LOCK_WINDOW_DESC"] = "鎖定窗口",
["RESET_WINDOW_POSITION"] = "Reset position",
["RESET_WINDOW_POSITION_DESC"] = "Reset the main window position",
["HIDE_WINDOW_NOT_IN_RAID"] = "不在團隊時隱藏窗口",
["HIDE_WINDOW_NOT_IN_RAID_DESC"] = "不在團隊時隱藏窗口",
["DO_NOT_SHOW_WHEN_JOINING_RAID"] = "加入團隊時隱藏窗口",
Expand Down Expand Up @@ -95,6 +97,11 @@ local L = {
["USE_MULTILINE_ROTATION_REPORT"] = "連續多行發送寧神通告",
["USE_MULTILINE_ROTATION_REPORT_DESC"] = "如果您想要更易於理解的順序顯示,請選中此選項",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "獵人寧神順序",
["BROADCAST_ROTATION_PREFIX"] = "循環",
["BROADCAST_BACKUP_PREFIX"] = "替補",

--- Sounds
["SETTING_SOUNDS"] = "音效",
["ENABLE_NEXT_TO_TRANQ_SOUND"] = "當下壹個寧神射擊是您時,播放提示音",
Expand All @@ -105,11 +112,6 @@ local L = {
--- Profiles
["SETTING_PROFILES"] = "設定檔",

--- Raid broadcast messages
["BROADCAST_HEADER_TEXT"] = "獵人寧神順序",
["BROADCAST_ROTATION_PREFIX"] = "循環",
["BROADCAST_BACKUP_PREFIX"] = "替補",

-- Blind icon tooltip
["TOOLTIP_PLAYER_WITHOUT_ADDON"] = "This player does not use TranqRotate",
["TOOLTIP_MAY_RUN_OUDATED_VERSION"] = "Or runs an outdated version below 1.6.0",
Expand All @@ -121,6 +123,22 @@ local L = {

-- Rotation reset
["RESET_UNAUTHORIZED"] = "You must be raid assist to reset the rotation",

-- Comms chat messages
["COMMS_SENT_BACKUP_REQUEST"] = "Sending backup request to %s",
["COMMS_RECEIVED_NEW_ROTATION"] = "Received new rotation configuration from %s",
["COMMS_RECEIVED_BACKUP_REQUEST"] = "%s asked for backup !",
["COMMS_RECEIVED_RESET_BROADCAST"] = "%s has reset the rotation.",

-- Failed tranq printed messages
["PRINT_FAILED_TRANQ_MISS"] = "%s missed his tranqshot!",
["PRINT_FAILED_TRANQ_RESIST"] = "%s's tranqshot was resisted!",
["PRINT_FAILED_TRANQ_MISS_OR_RESIST"] = "%s's tranqshot was missed or resisted!",

-- Version check printed messages
["VERSION_CHECK_HEADER"] = "Version check",
["VERSION_CHECK_YOU"] = "You",
["VERSION_CHECK_NONE_OR_BELOW_1.6.0"] = "None or below 1.6.0",
}

TranqRotate.L = L
17 changes: 9 additions & 8 deletions src/comms.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
local AceComm = LibStub("AceComm-3.0")
local AceSerializer = LibStub("AceSerializer-3.0")

local L = TranqRotate.L

-- Register comm prefix at initialization steps
function TranqRotate:initComms()

Expand Down Expand Up @@ -118,8 +120,7 @@ end
-- Broadcast a request for the current rotation configuration
function TranqRotate:sendBackupRequest(name)

-- todo: translation
TranqRotate:printPrefixedMessage('Sending backup request to ' .. TranqRotate:formatPlayerName(name))
TranqRotate:printPrefixedMessage(string.format(L['COMMS_SENT_BACKUP_REQUEST'], TranqRotate:formatPlayerName(name)))

local message = {
['type'] = TranqRotate.constants.commsTypes.backupRequest,
Expand Down Expand Up @@ -170,8 +171,8 @@ function TranqRotate:receiveSyncOrder(prefix, message, channel, sender)
TranqRotate.syncVersion = (message.version)
TranqRotate.syncLastSender = sender

-- todo : translation
TranqRotate:printPrefixedMessage('Received new rotation configuration from ' .. TranqRotate:formatPlayerName(sender))
TranqRotate:printPrefixedMessage(string.format(L['COMMS_RECEIVED_NEW_ROTATION'], TranqRotate:formatPlayerName(sender)))

TranqRotate:applyRotationConfiguration(message.rotation)

local nextHunter = TranqRotate:getHunter(message.nextHunter)
Expand All @@ -191,8 +192,8 @@ end

-- Received a backup request
function TranqRotate:receiveBackupRequest(prefix, message, channel, sender)
-- todo: translations
TranqRotate:printPrefixedMessage(TranqRotate:formatPlayerName(sender) .. ' asked for backup !')
TranqRotate:printPrefixedMessage(string.format(L['COMMS_RECEIVED_BACKUP_REQUEST'], TranqRotate:formatPlayerName(sender)))

TranqRotate:throwTranqAlert()
end

Expand All @@ -204,8 +205,8 @@ function TranqRotate:receiveResetRequest(prefix, message, channel, sender)
end

if (TranqRotate.lastRotationReset < GetTime() - 2) then
-- todo: translations
TranqRotate:printPrefixedMessage(TranqRotate:formatPlayerName(sender) .. ' has reset the rotation.')
TranqRotate:printPrefixedMessage(string.format(L['COMMS_RECEIVED_RESET_BROADCAST'], TranqRotate:formatPlayerName(sender)))

TranqRotate:resetRotation()
end
end
Loading