Mercurial > wow > buffalo2
comparison Veneer.lua @ 102:1e511e9aaca5
- clean up handler loading inconsistencies; exclude free frames from anchor cluster iterations, and remove extraneous PLAYER_LOGIN handling
- added a Setup method to the handler template that creates and reconciles a SavedVariables table for that module
author | Nenue |
---|---|
date | Wed, 25 Jan 2017 23:11:27 -0500 |
parents | dadddb8a551f |
children | 8df154a2bfd6 |
comparison
equal
deleted
inserted
replaced
101:f32b63c93275 | 102:1e511e9aaca5 |
---|---|
245 end | 245 end |
246 | 246 |
247 function VeneerCore:AddHandler(handler, ...) | 247 function VeneerCore:AddHandler(handler, ...) |
248 print('|cFFFFFF00*** Adding handler:', handler.moduleName or handler:GetName()) | 248 print('|cFFFFFF00*** Adding handler:', handler.moduleName or handler:GetName()) |
249 | 249 |
250 | 250 if not handler.anchorFrame then |
251 local anchorGroup, clusterTable, clusterIndex = self:GetClusterFromArgs(...) | 251 local anchorGroup, clusterTable, clusterIndex = self:GetClusterFromArgs(...) |
252 if clusterIndex == 1 then | 252 if clusterIndex == 1 then |
253 for i, frame in ipairs(clusterTable) do | 253 for i, frame in ipairs(clusterTable) do |
254 frame.clusterIndex = i + 1 | 254 frame.clusterIndex = i + 1 |
255 end | 255 end |
256 end | 256 end |
257 tinsert(clusterTable, clusterIndex, handler) | 257 tinsert(clusterTable, clusterIndex, handler) |
258 | 258 print(' cluster', anchorGroup, 'table', clusterTable, 'position', clusterIndex) |
259 print(' cluster', anchorGroup, 'table', clusterTable, 'position', clusterIndex) | 259 |
260 | 260 handler.anchorCluster = clusterTable |
261 handler.anchorCluster = clusterTable | 261 handler.anchorIndex = clusterIndex |
262 handler.anchorIndex = clusterIndex | 262 else |
263 print(' free frame') | |
264 end | |
265 | |
263 for k,v in pairs(VeneerHandlerMixin) do | 266 for k,v in pairs(VeneerHandlerMixin) do |
264 if not handler[k] then | 267 if not handler[k] then |
265 print(' * from mixin:', k) | 268 print(' * from mixin:', k) |
266 handler[k] = v | 269 handler[k] = v |
267 end | 270 end |