public virtual void SetAllow(SpecialEntityFilterDef spDef, bool flag = true) { if (!flag) { this.forbiddenSpFilterList.Add(spDef); } else { this.forbiddenSpFilterList.Remove(spDef); } }
private void DoSpecialFilter(SpecialEntityFilterDef spFilter, int indentLevel) { base.LabelLeft("*" + spFilter.LabelCap, spFilter.description, indentLevel); bool flag = this.filter.IsAllowed(spFilter); bool flag2 = flag; Widgets.Checkbox(new Vector2(this.LabelWidth, this.curY), ref flag, this.lineHeight, false); if (flag != flag2) { this.filter.SetAllow(spFilter, flag); } base.EndLine(); }
public virtual bool IsAllowed(SpecialEntityFilterDef spDef) { return(!this.forbiddenSpFilterList.Contains(spDef)); }