Skip to content

Commit 2643069

Browse files
committed
refactor: Move exploreCheat from GM to GENERAL
1 parent 55ec303 commit 2643069

5 files changed

Lines changed: 20 additions & 16 deletions

File tree

Commands/Commands_GM.lua

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ GM_genericCommands = {
6060
[GENERICS_command] = ".cheat taxi ",
6161
[GENERICS_message] = "logGM_cheatTaxi"
6262
},
63-
[GM_cheatExploreMapsCommand] = {
64-
[GENERICS_isValueNeeded] = true,
65-
[GENERICS_isTargetCheckNeeded] = true,
66-
[GENERICS_command] = ".cheat explore ",
67-
[GENERICS_message] = "logGM_cheatExploreMaps"
68-
},
6963
[GM_cheatWaterWalkCommand] = {
7064
[GENERICS_isValueNeeded] = true,
7165
[GENERICS_isTargetCheckNeeded] = true,

Commands/Commands_Generics.lua

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
--
1616
-------------------------------------------------------------------------------------------------------------
1717

18+
genericCommands = {
19+
[cheatExploreMapsCommand] = {
20+
[GENERICS_isValueNeeded] = true,
21+
[GENERICS_isTargetCheckNeeded] = true,
22+
[GENERICS_command] = ".cheat explore ",
23+
[GENERICS_message] = "log_cheatExploreMaps"
24+
},
25+
}
1826
function commandTargetCheck()
1927
return (MangAdmin:Selection("player") or MangAdmin:Selection("self") or MangAdmin:Selection("none"))
2028
end
@@ -28,8 +36,8 @@ function getCallsDictionary(ID)
2836
return GM_genericCommands
2937
elseif ID == CHAR_KEY then
3038
return CHAR_genericCommands
31-
else
32-
return nil
39+
elseif ID == GENERAL_KEY then
40+
return genericCommands
3341
end
3442
end
3543

Commands/declarations/command_keys.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ON_OPTION = "on"
33
OFF_OPTION = "off"
44

55
-- Role identity Keys
6+
GENERAL_KEY = "GENERAL"
67
GM_KEY = "GM"
78
CHAR_KEY = "CHAR"
89

@@ -16,14 +17,15 @@ GENERICS_command = "command"
1617
GENERICS_message = "message"
1718

1819
-- Spells Keys
20+
--General
21+
cheatExploreMapsCommand = "cheatExploreMaps"
1922
-- GM
2023
GM_displayAccountGMLevelCommand = "displayAccountLevel"
2124
GM_flyModeCommand = "flyMode"
2225
GM_godModeCommand = "godMode"
2326
GM_acceptWhispersCommand = "acceptWhispers"
2427
GM_visibilityCommand = "visibility"
2528
GM_cheatTaxiCommand = "cheatTaxi"
26-
GM_cheatExploreMapsCommand = "cheatExploreMaps"
2729
GM_cheatWaterWalkCommand = "cheatWaterWalk"
2830
GM_cheatNoCastTimeCommand = "cheatNoCastTime"
2931
GM_cheatNoCooldownCommand = "cheatNoCooldown"

FunctionInit.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ function InitControls()
113113
)
114114
MangAdmin:PrepareScript(
115115
GM_cheatExploreMapsOnButton,
116-
Locale["ttGM_cheatExploreMapsOn"],
116+
Locale["tt_cheatExploreMapsOn"],
117117
function()
118-
genericCaller(GM_KEY, GM_cheatExploreMapsCommand, "1")
118+
genericCaller(GENERAL_KEY, cheatExploreMapsCommand, "1")
119119
end
120120
)
121121
MangAdmin:PrepareScript(
122122
GM_cheatExploreMapsOffButton,
123-
Locale["ttGM_cheatExploreMapsOff"],
123+
Locale["tt_cheatExploreMapsOff"],
124124
function()
125-
genericCaller(GM_KEY, GM_cheatExploreMapsCommand, "0")
125+
genericCaller(GENERAL_KEY, cheatExploreMapsCommand, "0")
126126
end
127127
)
128128
MangAdmin:PrepareScript(

Locales/enUS.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ function Return_enUS()
5959
["tt_closeWindow"] = "Close AzerothCoreAdmin",
6060
["tt_clearParameterBox"] = "Clears the parameter box.",
6161
["tt_bag"] = "Show the bag of the selected character or yours [[Parameters: $bagSlot: 0-4]]",
62+
["tt_cheatExploreMapsOn"] = "Reveals maps for the selected character.",
63+
["tt_cheatExploreMapsOff"] = "Hides maps for the selected character.",
6264
--[[General-Control Labels]]
6365
["label_languageButton"] = "Change language",
6466
["label_infoRevision"] = "|cFF00FF00AzerothCore rev:|r ", --Updated: Matched string output to AzerothCore
@@ -91,6 +93,7 @@ function Return_enUS()
9193
["mustBeANumber"] = "Value must be a number!",
9294
["log_resetSlider"] = "Reset slider to 1.0",
9395
["log_bag"] = "Opened _T_'s bag on slot _V1_ ",
96+
["log_cheatExploreMaps"] = "Explore maps cheat for _T_ has been set to _V1_",
9497
--[[GM-Name]]
9598
["tabname_GM"] = "GM",
9699
--[[GM-Tooltips]]
@@ -108,8 +111,6 @@ function Return_enUS()
108111
["ttGM_visibilityOff"] = "Make you visible.",
109112
["ttGM_cheatTaxiOn"] = "Show all taxi-routes to the selected player. This cheat will be deactivated on logout.",
110113
["ttGM_cheatTaxiOff"] = "Deactivate the taxi-cheat and restore the players known taxi-routes.",
111-
["ttGM_cheatExploreMapsOn"] = "Reveals maps for the selected character.",
112-
["ttGM_cheatExploreMapsOff"] = "Hides maps for the selected character.",
113114
["ttGM_cheatWaterWalkOn"] = "Turn Waterwalk ON for the selected character",
114115
["ttGM_cheatWaterWalkOff"] = "Turn Waterwalk OFF for the selected character",
115116
["ttGM_cheatNoCastTimeOn"] = "Disable spell's casting time",
@@ -231,7 +232,6 @@ function Return_enUS()
231232
["logGM_acceptWhispers"] = "Turned accepting whispers to _V1_",
232233
["logGM_visibility"] = "Turned your visibility to _V1_",
233234
["logGM_cheatTaxi"] = "Taxi cheat for _T_ has been set to _V1_",
234-
["logGM_cheatExploreMaps"] = "Explore maps cheat for _T_ has been set to _V1_",
235235
["logGM_cheatWaterWalk"] = "WaterWalk cheat for _T_ has been set to _V1_",
236236
["logGM_cheatNoCastTime"] = "Turned NoCastTime to _V1_",
237237
["logGM_cheatNoCooldown"] = "Turned NoCooldown to _V1_",

0 commit comments

Comments
 (0)