searica / MoreVanillaBuildPrefabs

GNU General Public License v3.0
2 stars 1 forks source link

feature: ward support for MVBP containers #10

Open nbusseneau opened 1 month ago

nbusseneau commented 1 month ago

Hey,

The vanilla containers that MVBP allows to build (e.g. TreasureChest_dvergrtown) are not protected by active wards: visitors in a base without ward access can still interact with them.

It would be great if user-placed containers would be properly protected by wards 😄

searica commented 1 month ago

Hey, thanks for the report. That's a holdover from before I figured out how to persistently alter only player built pieces without affecting world generated ones. MVBP already patches containers so I just added some code to alter player built containers to check for a Ward, the effect should apply retroactively to chests you have built before and persist after removing MVBP (which means it also works for players without MVBP). World-generated chests should be unaffected. Of course if you use something like server_devcommands to build things without setting a creator then those chests count as world-generated ones and will not check for wards (as per vanilla behaviour).

I'll include the changes in the next update, as I'm still sorting out some other compatibility and optimization stuff.

nbusseneau commented 1 month ago

Sounds good, let me know if you need me to test or something.