From 4c939ad9409412293ee039f80c372561c064ded3 Mon Sep 17 00:00:00 2001 From: Ivaria <ivaria@vuhdo.io> Date: Sat, 5 Mar 2016 08:18:12 +0000 Subject: [PATCH] Changed custom flag validator local variable name to be less ambiguous. --- VuhDoBouquetValidators.lua | 2 +- VuhDoOptions/VuhDoLocalization_de.lua | 2 +- VuhDoOptions/VuhDoLocalization_en.lua | 2 +- VuhDoOptions/VuhDoLocalization_es.lua | 2 +- VuhDoOptions/VuhDoLocalization_fr.lua | 2 +- VuhDoOptions/VuhDoLocalization_ru.lua | 2 +- VuhDoOptions/VuhDoLocalization_zhCN.lua | 2 +- VuhDoOptions/VuhDoLocalization_zhTW.lua | 2 +- changelog.txt | 10 +++++----- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/VuhDoBouquetValidators.lua b/VuhDoBouquetValidators.lua index 5b3e822..32bd662 100644 --- a/VuhDoBouquetValidators.lua +++ b/VuhDoBouquetValidators.lua @@ -1065,7 +1065,7 @@ end -- local function VUHDO_customFlagValidator(anInfo, aCustom) if aCustom and aCustom["custom"] and aCustom["custom"][1] then - local loadedFunction, errorString = loadstring("local anInfo = _G[\"VUHDO_anInfo\"];" .. aCustom["custom"][1]); + local loadedFunction, errorString = loadstring("local VUHDO_unitInfo = _G[\"VUHDO_anInfo\"];" .. aCustom["custom"][1]); if loadedFunction then _G["VUHDO_anInfo"] = anInfo; diff --git a/VuhDoOptions/VuhDoLocalization_de.lua b/VuhDoOptions/VuhDoLocalization_de.lua index 34a4659..3ac9e39 100644 --- a/VuhDoOptions/VuhDoLocalization_de.lua +++ b/VuhDoOptions/VuhDoLocalization_de.lua @@ -612,7 +612,7 @@ VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characte VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."; VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even when using Clique compatibility mode."; VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore)."; -VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == anInfo\[\"name\"\])"; +VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])"; VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat."; VUHDO_I18N_DEFAULT_PROFILE = "Default Profile"; diff --git a/VuhDoOptions/VuhDoLocalization_en.lua b/VuhDoOptions/VuhDoLocalization_en.lua index 59fcedd..4828bda 100644 --- a/VuhDoOptions/VuhDoLocalization_en.lua +++ b/VuhDoOptions/VuhDoLocalization_en.lua @@ -611,7 +611,7 @@ VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characte VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."; VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even when using Clique compatibility mode."; VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore)."; -VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == anInfo\[\"name\"\])"; +VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])"; VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat."; VUHDO_I18N_DEFAULT_PROFILE = "Default Profile"; diff --git a/VuhDoOptions/VuhDoLocalization_es.lua b/VuhDoOptions/VuhDoLocalization_es.lua index 7e17700..8f5d0b7 100644 --- a/VuhDoOptions/VuhDoLocalization_es.lua +++ b/VuhDoOptions/VuhDoLocalization_es.lua @@ -619,7 +619,7 @@ VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characte VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."; VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even when using Clique compatibility mode."; VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore)."; -VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == anInfo\[\"name\"\])"; +VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])"; VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat."; VUHDO_I18N_DEFAULT_PROFILE = "Default Profile"; diff --git a/VuhDoOptions/VuhDoLocalization_fr.lua b/VuhDoOptions/VuhDoLocalization_fr.lua index 9f88bd4..e990128 100644 --- a/VuhDoOptions/VuhDoLocalization_fr.lua +++ b/VuhDoOptions/VuhDoLocalization_fr.lua @@ -621,7 +621,7 @@ VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characte VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."; VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even when using Clique compatibility mode."; VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore)."; -VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == anInfo\[\"name\"\])"; +VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])"; VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat."; VUHDO_I18N_DEFAULT_PROFILE = "Default Profile"; diff --git a/VuhDoOptions/VuhDoLocalization_ru.lua b/VuhDoOptions/VuhDoLocalization_ru.lua index a7bb40d..765c7e5 100644 --- a/VuhDoOptions/VuhDoLocalization_ru.lua +++ b/VuhDoOptions/VuhDoLocalization_ru.lua @@ -719,7 +719,7 @@ VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characte VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."; VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even when using Clique compatibility mode."; VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore)."; -VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == anInfo\[\"name\"\])"; +VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])"; VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat."; VUHDO_I18N_DEFAULT_PROFILE = "Default Profile"; diff --git a/VuhDoOptions/VuhDoLocalization_zhCN.lua b/VuhDoOptions/VuhDoLocalization_zhCN.lua index 2323745..8548bc8 100644 --- a/VuhDoOptions/VuhDoLocalization_zhCN.lua +++ b/VuhDoOptions/VuhDoLocalization_zhCN.lua @@ -613,7 +613,7 @@ VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characte VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."; VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even when using Clique compatibility mode."; VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore)."; -VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == anInfo\[\"name\"\])"; +VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])"; VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat."; VUHDO_I18N_DEFAULT_PROFILE = "Default Profile"; diff --git a/VuhDoOptions/VuhDoLocalization_zhTW.lua b/VuhDoOptions/VuhDoLocalization_zhTW.lua index eabfc14..0983e2b 100644 --- a/VuhDoOptions/VuhDoLocalization_zhTW.lua +++ b/VuhDoOptions/VuhDoLocalization_zhTW.lua @@ -613,7 +613,7 @@ VUHDO_I18N_TT.K553 = "Make the selected profile the default for all new characte VUHDO_I18N_TT.K554 = "Make the selected key layout the default for all new characters on this account."; VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even when using Clique compatibility mode."; VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore)."; -VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == anInfo\[\"name\"\])"; +VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])"; VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat."; VUHDO_I18N_DEFAULT_PROFILE = "Default Profile"; diff --git a/changelog.txt b/changelog.txt index 8fc089c..bb1d655 100644 --- a/changelog.txt +++ b/changelog.txt @@ -28,11 +28,11 @@ Improvements: -- Under 'VuhDo Options > General > Bouquets' -- Added custom flag validator which accepts a user defined function. -- Bouquets can include any valid Lua function which returns true or false. --- The function can access the 'anInfo' variable which is a map containing --- the relevant unit information. --- Example below returns true if the unit is named 'Ivaria': --- return ("Ivaria" == anInfo["name"]) --- Unit information (anInfo table): +-- The function can access the 'VUHDO_unitInfo' variable which is a map +-- containing the relevant unit information. +-- The example below returns true if the unit is named 'Ivaria': +-- return ("Ivaria" == VUHDO_unitInfo["name"]) +-- Unit information (VUHDO_unitInfo table): -- -- afk - boolean - true if unit is AFK -- aggro - boolean - true if unit has aggro -- GitLab