EtiamNullam/Etiam-ONI-Modpack

MaterialColor: Many buildings not respecting filters

Closed this issue · 2 comments

tofof commented

Description

Many buildings are not affected by the filter settings specified in config.json as expected. More specifically, all these buildings have their colors altered by MaterialColor even when explicitly excluded (in exclusive mode) or when not actually included (in inclusive mode).

I understand that the building names are the internal ones, not the localized names presented in-game. For example, the Gas Range will not be matched by the "Gas" filter used below, but is matched by "Station" since its internal name is gourmetcookingstation.

Affected buildings

These buildings are always recolored by MaterialColor, regardless of filter settings.

  • All tiles (regular, insulated, airflow, mesh, plastic, window, bunker, and carpeted)
  • Storage bins (regular, smart, and automatic dispenser, ration box, refrigerator, conveyor loader -- only colors up after contents selected)
  • Bed (cot, comfy, triage -- only colors up after assigned to a duplicant)
  • Massage table (colors immediately)
  • Mess table (only colors up after assigned to a duplicant)
  • Toilets (outhouse, lavatory)

Unaffected buildings

These work as expected, despite similarities with the above buildings.

  • Farm tiles and decorative planters (even after seed selected)
  • Bottle emptier (even after liquid selected)

Example 1

"TypeFilterInfo": {
    "Inclusive": true,  // false to exclude buildings 
    "ExactMatch": false, // true to match to exact bulding id
    "Rules": [
      "Gas",
      "Battery"
    ]
  }

Expected behavior:
Only buildings including the words "Gas" or "Battery" -- such as Gas Vent (gasvent), Gas Pipe (gasconduit), and Jumbo Battery (batterymedium) -- should be colored by MaterialColor.

Observed behavior:
All of the buildings listed as 'affected' are also colored by MaterialColor.

Example 2

"TypeFilterInfo": {
    "Inclusive": false,  // false to exclude buildings 
    "ExactMatch": false, // true to match to exact bulding id
    "Rules": [
      "Tile",
      "Table",
      "Battery"
    ]
  }

Expected behavior:
All items will be colored by MaterialColor except tiles, mess tables, massage tables, and batteries.

Observed behavior:
Batteries are uncolored, but tiles and tables ('affected' buildings) are still colored.

Technical Details

MaterialColor was installed from Steam.
ONI version LU-372041
MaterialColor.dll reports file version 3.4.0.0, CRC-32: 1beab26f
All other mods were disabled for this testing.
However, there was no particular difference with this mod standalone vs in mod soup; the only buildings that behaved any differently were expected to (namely, drywall/tempshifts affected by Cairath's colored drywall mod).
output_log.txt

Thanks for such a detailed and clear issue!

I didn't expect filtering to receive much attention, but it clearly needed some. I fixed most of your concerns in the latest commit. Let me know if there is still something off (other than buildings not colored when they are not owned or disabled - I'm aware of that but I'm not sure how to fix it).

I will release it soon to the Steam Workshop, but I want to bundle it with some config adjustments.

tofof commented

Seems to work as expected now.

Thank you for even including a robust filtering system in your mod in the first place to let me control where not to apply the colors, and for such a quick turnaround!

Sometimes everything being copper/sandstone-orange in an early base is just too much, but I don't want to toggle the overlay because elsewhere the colors are invaluable for quickly noticing errors on temperature-sensitive builds like pumps or aquatuners, nice for aesthetics on flowerpots or statues, handy for color-coded storage bins, and so forth.