minetest-mods / technic

Technic mod for Minetest
Other
145 stars 155 forks source link

Protector redo mod support for technic chests #542

Closed Sires0 closed 3 years ago

Sires0 commented 4 years ago

Probably there is a lot to improve but here is my first attempt. I added an extra "flavour" of chest: Protected chests. Those are accessible by members of the area when protector mod is being used. Its very useful for teams, when you don't want to make like 20 keys for each person and hope they can manage to remember which key is for which chest.

The code I used to make it compatible with protector was very generic and probably could be used to make it compatible with other protection mods.

auouymous commented 4 years ago

Thank you! I've wanted to write this very same patch for quite a while.

Instead of checking for the protector mod, just wrap with a setting to enable the chests. This allows it to work with any protection mod, including the areas mod. If the protector logo is compatible with technic's license, include it with the patch and give attribution, or just create a new image.

auouymous commented 4 years ago

This is a problem with locked chests as well, but neither show locked or protected on the formspec. The ones with configurable names do show it (unless renamed), but an iron chest simply says "Iron Chest" in upper left corner, for all three variants.

auouymous commented 4 years ago

Please add protector in mod.conf.

It should be made to work with any protection mod, including the areas mod.

Panquesito7 commented 4 years ago

It is added to depends.txt, it should be added to mod.conf either.

auouymous commented 4 years ago

I'm saying it shouldn't be in either depends.txt or mod.conf, and the code shouldn't check for the protector modpath. There should be a setting to manually enable or disable the protected chests to allow them to work with any protection mod.

SmallJoker commented 3 years ago

PR neglected and needs changes. Please open a new one that addresses the comments, or ask for re-opening this one here.