[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protection against entity placement #57

Open
CLtheman1 opened this issue Mar 13, 2022 · 2 comments
Open

Protection against entity placement #57

CLtheman1 opened this issue Mar 13, 2022 · 2 comments

Comments

@CLtheman1
Copy link
CLtheman1 commented Mar 13, 2022

Protecting areas from players being able to place entities in them should be something that this mod includes.

Note: This should include protection against the placement of entities from APercy's mods. I was told this was gonna be tricky.

@SmallJoker
Copy link
Member
SmallJoker commented Mar 25, 2022

Please specify the API function to overwrite. Protection mods have no control about entity placement and rely on calls from (or to) the mob mod's API.

@S-S-X
Copy link
S-S-X commented Jun 2, 2022

Copy pasting my opinion here from another protection mod:

This should be done by doing minetest.is_protected(pos, name) on mod that is placing, digging, building, whatever.
Protector mods should not allow or prevent any specific actions by themselves.

Minetest engine documentation for protection check:

  • minetest.is_protected(pos, name): returns boolean
    • Returning true restricts the player name from modifying (i.e. digging,
      placing) the node at position pos.
    • name will be "" for non-players or unknown players.

@CLtheman1 have you tried to open issue about this in APercy's mods issue tracker?
If not yet I would recommend doing that even if implementation would end up into protection mod(s).

This should include protection against the placement of entities from APercy's mods. I was told this was gonna be tricky.

This should be fairly simple thing to implement in mod that adds those entities but implementing and maintaining it in protection mod will be tricky and fragile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants