In recipe_prototype:AddFilters() - don't bxor a filter if it's already set.
James D. Callahan III [03-06-11 - 17:55]
In recipe_prototype:AddFilters() - don't bxor a filter if it's already set.
diff --git a/Recipe.lua b/Recipe.lua
index 84e9449..2a66043 100644
--- a/Recipe.lua
+++ b/Recipe.lua
@@ -338,6 +338,10 @@ function recipe_prototype:AddFilters(...)
if not self.flags[member_name] then
self.flags[member_name] = 0
end
+
+ if bit.band(self.flags[member_name], bitfield[flag_name]) == bitfield[flag_name] then
+ return
+ end
self.flags[member_name] = bit.bxor(self.flags[member_name], bitfield[flag_name])
end
end