[Mod] Protector [protector]
It seems that cactus, tree blocks and doors can be placed in a protected areas without any problems, any idea why ??
Last edited by TenPlus1 on Sun Feb 16, 2014 09:57, edited 1 time in total.
Their seems to be a bug when adding a name to the protector block, once you add the name you cannot exit the interface properly, it keeps reappearing even after spamming the ESC key... Could you add a BACK button like your other mods please ?
NOTE: I've managed to fix the above problem by adding my own BACK button to the init.lua file, please find it attached...
NOTE: I've managed to fix the above problem by adding my own BACK button to the init.lua file, please find it attached...
- Attachments
-
[The extension lua has been deactivated and can no longer be displayed.]
Last edited by TenPlus1 on Sun Feb 16, 2014 14:20, edited 1 time in total.
- Achilles
- Member
- Posts: 247
- Joined: Sun Dec 15, 2013 11:55
- In-game: Achilles
- Location: Excuse Me???? -_-
Erm... When i kept placing a normal cobblestone block on someones protected area in order get to the top of their house, The cobblestone block i kept placing at the start stayed in there protected area. When i tried to remove the cobble block it just said 'This are is owned by .....'. I don't know if this is a bug or what.
The Ironic Thing About Common Sense Is That It Isn't Very Common
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
Was the cobblestone a stair/slab?Achilles wrote:Erm... When i kept placing a normal cobblestone block on someones protected area in order get to the top of their house, The cobblestone block i kept placing at the start stayed in there protected area. When i tried to remove the cobble block it just said 'This are is owned by .....'. I don't know if this is a bug or what.
is their a way to stop users from placing rotatable blocks in this mod as things like doors, tree and stairs get through the protection... Water especially because griefers tend to water bomb protected areas for a laugh...
This is the current init.lua for the mod that I'm testing with if it helps anyone...
This is the current init.lua for the mod that I'm testing with if it helps anyone...
- Attachments
-
[The extension lua has been deactivated and can no longer be displayed.]
Last edited by TenPlus1 on Wed Apr 09, 2014 19:11, edited 1 time in total.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
How about fixing the bucket? There were serval fixes in minetest_game about those things.TenPlus1 wrote:is their a way to stop users from placing rotatable blocks in this mod as things like doors, tree and stairs get through the protection... Water especially because griefers tend to water bomb protected areas for a laugh...
This is the current init.lua for the mod that I'm testing with if it helps anyone...
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
- CraigyDavi
- Member
- Posts: 582
- Joined: Sat Aug 10, 2013 13:08
- GitHub: davisonio
- IRC: davisonio
- In-game: CraigyDavi
- Location: Hampshire, UK
- Contact:
Xanadu server has been changed so that water buckets cannot be placed around protector nodes and that includes the players nodes... A quick fix for now but it would be handy of Zeg would update this mod to use minetest's minetest.is_protected feature and cut the userlist down to 1 page for the protector blocks (we dont need that many ppl added)...
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
I had some free time and made a merge/pull request.
Tested the new codes with git-minetest_game, works.
Tested the new codes with git-minetest_game, works.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
https://github.com/minetest/minetest_ga ... t/init.luaTenPlus1 wrote:Thanks for the changes Krock, worked fine although I did keep my formspec layout (easier to use with a back button)... Now we just gotta sort the rotatable objects and water buckets getting through protection... hrm...
Override with your bucket/init.lua and you get empty buckets back after a failed placing-try.
Rotateable objects is moreblocks? Somewhere else? just add
Code: Select all
if minetest.is_protected(node_pos, player_name)
return
end
https://github.com/minetest/minetest/bl ... s.lua#L285
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
I just noticed that the new minetest bucket mod already has this included (and it still allows liquids to be placed in protected aread):
Code: Select all
local function check_protection(pos, name, text)
if minetest.is_protected(pos, name) then
minetest.log("action", (name ~= "" and name or "A mod")
.. " tried to " .. text
.. " at protected position "
.. minetest.pos_to_string(pos)
.. " with a bucket")
minetest.record_protection_violation(pos, name)
return true
end
return false
end
Maybe there's a bug in the protection mod?TenPlus1 wrote:I just noticed that the new minetest bucket mod already has this included (and it still allows liquids to be placed in protected aread):
'Cause misc.lua contains only this:
Code: Select all
function minetest.is_protected(pos, name)
return false
end
Last edited by 4aiman on Fri Apr 11, 2014 12:17, edited 1 time in total.
Re: [Mod] Protector [protector]
Here is an idea.
Instead of doing a search for a block in an area why not check one spot. There are two ways this can be done.
Dynamic Y
For dynamic y values, where they can be anything, At -90000 have new blocks be made. Lets call these blocks Protect_Stone. These Protect_Stone blocks would fill the -90000 area equal to that of the area the player places the block in. Say the area is 5x5x5. Using some code from world edit a 5x5x5 area placed at the (players y value)-90000. So now when a player tries to dig up a block the check is just Y-90000 instead of check almost every block in a 5x5x5 area.
Finite Y values
Another way to do is is to have a y value range say -100 to +100 be protected. If the player places a block at a y value of 50 then they get a y value protected area of -100 to +100. I do not mean -150 and +150, the y value of the placement of the block only determines what y value chunk they get. Then using a mod function or so the system just needs to check a -90000 + number block. ranges -100 to +100 get -90000, and then -300 to -101 get -90001. Instead of filling up a large space it is just a row of blocks in the x,z range that are filled.
Thought this might help performance wise.
Instead of doing a search for a block in an area why not check one spot. There are two ways this can be done.
Dynamic Y
For dynamic y values, where they can be anything, At -90000 have new blocks be made. Lets call these blocks Protect_Stone. These Protect_Stone blocks would fill the -90000 area equal to that of the area the player places the block in. Say the area is 5x5x5. Using some code from world edit a 5x5x5 area placed at the (players y value)-90000. So now when a player tries to dig up a block the check is just Y-90000 instead of check almost every block in a 5x5x5 area.
Finite Y values
Another way to do is is to have a y value range say -100 to +100 be protected. If the player places a block at a y value of 50 then they get a y value protected area of -100 to +100. I do not mean -150 and +150, the y value of the placement of the block only determines what y value chunk they get. Then using a mod function or so the system just needs to check a -90000 + number block. ranges -100 to +100 get -90000, and then -300 to -101 get -90001. Instead of filling up a large space it is just a row of blocks in the x,z range that are filled.
Thought this might help performance wise.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: [Mod] Protector [protector]
@Nubelite, it's a nice idea but how to place blocks at Y -90000? The Y limit is at -31800 or somewhat
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: [Mod] Protector [protector]
thought that was just the map size. didn't realize block placement was disabled for past it.
-
- New member
- Posts: 8
- Joined: Mon May 26, 2014 11:12
- In-game: subham
Re: [Mod] Protector [protector]
wht does this mode do pls tell me
-
- New member
- Posts: 8
- Joined: Mon May 26, 2014 11:12
- In-game: subham
Re: [Mod] Protector [protector]
what does this mode do
Re: [Mod] Protector [protector]
See the 1st post. The 1st post of mod releases describes what a mod does, most of the times there are also screenshots and crafting recipes in it.Thedarksoldier wrote:what does this mode do
"As glomie's mod, it protects 5 blocks in all 6 directions."
So you place a protector block. Then other players cannot dig or place 5 nodes (blocks), under, above, in front, at the back, to the left or to the right of it and the diagonals.
Edit: Removed double pasting.
Edit2: Diagonals
Re: [Mod] Protector [protector]
Please find attached a reworked version of Protector mod re-written to work with Minetest 0.4.9...
Changes:
Changes:
- Now protects against tree, cactus, doors, liquid buckets and rotatable objects
- Protector Stick removed, hold a Protector block and left-click for area information
- Right-clicking Protector block allows shared name entry for an area, now has BACK button
- Punching Protector block shows protection field in pink, disappears after 10 seconds
- Users with 'delprotect' privs no longer have to hold down sneak in order to change protected blocks.
- Attachments
-
- protector(jkredo).zip
- (4.83 KiB) Downloaded 108 times
Who is online
Users browsing this forum: No registered users and 17 guests