Icon representing a recipe

Recipe: For Cooks Lua filter translator

created by Bruno Kestemont

Profile


Name
For Cooks Lua filter translator
ID
102987
Shared with
Public
Parent
None
Children
None
Created on
January 07, 2019 at 22:47 PM UTC
Updated on
January 07, 2019 at 22:47 PM UTC
Description

Adapts filter management recipes for new Lua functionning

Best for


Code


--copy this at the early beginning of the recipe. --START Translate old filter functions in order to keep original recipe code Bruno Kestemont 7/1/2019 function behavior.GetFiltersDisabled() return not filter.AreAllEnabled() --True if all filters are active end function behavior.SetFiltersDisabled(disabling) local disabling = disabling or true if disabling then filter.DisableAll() --Disables all filters else filter.EnableAll() --Enables all filters end end function behavior.SetSlowFiltersDisabled(disabling) if disabling then filter.DisableAll() --Disables all filters else filter.EnableAll() --Enables all filters end end --END --Translate old filter functions in order to keep original recipe code

Comments