changeset 248:9e708a155ab9

Fixed Stance/Shapeshift bar not being saved correctly across reboots
author Flick
date Mon, 28 Mar 2011 10:43:36 -0700
parents 586447595262
children 46b59a9ded76
files ReAction.lua StanceButton.lua
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ReAction.lua	Sat Mar 26 12:46:06 2011 -0700
+++ b/ReAction.lua	Mon Mar 28 10:43:36 2011 -0700
@@ -228,8 +228,10 @@
     config.x          = config.x or 0
   else
     config = config or profile.bars[name] or { }
-    if not config or not config.type or not self.barTypes[config.type] then
-      error(("ReAction: Unable to construct/fetch config table for bar '%s'"):format(name))
+    if not config then
+      error(("ReAction: Unable to fetch config table for bar '%s'"):format(name))
+    elseif not config.type or not self.barTypes[config.type] then
+      error(("ReAction: Unrecognized bar type '%s' for bar '%s'"):format(tostring(config.type), name))
     end
     class = self.barTypes[config.type]
   end
--- a/StanceButton.lua	Sat Mar 26 12:46:06 2011 -0700
+++ b/StanceButton.lua	Mon Mar 28 10:43:36 2011 -0700
@@ -35,7 +35,7 @@
 local Super = ReAction.Button
 local Stance = setmetatable(
   { 
-    defaultConfig = { 
+    defaultBarConfig = { 
       type = buttonTypeID,
       btnHeight = 36,
       btnWidth = 36,