Mercurial > wow > cyborg-mmo7
diff CyborgMMO7.lua @ 36:8fc4f8a25225
Properly iterate over all modes and buttons when saving the data.
author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
---|---|
date | Thu, 25 Apr 2013 18:15:46 +0000 |
parents | 16b2ff47b6db |
children | 0734b90e605a |
line wrap: on
line diff
--- a/CyborgMMO7.lua Thu Apr 25 01:31:36 2013 +0000 +++ b/CyborgMMO7.lua Thu Apr 25 18:15:46 2013 +0000 @@ -18,6 +18,12 @@ --~ along with this program; if not, write to the Free Software --~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +local RAT7 = { + BUTTONS = 13, + MODES = 3, + SHIFT = 0, +} + function CyborgMMO_LoadStrings(self) -- CyborgMMO_DPrint("LoadStrings("..self:GetName()..") = "..CyborgMMO_StringTable[self:GetName()]) self:SetText(CyborgMMO_StringTable[self:GetName()]) @@ -91,9 +97,9 @@ function CyborgMMO_SetRatSaveData(data) assert(VarsLoaded) local saveData = {} - for mode=1,#data do + for mode=1,RAT7.MODES do saveData[mode] = {} - for button=1,#data[mode] do + for button=1,RAT7.BUTTONS do if data[mode][button] then saveData[mode][button] = data[mode][button]:SaveData() end