Quantcast

Split patterns-base into separate files per variable

Kevin Lyles [08-27-10 - 15:16]
Split patterns-base into separate files per variable
Filename
Locales/enUS/enUS.xml
Locales/enUS/patterns-base.lua
Locales/enUS/patterns-generic.lua
Locales/enUS/patterns-socket-bonuses.lua
Locales/enUS/patterns-sockets.lua
diff --git a/Locales/enUS/enUS.xml b/Locales/enUS/enUS.xml
index 3e4f4e3..f0c80d7 100644
--- a/Locales/enUS/enUS.xml
+++ b/Locales/enUS/enUS.xml
@@ -5,7 +5,9 @@
 	<Script file="stats.lua"/>
 	<Script file="slots.lua"/>
 	<Script file="classes-specs.lua"/>
-	<Script file="patterns-base.lua"/>
+	<Script file="patterns-generic.lua"/>
+	<Script file="patterns-sockets.lua"/>
+	<Script file="patterns-socket-bonuses.lua"/>
 	<Script file="patterns-equip-stats.lua"/>
 	<Script file="patterns-elixirs.lua"/>
 	<Script file="patterns-food.lua"/>
diff --git a/Locales/enUS/patterns-base.lua b/Locales/enUS/patterns-base.lua
deleted file mode 100644
index 6ddf9a1..0000000
--- a/Locales/enUS/patterns-base.lua
+++ /dev/null
@@ -1,18 +0,0 @@
-if GetLocale() ~= "enUS" then
-	return
-end
-
-local function sockets(text)
-	return {socket = text}
-end
-
-local function socketBonuses(text, section)
-	local stat = WeightsWatcher.singleStat(text, section)
-	if stat and stat.stats then
-		return {socketBonusStat = stat.stats}
-	end
-end
-
-ww_sockets = {{" socket$"}, {}, {}, {}, {" socket$"}, sockets, "socket"}
-ww_generic = {{"^[^:]+$"}, {}, {}, {}, {}, WeightsWatcher.parseStats, "generic"}
-ww_socketBonuses = {{"^socket bonus: "}, {}, {}, {}, {"^socket bonus: "}, socketBonuses, "socketBonus"}
diff --git a/Locales/enUS/patterns-generic.lua b/Locales/enUS/patterns-generic.lua
new file mode 100644
index 0000000..53319e7
--- /dev/null
+++ b/Locales/enUS/patterns-generic.lua
@@ -0,0 +1,5 @@
+if GetLocale() ~= "enUS" then
+	return
+end
+
+ww_generic = {{"^[^:]+$"}, {}, {}, {}, {}, WeightsWatcher.parseStats, "generic"}
diff --git a/Locales/enUS/patterns-socket-bonuses.lua b/Locales/enUS/patterns-socket-bonuses.lua
new file mode 100644
index 0000000..296a804
--- /dev/null
+++ b/Locales/enUS/patterns-socket-bonuses.lua
@@ -0,0 +1,12 @@
+if GetLocale() ~= "enUS" then
+	return
+end
+
+local function socketBonuses(text, section)
+	local stat = WeightsWatcher.singleStat(text, section)
+	if stat and stat.stats then
+		return {socketBonusStat = stat.stats}
+	end
+end
+
+ww_socketBonuses = {{"^socket bonus: "}, {}, {}, {}, {"^socket bonus: "}, socketBonuses, "socketBonus"}
diff --git a/Locales/enUS/patterns-sockets.lua b/Locales/enUS/patterns-sockets.lua
new file mode 100644
index 0000000..463a81f
--- /dev/null
+++ b/Locales/enUS/patterns-sockets.lua
@@ -0,0 +1,9 @@
+if GetLocale() ~= "enUS" then
+	return
+end
+
+local function sockets(text)
+	return {socket = text}
+end
+
+ww_sockets = {{" socket$"}, {}, {}, {}, {" socket$"}, sockets, "socket"}