(Request / idea) Expend Restrict with add / exclude functionality

Started by Noax, May 25, 2019, 06:16:13 PM

Previous topic - Next topic

Noax

While playing i ran into a problem with allowed areas which i had hoped would have been in the base game. But because of lack of modding skills (the c# code wouldn't be  the problem) i'm hoping someone with experience could create this.

Problem: You have area #1 , area #2 you want your pawn to access area #1 but not #2, currently you solve that by creating area #3 which you 'allow' area #1 but remove the allow part of area #2. The more zones you have the more complex this will become to maintain.
Solution: Add functionality with existing areas to add or remove them. White outline is added together, red outline is excluded.

The Current system (only 1 to select):


Add zones together by shift + clicking multiple zones:


Exclude zones by alt + clicking zones:


Combination of both:


When working out what the actual allowed zone is, add the allowed zones together and remove the restricted afterwards. This to prevent possibly adding restricted areas back in.

I tried looking into making a mod like this myself but cant seem to figure out the UI part of how to do the clicks.
I assume when setting the area you are manipulating the pawn.playerSettings.EffectiveAreaRestriction variable