[Mod] Simple protection [simple_protection]

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Simple protection [simple_protection]

by Krock » Post

BirgitLachner wrote:Can the user claim as many areas as he wants? Would be nice, if I can restrict it as admin ... lets say to 5 areas per player.
Currently there's no way to limit this - The players can claim as many areas they want. But each area costs again some materials, so remember that they will not get protected space for free.
Usually it's enough to call "/area unclaim" to free an area that is not used for a long time.
BirgitLachner wrote:So, who is able to enable this? Only the admin in the config-file or every player for his own area?
Uncomment the two lines in init.lua#L37-L38 to take one HP from the player each time he tries to dig into a protected area. The area owners can not change this behaviour individually - it is handled the same way for all areas. Feel free to change the damage value of 1 to smoething higher if necessary.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
AccidentallyRhine
Member
Posts: 252
Joined: Sun Aug 02, 2015 05:43

Re: [Mod] Simple protection [simple_protection]

by AccidentallyRhine » Post

Krock wrote:Uncomment the two lines in init.lua#L37-L38 to take one HP from the player each time he tries to dig into a protected area. The area owners can not change this behaviour individually - it is handled the same way for all areas. Feel free to change the damage value of 1 to smoething higher if necessary.
Nice! I can't believe I overlooked this. Now players will be discouraged from "phasing" through walls. I've had a breaking and entering problem on my server for some time now.

I still have one practical issue with simple protection and the answer is probably buried somewhere but: How can an admin clear a claimed area that belongs to a normal user?

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Simple protection [simple_protection]

by Krock » Post

AnxiousInfusion wrote:How can an admin clear a claimed area that belongs to a normal user?
Simply walk into the area and use the command "/area unclaim". It will unclaim the current area either when you're the owner or when you've got the "simple_protection" privilege. Code reference
I've also opened an issue to add the parameter "all", to unclaim all areas at once. Will add it ASAP.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
AccidentallyRhine
Member
Posts: 252
Joined: Sun Aug 02, 2015 05:43

Re: [Mod] Simple protection [simple_protection]

by AccidentallyRhine » Post

Thanks for the link, it helped me figure out the problem.

So I don't know if I grabbed an outdated build or if I accidentally hit a key while tinkering but a stray "s" found its way behind the local "priv" variable in line 231. Deleted it and all is working now.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] Simple protection [simple_protection]

by Fixer » Post

I like simplicity of the mod :)

User avatar
AccidentallyRhine
Member
Posts: 252
Joined: Sun Aug 02, 2015 05:43

Re: [Mod] Simple protection [simple_protection]

by AccidentallyRhine » Post

16 bit style image for the claim stick if anybody wants:
Attachments
simple_protection_claim.png
simple_protection_claim.png (129 Bytes) Viewed 1090 times

ektor
Member
Posts: 79
Joined: Sat Sep 24, 2016 11:59
IRC: dtarcz
In-game: ektor
Contact:

Re: [Mod] Simple protection [simple_protection]

by ektor » Post

HI Krock It's look very easy to use ! In my server I have installed the mod areas, but seems that players don't like to use it, or don't understand the command line... I don't know.
Is it possible to have those both two mods installed together ?
Vive Minetest!

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Simple protection [simple_protection]

by Krock » Post

ektor: I totally missed this question - sorry for that. Right now, the support for running another protection mod parallel to simple_protection is quite poor and buggy. Differently protected areas could intersect and lock out both owners inside that area. This means, both owners would have to give the other player edit access of that area.
In short: No, it's not recommended to use another protection mod in parallel to this one. I'm surprised that the players don't seem to figure out how the commands work, as they're properly explained.

Update Information

As of commit 2cdb431
  • The claim_to_dig setting now works how it should
  • The privilege 'simple_protection' is now checked before anything area-specific, which guarantees access to all locations
  • Warning/Information messages about insufficient permission are now more detailed
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Simple protection [simple_protection]

by texmex » Post

Hey Krock, now with mod storage in place, does this makes limiting the amount of claims per player any easier to code?

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Simple protection [simple_protection]

by AntumDeluge » Post

I don't care how popular areas mod gets, simple_protection is my favorite protection mod. I need simple protection because I run a private server for my young kids. Thank you for the AWESOME mod.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Simple protection [simple_protection]

by Krock » Post

texmex wrote:does this makes limiting the amount of claims per player any easier to code?
It's about the same effort in the mod storage as with the current plain text method. The only profit in the mod storage would be the ability of saving the number of claims per user directly, instead of iterating through the claims table. But as this function is only used when claiming an area, this speed gain doesn't matter much.
AntumDeluge wrote:I need simple protection because I run a private server for my young kids. Thank you for the AWESOME mod.
I'm trying keep the area handling easy - so it's nice to see that your kids understand how it works. With the freshly introduced "/area radar" feature, they might also be able to find free areas faster than before. For questions of problems you may also write an issue on GitHub, which I tend to read and answer faster than forum messages. ;)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Simple protection [simple_protection]

by texmex » Post

Krock wrote:
texmex wrote:does this makes limiting the amount of claims per player any easier to code?
It's about the same effort in the mod storage as with the current plain text method. The only profit in the mod storage would be the ability of saving the number of claims per user directly, instead of iterating through the claims table. But as this function is only used when claiming an area, this speed gain doesn't matter much.
I described the request poorly, sorry. I meant if it would be any easier or less costly to implement the feature of automatically removing the oldest claim when making a new pne outside the player limit.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] Simple protection [simple_protection]

by Fixer » Post

If only optional and disabled by default, since players largely will don't know about this and think they have infinite claims and erase old ones.

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] Simple protection [simple_protection]

by Stix » Post

Perhaps in addition to chat commands you should have a command "/areas" that brings up a formspec for easy management of claimed area's?
Hey, what can i say? I'm the bad guy.

EternalStoic
New member
Posts: 2
Joined: Sat Aug 26, 2017 16:01

Re: [Mod] Simple protection [simple_protection]

by EternalStoic » Post

Does Simple Protection have the ability to prevent mobs from spawning in a claimed area?

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Simple protection [simple_protection]

by AntumDeluge » Post

EternalStoic wrote:Does Simple Protection have the ability to prevent mobs from spawning in a claimed area?
I don't know about simple_protection, but I believe that mobs_redo has a setting that prevents mobs from spawning on protected nodes, which should work with simple_protection.

EternalStoic
New member
Posts: 2
Joined: Sat Aug 26, 2017 16:01

Re: [Mod] Simple protection [simple_protection]

by EternalStoic » Post

AntumDeluge wrote:
EternalStoic wrote:Does Simple Protection have the ability to prevent mobs from spawning in a claimed area?
I don't know about simple_protection, but I believe that mobs_redo has a setting that prevents mobs from spawning on protected nodes, which should work with simple_protection.

Thanks. I'll give those a try and see what I can come up with.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Simple protection [simple_protection]

by Krock » Post

Update time & Poll

Image
Shared Chest, nothing special but a must-have in protection mods.

Image
Radar: A minimap-like area overview for claimed areas by simple_protection (only).

Other changes
Possible future regression fix for mods using empty player name "".
Crash fixes for "nil" players
More helpful README
Setting s_protect.underground_claim is now integrated into underground_limit
Translation updates (german only, for now)
Fresh and up-to-date main topic
Commits visible here


Something missing or wrong?
If you have a question, found a problem or got an idea which can help players: get your keyboard ready and write an issue or post it below.

Poll: Only takes a minute to select the boxes you agree with: http://www.strawpoll.me/14074891
Attachments
chest_preview.png
chest_preview.png (48.85 KiB) Viewed 1090 times
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
cx384
Member
Posts: 653
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Simple protection [simple_protection]

by cx384 » Post

Krock wrote: Image
Radar: A minimap-like area overview for claimed areas by simple_protection (only).
Nice idea!
It lock like well known a minecraft protection mod.
Can your read this?

amadin
Member
Posts: 549
Joined: Tue Jun 16, 2015 16:23

Re: [Mod] Simple protection [simple_protection]

by amadin » Post

.
Last edited by amadin on Wed Dec 18, 2019 19:15, edited 1 time in total.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Simple protection [simple_protection]

by Krock » Post

amadin wrote:Do you plan add protection falling through hole due to lag as in Protector redo [...] and flip for players who dig inside a protected area [...]
I've seen the player view flip feature, but did not copy this idea yet because I personally do not like it. It distracts a lot (in PvP) when hitting something easily breakable by accident. However, if you would like to have it in this mod too, I can surely add a new setting to make this possible.

The falling node issue is something which should be fixed in the Minetest engine, rather than letting mods patch the falling node manually by overwriting its "on_step" callback.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

amadin
Member
Posts: 549
Joined: Tue Jun 16, 2015 16:23

Re: [Mod] Simple protection [simple_protection]

by amadin » Post

I think without falling node protection not need to add player view flip feature.

amadin
Member
Posts: 549
Joined: Tue Jun 16, 2015 16:23

Re: [Mod] Simple protection [simple_protection]

by amadin » Post

Or need to add player view flip feature :)

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Simple protection [simple_protection]

by Krock » Post

Today's updates:
Client-side translations
Minetest 5.0.0+ is required
register_on_access callback for mods to override or extend the protection functionality
Slightly better looking main topic.. still doesn't look so good.

Plans:
Include support for mods that group players (teams/classes). This can already be implemented using the current API but I will need to look into the other mods to check whether they offer the required API functions.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Linuxdirk
Member
Posts: 3218
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Simple protection [simple_protection]

by Linuxdirk » Post

Krock wrote:Radar: A minimap-like area overview for claimed areas by simple_protection (only).
Wow, that's a new one in protection mods. Nice job!

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests