specialFiltersToDisallow vs disallowedSpecialFilters = difference?

Started by Deimos Rast, August 31, 2016, 06:38:35 PM

Previous topic - Next topic

Deimos Rast

Is there a difference between the two?
There is a "specialFiltersToAllow" but best I can tell no "allowedSpecialFilters." Logically, you would think there would be, so there probably is - I just haven't found an example in the Core game.
Mainly just curious as to which I should use in what circumstances.


Crematorium
<defaultIngredientFilter>
      <specialFiltersToAllow>
        <li>AllowCorpsesColonist</li>
        <li>AllowCorpsesStranger</li>
      </specialFiltersToAllow>

Sarcophogus
<building>
      <defaultStorageSettings>
        <filter>
          <specialFiltersToDisallow>
            <li>AllowCorpsesStranger</li>
          </specialFiltersToDisallow>

Hopper
<building>
      <fixedStorageSettings>
        <filter>
          <disallowedSpecialFilters>
            <li>AllowPlantFood</li>
          </disallowedSpecialFilters>
#StopPluginAbuse

Master Bucketsmith

specialFiltersToAllow and specialFiltersToDisallow exist.
I've used ILSpy to search for those terms. Couldn't find disallowedSpecialFilters and didn't spot what the exact difference is.
private List<SpecialThingFilterDef> disallowedSpecialFilters = new List<SpecialThingFilterDef>();
private List<string> specialFiltersToAllow;
private List<string> specialFiltersToDisallow;

// Verse.ThingFilter
public bool IsAlwaysDisallowedDueToSpecialFilters(ThingDef def)
{
for (int i = 0; i < this.disallowedSpecialFilters.Count; i++)
{
if (this.disallowedSpecialFilters[i].Worker.AlwaysMatches(def))
{
return true;
}
}
return false;
}


Not sure if that helps at all. :D

Deimos Rast

all the ones I mentioned exist with the possible exception of allowedSpecialFilters. Just do a search of Core.
I am curious about this ILSpy though, since MonoDevelop has been under performing of late, and I really just need a search tool most of the time. Playing with it now, it looks promising.
Thanks. :)
#StopPluginAbuse

Master Bucketsmith

No prob. I've also been trying the dotPeek thing within Visual Studio, but it's not working as easy as ILSpy is.