Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellypse committed Mar 6, 2017
2 parents 129a178 + c09a9b1 commit 5c95a39
Show file tree
Hide file tree
Showing 32 changed files with 1,264 additions and 948 deletions.
43 changes: 43 additions & 0 deletions .pkgmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package-as: totalRP3
enable-nolib-creation: no

externals:
# Ace libs
totalRP3/libs/AceAddon-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceAddon-3.0
totalRP3/libs/AceSerializer-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceSerializer-3.0
totalRP3/libs/CallbackHandler-1.0:
url: https://repos.wowace.com/wow/ace3/trunk/CallbackHandler-1.0
totalRP3/libs/LibCompress:
url: https://repos.wowace.com/wow/libcompress/trunk
totalRP3/libs/LibStub:
url: https://repos.wowace.com/wow/ace3/trunk/LibStub

# Chat Throttle Lib
totalRP3/libs/ChatThrottleLib:
https://repos.wowace.com/wow/chatthrottlelib/trunk

# Databroker
totalRP3/libs/LibDataBroker-1.1:
url: https://repos.wowace.com/wow/libdatabroker-1-1

# LibDBIcon create a minimap icon for a databroker launcher
totalRP3/libs/LibDBIcon-1.0:
url: https://repos.wowace.com/wow/libdbicon-1-0/trunk

ignore:
- README.md
- Documents
- totalRP3_zTest
- totalRP3_Localization
- totalRP3_KuiNameplates # Will be moved as a bundled module

manual-changelog:
filename: CHANGELOG.md
markup-type: markdown


move-folders:
totalRP3/totalRP3: totalRP3
totalRP3/totalRP3_Data: totalRP3_Data
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Bug fixes

- Fixed several issues with the new chat system introduced in version 1.2.5 that would prevent player names form being colored correctly ([ticket #50](https://wow.curseforge.com/projects/total-rp-3/issues/50)).
- Fixed a Lua error in the new WIM module ([ticket #55](https://wow.curseforge.com/projects/total-rp-3/issues/55)).
- Fixed an issue where the option to increase color contrast on player names in the tooltip was always enabled ([ticket #51](https://wow.curseforge.com/projects/total-rp-3/issues/51)).
- Fixed a Lua error when shift-clicking a spell name in the adventure journal ([ticket #61](https://wow.curseforge.com/projects/total-rp-3/issues/61)).
- Fixed an issue making the game freeze and possibly crash when trying to delete too many companion profiles from the directory. Additionally, companion profiles are now included in the automatic purge ([ticket #56](https://wow.curseforge.com/projects/total-rp-3/issues/56)).
- Fixed a long standing issue allowing advanced users to inject custom icons and color codes in places that were not meant for that, as this behaviour led to game crashes, as well as compatibility issues with other RP add-ons and stability issues in Total RP 3 itself ([ticket #63](https://wow.curseforge.com/projects/total-rp-3/issues/63)).
- The option to increase contrast on color names in the tooltip is now applied on the other colored fields, not just the name field.
- Added notice on the Auto add new players option of the directory to indicate that disabling this option will prevent you from receiving any new profile.
- Fixed a Lua error when closing the color picker without having selected a color.

## Other

- TipTac support is now built into the add-on, you can safely uninstall the TipTac module.
44 changes: 0 additions & 44 deletions Documents/Scripts/music_listing.lua

This file was deleted.

62 changes: 61 additions & 1 deletion totalRP3/core/impl/configuration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ Config.resetValue = resetValue;
--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

local GENERATED_WIDGET_INDEX = 0;
local optionsDependentOnOtherOptions = {};

local function buildConfigurationPage(structure)
local optionsDependency = {};
local lastWidget;
local marginLeft = structure.marginLeft or 5;
for index, element in pairs(structure.elements) do
Expand All @@ -117,6 +119,7 @@ local function buildConfigurationPage(structure)
else
widget:SetPoint("TOP", structure.parent, "TOP", 0, element.marginTop or 0);
end
element.widget = widget;

-- Titles
if element.title then
Expand All @@ -141,6 +144,7 @@ local function buildConfigurationPage(structure)
-- Specific for Dropdown
if _G[widget:GetName().."DropDown"] then
local dropDown = _G[widget:GetName().."DropDown"];
element.controller = _G[widget:GetName().."DropDownButton"];
if element.configKey then
if not element.listCallback then
element.listCallback = function(value)
Expand All @@ -165,6 +169,7 @@ local function buildConfigurationPage(structure)
if _G[widget:GetName().."Picker"] then
if element.configKey then
local button = _G[widget:GetName().."Picker"];
element.controller = button;
button.setColor(hexaToNumber(getValue(element.configKey)));
button.onSelection = function(red, green, blue)
if red and green and blue then
Expand All @@ -180,6 +185,7 @@ local function buildConfigurationPage(structure)
-- Specific for Button
if _G[widget:GetName().."Button"] then
local button = _G[widget:GetName().."Button"];
element.controller = button;
if element.callback then
button:SetScript("OnClick", element.callback);
end
Expand All @@ -189,6 +195,7 @@ local function buildConfigurationPage(structure)
-- Specific for EditBox
if _G[widget:GetName().."Box"] then
local box = _G[widget:GetName().."Box"];
element.controller = box;
if element.configKey then
box:SetScript("OnTextChanged", function(self)
local value = self:GetText();
Expand All @@ -207,9 +214,26 @@ local function buildConfigurationPage(structure)
-- Specific for Check
if _G[widget:GetName().."Check"] then
local box = _G[widget:GetName().."Check"];
element.controller = box;
if element.configKey then
box:SetScript("OnClick", function(self)
setValue(element.configKey, self:GetChecked());
local optionIsEnabled = self:GetChecked();
setValue(element.configKey, optionIsEnabled);

if optionsDependentOnOtherOptions[element.configKey] then
for _, dependentOption in pairs(optionsDependentOnOtherOptions[element.configKey]) do

dependentOption.widget:SetAlpha(optionIsEnabled and 1 or 0.5);

if dependentOption.controller then
if optionIsEnabled then
dependentOption.controller:Enable();
else
dependentOption.controller:Disable();
end
end
end
end
end);
box:SetChecked(getValue(element.configKey));
end
Expand Down Expand Up @@ -247,10 +271,45 @@ local function buildConfigurationPage(structure)

onChange(slider, slider:GetValue());
end

if element.dependentOnOptions then
for _, dependence in pairs(element.dependentOnOptions) do
if not optionsDependency[dependence] then
optionsDependency[dependence] = {};
end
tinsert(optionsDependency[dependence], element);
end
end

lastWidget = widget;
GENERATED_WIDGET_INDEX = GENERATED_WIDGET_INDEX + 1;
end

-- Now that we have built all our widget we can go through the dependencies table
-- and disable the elements that need to be disabled if the option they are dependent on
-- is disabled.
for dependence, dependentElements in pairs(optionsDependency) do

-- Go through each element of the dependence
for _, element in pairs(dependentElements) do

-- If the option is disable we render the element as being disable
if not getValue(dependence) then
element.widget:SetAlpha(0.5);

if element.controller then
element.controller:Disable();
end
end

-- Insert the dependent element in our optionsDependentOnOtherOptions table
-- used for cross option page dependencies (like the location feature needing the broadcast protocol)
if not optionsDependentOnOtherOptions[dependence] then
optionsDependentOnOtherOptions[dependence] = {};
end
tinsert(optionsDependentOnOtherOptions[dependence], element)
end
end
end

local configurationPageCount = 0;
Expand Down Expand Up @@ -370,6 +429,7 @@ TRP3_API.events.listenToEvent(TRP3_API.events.WORKFLOW_ON_LOAD, function()
inherit = "TRP3_ConfigEditBox",
title = loc("CO_GENERAL_BROADCAST_C"),
configKey = "comm_broad_chan",
dependentOnOptions = {"comm_broad_use"},
},
{
inherit = "TRP3_ConfigH1",
Expand Down
19 changes: 17 additions & 2 deletions totalRP3/core/impl/globals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ TRP3_API = {
dropDownElements = "%s: |cff00ff00%s"
},
globals = {
DEBUG_MODE = TRP3_DEBUG or false,
--@debug@
DEBUG_MODE = true,
--@end-debug@

--[===[@non-debug@
DEBUG_MODE = false,
--@end-non-debug@]===]

empty = {},

addon_name = "Total RP 3",
Expand All @@ -39,7 +46,15 @@ TRP3_API = {
addon_id_length = 15,

version = 26,
version_display = "1.2.5",

--@debug@
version_display = "-dev",
--@end-debug@

--[===[@non-debug@
version_display = "@project-version@",
--@end-non-debug@]===]


player = UnitName("player"),
player_realm = GetRealmName(),
Expand Down
40 changes: 16 additions & 24 deletions totalRP3/core/impl/locale/locale_enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ The |cff00ff00realm only filter|r will show only profiles bounded to a WoW chara
REG_COMPANION_TARGET_NO = "Your target is not a valid pet, minion, ghoul, mage elemental or a renamed battle pet.",
REG_COMPANION_BOUND_TO = "Bound to ...",
REG_COMPANION_UNBOUND = "Unbound from ...",
REG_COMPANION_LINKED_NO = "The companion %s is no more linked to any profile.",
REG_COMPANION_LINKED_NO = "The companion %s is no longer linked to any profile.",
REG_COMPANION_BOUND_TO_TARGET = "Target",
REG_COMPANION_BROWSER_BATTLE = "Battle pet browser",
REG_COMPANION_BROWSER_MOUNT = "Mount browser",
Expand Down Expand Up @@ -445,7 +445,9 @@ These tools also allow you to insert |cffffff00images, icons or link to external
CO_REGISTER_ABOUT_VOTE = "Use voting system",
CO_REGISTER_ABOUT_VOTE_TT = "Enables the voting system, allowing you to vote ('like' or 'unlike') for other's descriptions and allowing them to do the same for you.",
CO_REGISTER_AUTO_ADD = "Auto add new players",
CO_REGISTER_AUTO_ADD_TT = "Automatically add new players you encounter to the register.",
CO_REGISTER_AUTO_ADD_TT = [[Automatically add new players you encounter to the register.
|cffff0000Note: Disabling this option will prevent you from receiving any new profiles from players you have not encountered yet! Use this option if you do not want to receive new profiles form other players, only updates from players you have already seen.]],
CO_REGISTER_AUTO_PURGE = "Auto purge directory",
CO_REGISTER_AUTO_PURGE_TT = "Automatically remove from directory the profiles of character you haven't crossed for a certain time. You can choose the delay before deletion.\n\n|cff00ff00Note that profiles with a relation toward one of your characters will never be purged.\n\n|cffff9900There is a bug in WoW losing all the saved data when it reach a certain theshold. We strongly recommand to avoid disabling the purge system.",
CO_REGISTER_AUTO_PURGE_0 = "Disable purge",
Expand Down Expand Up @@ -562,6 +564,8 @@ Possible status:
CO_LOCATION_DISABLE_OOC_TT = "You will not respond to location request from other players when you've set your RP status to Out Of Character.",
CO_LOCATION_DISABLE_PVP = "Disable location when flaged for PVP",
CO_LOCATION_DISABLE_PVP_TT = "You will not respond to location request from other players when you are flaged for PvP.\n\nThis option is particularly useful on PvP realms where players from the other faction can abuse the location system to track you.",
CO_SANITIZER = "Sanitize incoming profiles",
CO_SANITIZER_TT = "Remove escaped sequences in tooltip fields from incoming profiles when TRP doesn't allow it (color, images ...).",

--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-- TOOLBAR AND UI BUTTONS
Expand Down Expand Up @@ -949,28 +953,16 @@ You can also leave this field empty to create emotes without an NPC name at the
Your profiles, companions profiles and settings will be temporarily stashed away and your UI will reload with empty data, like your installation of Total RP 3 was brand new.
|cff00ff00Use the same command again (|cff999999/trp3 stash|cff00ff00) to restore your data.|r]],
WHATS_NEW_7 = [[# New in version 1.2.5
## Chat customization revamp
We have completely changed our chat customizations to increase compatibility with other add-ons like Prat, WIM, or even Tongues!
We have also built custom modules for both Prat and WIM to have the full RP names correctly displayed when using these add-ons.
Additionally, this new system fixes a long standing issue where whispers were displayed in every chat tab when the option to have incoming whispers routed to their own tab was enabled.
|cffccccccA big special thank you to |r{twitter*Saelorable*Saelora}|cffcccccc from Argent Dawn (EU) for helping us making this system <3|r
## Bug fixes
- We have implemented a custom bug fix for an issue in Blizzard's own code that is making any opened dropdown menu close themselves randomly when the map is opened, so it is easier for you to use Total RP 3's scanning features ({link*open_map_filters_dropdown*Reminder: now located inside the filter menu in the top right corner of the map}).
- The |cffccccccextensionxtooltip2|r channel should now be joined a little bit later so it is assigned the number 1 channel less often.
## Other improvements
- Skinning add-ons that modify the tooltips font should now work with Total RP 3's tooltips.
- Added link to our Discord server in the About tab of the Dashboard.
- Implemented a workaround against the PetTracker add-on as it is removing other add-ons options in the world map filters dropdown menu. The default dropdown menu is restored by Total RP 3 and PetTracker's options are properly added to the menu after Total RP 3's. ([ticket #45](https://wow.curseforge.com/projects/total-rp-3/issues/45))
WHATS_NEW_8 = [[# New in version 1.2.6
- Fixed several issues with the new chat system introduced in version 1.2.5 that would prevent player names form being colored correctly ([ticket #50](https://wow.curseforge.com/projects/total-rp-3/issues/50)).
- Fixed a Lua error in the new WIM module ([ticket #55](https://wow.curseforge.com/projects/total-rp-3/issues/55)).
- Fixed an issue where the option to increase color contrast on player names in the tooltip was always enabled ([ticket #51](https://wow.curseforge.com/projects/total-rp-3/issues/51))
- Fixed a Lua error when shift-clicking a spell name in the adventure journal ([ticket #61](https://wow.curseforge.com/projects/total-rp-3/issues/61))
- Fixed an issue making the game freeze and possibly crash when trying to delete too many companion profiles from the directory. Additionally, companion profiles are now included in the automatic purge ([ticket #56](https://wow.curseforge.com/projects/total-rp-3/issues/56)).
- Fixed a long standing issue allowing advanced users to inject custom icons and color codes in places that were not meant for that, as this behaviour led to game crashes, as well as compatibility issues with other RP add-ons and stability issues in Total RP 3 itself ([ticket #63](https://wow.curseforge.com/projects/total-rp-3/issues/63)).
- The option to increase contrast on color names in the tooltip is now applied on the other colored fields, not just the name field.
- Added notice on the Auto add new players option of the directory to indicate that disabling this option will prevent you from receiving any new profile.
]],
MORE_MODULES_2 = [[{h2:c}Optional modules{/h2}
{h3}Total RP 3: Extended |cffF87431|r{/h3}
Expand Down
7 changes: 6 additions & 1 deletion totalRP3/core/impl/locale/locale_frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
local LOCALE = {
locale = "frFR",
localeText = "Français",
localeContent = {

localeContent =
--@localization(locale="frFR", format="lua_table", handle-unlocalized="ignore")@
--@do-not-package@
{
["ABOUT_TITLE"] = "À propos",
["BINDING_NAME_TRP3_TOGGLE"] = "Afficher/cacher la fenêtre principale",
["BINDING_NAME_TRP3_TOOLBAR_TOGGLE"] = "Afficher/cacher la barre d'outils",
Expand Down Expand Up @@ -1066,6 +1070,7 @@ De plus, ce nouveau système de discussion corrige un très vieux bug qui faisai
- Nous avons ajouté un lien vers notre serveur Discord dans l'onglet A propos de Total RP 3 sur l'écran d'accueil.
- Nous avons implémenter une solution contre l'add-on PetTracker qui enlève les options ajoutées par d'autres add-ons au menu du bouton de filtres de la carte du monde. Le vrai menu est remis à sa place et Total RP 3 va même ajouter les options de PetTracker correctement! ([ticket #45](https://wow.curseforge.com/projects/total-rp-3/issues/45))]=]
}
--@end-do-not-package@
};

TRP3_API.locale.registerLocale(LOCALE);
2 changes: 1 addition & 1 deletion totalRP3/core/impl/popup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ local function initColorBrowser()
hidePopups();
TRP3_ColorBrowser:Hide();
if TRP3_ColorBrowser.callback ~= nil then
TRP3_ColorBrowser.callback(TRP3_ColorBrowser.red * 255, TRP3_ColorBrowser.green * 255, TRP3_ColorBrowser.blue * 255);
TRP3_ColorBrowser.callback((TRP3_ColorBrowser.red or 1) * 255, (TRP3_ColorBrowser.green or 1) * 255, (TRP3_ColorBrowser.blue or 1) * 255);
end
end);
end
Expand Down
Loading

0 comments on commit 5c95a39

Please sign in to comment.