WoWInterface SVN OpenRDX

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/RDX/Designs/Variables
    from Rev 669 to Rev 676
    Reverse comparison

Rev 669 → Rev 676

PowerVar.lua
5,6 → 5,7
name = "Variable: Fractional mana (fm)";
title = "Vars Frac Power";
category = VFLI.i18n("Variables");
test = true;
multiple = true;
IsPossible = function(state)
if not state:Slot("DesignFrame") then return nil; end
21,9 → 22,16
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local ]] .. desc.name .. [[, ]] .. desc.name .. [[_i = 0.5, 0.5;
]]);
else
code:AppendCode([[
local ]] .. desc.name .. [[, ]] .. desc.name .. [[_i = unit:FracPower(]] .. desc.powertype .. [[);
]]);
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("POWER");
66,6 → 74,7
name = "Variable: Number power";
title = "Vars Number Power";
category = VFLI.i18n("Variables");
test = true;
multiple = true;
IsPossible = function(state)
if not state:Slot("DesignFrame") then return nil; end
81,9 → 90,16
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local ]] .. desc.name .. [[, ]] .. desc.name .. [[_i = 3, 3;
]]);
else
code:AppendCode([[
local ]] .. desc.name .. [[, ]] .. desc.name .. [[_i = unit:Power(]] .. desc.powertype .. [[) or 0;
]]);
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("POWER");