voult2 / BetterPawnControl

A RimWorld mod that allows bulk assignment of animals to zones and colonists to outfits (or drugs) in one single action
MIT License
21 stars 22 forks source link

Need better check for Work Tab mod #58

Open AJarOfDirt0 opened 1 month ago

AJarOfDirt0 commented 1 month ago

Some other mods have "Work Tab" in their name. This leads to an error message on startup. Instead of using Contains(), a better check would be appreciated to make sure that the real Work Tab mod is installed.

voult2 commented 1 month ago

In previous version of BPC, only the official Work Tab was checked. Then, after several users requests, the check was relaxed to contains() increase compatability with other WorkTab forks. If I'm provided a list of the Work Tabs should be checked it would be better.

khamseen commented 1 week ago

I was wondering why my log was popping up every time I launched with this active even though I no longer use Work Tab. It's obviously detecting Compact Work Tab.

Inglix commented 4 days ago

I suggest simply changing it from .Contains("Work Tab") to .StartsWith("Work Tab").

The two published forks for 1.5 are Work Tab 1.5 Temp and Work Tab - 1.5 Unofficial.

Using StartsWith would cover them both while not throwing errors for other mods that happen to contain "Work Tab" somewhere else in their name.