--------------------------------------------------------------------------------- Check the class filter flags-------------------------------------------------------------------------------localclass_filters=filter_db.classestoggled_off,toggled_on=0,0forclass,flaginpairs(CLASS_FILTERS)dolocalbitfield=recipe.flags.class1ifbitfieldandbit.band(bitfield,flag)==flagthenifclass_filters[class]thentoggled_on=toggled_on+1elsetoggled_off=toggled_off+1endendendiftoggled_off>0andtoggled_on==0thenreturnfalseend-------------------------------------------------------------------------------------------------- Stage 2-- loop through nonexclusive (soft filters) flags until one is true-- If one of these is true (ie: we want to see trainers and there is a trainer flag) we display the recipe------------------------------------------------------------------------------------------------forfilter,datainpairs(SOFT_FILTERS)dolocalbitfield=recipe.flags[private.flag_members[data.index]]ifbitfieldandbit.band(bitfield,data.flag)==data.flaganddata.sv_root[filter]thenreturntrueendend