KittenApps / WCE

Wholesome Club Extensions (WCE) - enhancements for BC - fork of FBC 5.8
https://wce-docs.vercel.app
GNU General Public License v3.0
5 stars 3 forks source link

Non-player characters and `allowLayeringWhileBound` #11

Closed bananarama92 closed 5 months ago

bananarama92 commented 5 months ago

Heya, the allowLayeringWhileBound setting currently allows layering on both the player and non-player character, bypassing both the players restraints but also any locks that may or may not be present on the target (which, if actually locked, might otherwise prohibit the player from modifying the item). Is this intended behavior?

If not, I'd recommend refactoring Layering.Init hook a bit, re-expressing the Readonly override in terms of a Character.IsPlayer() check.

const ret = next(args);
// @ts-ignore
- Layering.Readonly = args[4] && !fbcSettings.allowLayeringWhileBound;
+ if (args[2].IsPlayer() && fbcSettings.allowLayeringWhileBound) {
+     Layering.Readonly = false;
+ }
KittenApps commented 5 months ago

Yea ... that's planned. R105 isn't live yet anyway and that currently is just a quick test, because I had to fix nested function support in WCE first.