[Mod] Protector Redo [2.6] [protector]

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

[Mod] Protector Redo [2.6] [protector]

by TenPlus1 » Thu May 29, 2014 09:37

Zeg's Protector mod has been around for a while and works really well, although the odd block does get through it's protection and the screwdriver tool still rotates protected nodes, so I reworked the mod to use Minetest 0.4.9's is_protected function so that nothing can slip by this protection mod...

Image

Download: https://notabug.org/TenPlus1/protector/archive/master.zip

Source: https://notabug.org/TenPlus1/protector

License: MIT

Lucky Blocks: 10

Usage:
  • Placing a Protector protects a defined area around itself (set by protector.radius in init.lua)
  • Also protects signs from other people changing text and using screwdriver to rotate nodes
  • Punching a Protector shows protected area as a coloured field and disappears after 10 seconds
  • Using a Protector as a tool shows information on that area to see if someone already owns it
  • Right-clicking a Protector allows you to share the area with other users, enter nick (exactly) and hit enter
  • Users with 'protection_bypass' privelage can bypass protection which is handy for admin
  • This mod is a drop-in replacement for current Protector mod by Zeg9

Also available are:
  • Protection Logo's (can be placed around your build without looking out of place)
  • Protected Wood and Steel Doors (only players on list can open)
  • Protected Chests (as above, only players on list can access chest)

Crafts:
+ Spoiler


Settings:
+ Spoiler
Last edited by TenPlus1 on Tue Jul 03, 2018 13:34, edited 86 times in total.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47
 

Sokomine
Member
 
Posts: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: Protector mod Redo

by Sokomine » Thu May 29, 2014 13:43

Nice picture :-) And good to see that the protector mod's beeing modernized. I personally still prefer the areas mod, but for small buildings, protector is far less complicated and easier to use for players.
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
Location: Netherlands
GitHub: bas080
IRC: bas080
In-game: bas080

Re: Protector mod Redo

by Bas080 » Thu May 29, 2014 15:52

This is great. Keeping the good mods good, even making them beter!
 

User avatar
philipbenr
Member
 
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
Location: United States
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi

Re: Protector mod Redo

by philipbenr » Thu May 29, 2014 23:38

I like the mod TenPlus1. And the screenshot. ;)
 

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

Re: Protector mod Redo

by Krock » Fri May 30, 2014 13:53

Ah nice. I did the same a while again, just not that official.
Good to have a new version now.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Protector mod Redo

by TenPlus1 » Sun Jun 15, 2014 08:17

Thanks folks :) I've just added a new update to help hide the protection a little better...
 

User avatar
Calinou
Moderator
 
Posts: 3145
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: Protector mod Redo

by Calinou » Sun Jun 15, 2014 19:44

What's the license? I'm interested for inclusion in Carbone, I've been looking for a simple protection mod like that.

You'll need to put up some license in order for this mod to be moved to Mod Releases. If you don't care about what people can do with the mod, release it under CC0.

As for the privilege name, I'd appreciate if there was an universal privilege for accessing locked containers as well as protected nodes. How about “access”?
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Protector mod Redo

by TenPlus1 » Mon Jun 16, 2014 19:56

This mod is released under WTFPL license...

As for the 'locked' privelage, all of the locked items involved would have to be changed in some way to make this happen... e.g. If user != owner then NO, else if privelage = locked then YES... sorta thing in each locked chest, door etc.
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [mod] Protector Redo (0.5)

by TenPlus1 » Tue Sep 02, 2014 09:11

Protection radius can now be changed using protector.radius variable in init.lua, default is 5...
 

boo09
New member
 
Posts: 1
Joined: Mon Sep 22, 2014 19:09
 

User avatar
Calinou
Moderator
 
Posts: 3145
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: [mod] Protector Redo (0.5)

by Calinou » Mon Sep 22, 2014 21:17

TenPlus1 wrote:Protection radius can now be changed using protector.radius variable in init.lua, default is 5...


I suggest increasing it, right now you need to spam it quite a bit to cover large buildings.

Carbone uses 12 radius, which translates to a 25³ box. This is what PreciousStones (a CraftBukkit plugin) used for gold blocks and it was a smart choice there.
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [0.6] [protector]

by TenPlus1 » Fri Oct 03, 2014 17:17

ADDED: Protected Doors (steel and wood) and Protected Chests that only players listed on Protection Nodes can open...
 

User avatar
digitalmouse
Member
 
Posts: 25
Joined: Sat Sep 20, 2014 18:26
Location: Copenhagen, Denmark
In-game: digitalmouse

Re: [Mod] Protector Redo [0.6] [protector]

by digitalmouse » Sun Oct 26, 2014 11:57

Looks cool, and trying it out now on my little Pi server. You don't say it explicitly, but are the areas protected only flat planes? or (like in WorldEdit) can I specify a cuboid/3-dimensional space to protect?

And lastly, do the markers remain visible for everyone? (unless there is a hide marker option i missed seeing in the old Zeg docs). Would look kinda weird of the land was filled with a bunch of little protector markers. :D

Otherwise, good job!
Minetest experimental server running on 900Mhz Raspberry Pi: pi.god.jp:30000
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [0.6] [protector]

by TenPlus1 » Sun Oct 26, 2014 16:40

If area protection is set to 5 (default) then 5 blocks all around the protection node (up/down, left/right, back/forward) is protected... You can punch the protector to see the purple field of the area protected also...

Protection blocks are simple to use and easy to see but the protection logo is a lot smaller and blends in a little better with it's background (copper ingot surrounded by stone)...
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [0.6] [protector]

by TenPlus1 » Sun Oct 26, 2014 16:48

On popular request I've remade the Item Frame mod so that it works with Protector Redo... Instead of frames and pedestals having owners, anyone can remove or place an item within but if inside a protected area then only the players listed in the protector node can access them...

Download below:
Attachments
itemframes(protector).zip
(3.33 KiB) Downloaded 77 times
 

Rochambeau
Member
 
Posts: 106
Joined: Tue Sep 23, 2014 11:37

Re: [Mod] Protector Redo [0.6] [protector]

by Rochambeau » Tue Dec 09, 2014 20:06

Could you add the function, that no hostile mobs spawn in protected areas?
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [0.6] [protector]

by TenPlus1 » Wed Dec 10, 2014 09:09

This isn't a function for protector mod, it has to be placed inside the mobs mod you are using, e.g. for Mobs Redo, edit the api.lua file and add the following after line:794
Code: Select all
-- Check if protected area using bogus name so mobs will not spawn
if minetest.is_protected(pos, "-") then
   return
end


Update: this feature has been added to latest Mobs Redo...
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [0.7] [protector]

by TenPlus1 » Fri Feb 13, 2015 19:20

Added new "To Inventory" and "To Chest" buttons so players can quickly copy everything across in 1-click... Also chests can now be named so you know what's inside just by hovering over it...

Image
 

Miner59
Member
 
Posts: 46
Joined: Mon Sep 22, 2014 19:14

Re: [Mod] Protector Redo [0.7] [protector]

by Miner59 » Sun Mar 01, 2015 22:32

Hi,
what can be really annoying is, when you hided your protection blocks somewhere and you need to find it again.
And it's extremely annoying when you set protector.radius too something like 15. :-)
Can you maybe add another line, where the location of the protection block is printed in the chat, when you punch an area with a protection block. I think this would be very useful sometimes. Here's my suggestion:

Code: Select all
               minetest.chat_send_player(whois,"This area is owned by "..meta:get_string("owner")..".")
               if meta:get_string("members") ~= "" then
                  minetest.chat_send_player(whois,"Members: "..meta:get_string("members")..".")
               end

--my suggestion is to add following line. It occurs 2 times, second time with position[1] instead of pos.
               minetest.chat_send_player(whois,"Protection block is located at: "..minetest.pos_to_string(pos))


Maybe only print it if you're the owner of the protection block or for admins, but I would print it everytime.
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [0.7] [protector]

by TenPlus1 » Mon Mar 02, 2015 09:04

Miner59: feature added... thanks for suggestion...
 

Kilarin
Member
 
Posts: 681
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Protector Redo [0.7] [protector]

by Kilarin » Tue Mar 03, 2015 23:31

TenPlus1 wrote:
Miner59 wrote:Maybe only print it if you're the owner of the protection block or for admins, but I would print it everytime.
Miner59: feature added... thanks for suggestion...

Oh YES! Just tested this in Xanadu, and this is GREAT!
 

User avatar
fireglow
Member
 
Posts: 93
Joined: Fri Mar 28, 2014 11:36
Location: Germany
IRC: fireglow
In-game: fireglow
 

freakedenough
Member
 
Posts: 12
Joined: Mon Mar 23, 2015 19:59

Re: [Mod] Protector Redo [0.7] [protector]

by freakedenough » Sun Mar 29, 2015 20:04

Stairs can't be placed upside-down when this mod is enabled..why?

Is there another one that works?
 

User avatar
TenPlus1
Member
 
Posts: 2320
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Protector Redo [0.7] [protector]

by TenPlus1 » Mon Mar 30, 2015 19:24

freakedenough: very strange indeed, stairs work fine with my own stairs mod but the build-in stairs wont rotate the stair upside-down... will look into it... thanks for letting me know...

Update: Minetest's built in stairs mod uses abm's to rotate stairs and slabs, but using this minimal version with rotate on place in effect it works fine with protector mod...

Unzip inside mods directory and enable 'stairs' for your world to replace built-in stairs mod and all should run fine :)
Attachments
stairs_min.zip
(1.13 KiB) Downloaded 60 times
Last edited by TenPlus1 on Tue Mar 31, 2015 21:26, edited 1 time in total.
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 8 guests