[Mod] Protector Redo [2.0] [protector]

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

[Mod] Protector Redo [2.0] [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://github.com/tenplus1/protector/archive/master.zip

Source: https://github.com/tenplus1/protector

License: MIT

Lucky Blocks: 6

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 5 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 'delprotect' 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

Changelog:
+ Spoiler

Settings:
+ Spoiler
Last edited by TenPlus1 on Tue Nov 22, 2016 11:16, edited 73 times in total.
 

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

Re: Protector mod Redo

by 4aiman » Thu May 29, 2014 11:23

+1
 

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

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
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: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: Protector mod Redo

by philipbenr » Thu May 29, 2014 23:38

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

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
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.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
TenPlus1
Member
 
Posts: 1874
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
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
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: 1874
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: 1874
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

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

by boo09 » Mon Sep 22, 2014 19:17

Ten how do until add it on kindle???
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
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: 1874
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
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: 1874
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: 1874
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 198 times
 

Rochambeau
Member
 
Posts: 68
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: 1874
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
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 1874
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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 1874
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: 649
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: 72
Joined: Fri Mar 28, 2014 11:36
IRC: fireglow
In-game: fireglow

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

by fireglow » Sun Mar 08, 2015 12:05

Big thanks for this updated mod!
 

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: 1874
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 145 times
Last edited by TenPlus1 on Tue Mar 31, 2015 21:26, edited 1 time in total.
 

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

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

by freakedenough » Tue Mar 31, 2015 06:54

Ive tried it. But it wont work with bakedclay mod
viewtopic.php?id=8890

error:
[code][/-------------
Separator
-------------

Irrlicht log: Irrlicht Engine version 1.8.1
Irrlicht log: (Build 9200)
Irrlicht log: Using renderer: OpenGL 4.0.0
Irrlicht log: Intel(R) HD Graphics 4000: Intel
Irrlicht log: OpenGL driver version is 1.2 or better.
Irrlicht log: GLSL version: 4.0
Irrlicht log: Resizing window (800 600)
08:52:55: ERROR[main]: ========== ERROR FROM LUA ===========
08:52:56: ERROR[main]: Failed to load and run script from
08:52:56: ERROR[main]: C:\Users\Admin\Desktop\minetest-0.4.12\bin\..\games\minetest_game\mods\bakedclay\init.lua:
08:52:56: ERROR[main]: ...Desktop\minetest-0.4.12\bin\..\builtin\game\register.lua:60: Name stairs:stair_bakedclay_white does not follow naming conventions: "modname:" or ":" prefix required
08:52:56: ERROR[main]: stack traceback:
08:52:56: ERROR[main]: [C]: in function 'error'
08:52:56: ERROR[main]: ...Desktop\minetest-0.4.12\bin\..\builtin\game\register.lua:60: in function 'check_modname_prefix'
08:52:56: ERROR[main]: ...Desktop\minetest-0.4.12\bin\..\builtin\game\register.lua:96: in function 'register_item'
08:52:56: ERROR[main]: ...Desktop\minetest-0.4.12\bin\..\builtin\game\register.lua:161: in function 'register_node'
08:52:56: ERROR[main]: ...t-0.4.12\bin\..\games\minetest_game\mods\stairs\init.lua:5: in function 'register_stair'
08:52:56: ERROR[main]: ...t-0.4.12\bin\..\games\minetest_game\mods\stairs\init.lua:63: in function 'register_stair_and_slab'
08:52:56: ERROR[main]: ....4.12\bin\..\games\minetest_game\mods\bakedclay\init.lua:49: in main chunk
08:52:56: ERROR[main]: ======= END OF ERROR FROM LUA ========
08:52:56: ERROR[main]: Server: Failed to load and run C:\Users\Admin\Desktop\minetest-0.4.12\bin\..\games\minetest_game\mods\bakedclay\init.lua
08:52:56: ERROR[main]: ModError: ModError: Failed to load and run C:\Users\Admin\Desktop\minetest-0.4.12\bin\..\games\minetest_game\mods\bakedclay\init.luacode]
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

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

by Evergreen » Tue Mar 31, 2015 19:11

This error doesn't have anything to do with the protector mod, it appears the error is coming from a 'bakedclay' mod.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

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

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

by TenPlus1 » Tue Mar 31, 2015 20:59

Re-download the stairs_min.zip file and unpack stairs into mod folder, it should work fine this time around...
 

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

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

by TenPlus1 » Wed Apr 01, 2015 10:17

Update: Protector Redo 0.8 released which now works with Minetest 0.4.12, will leave a download link below for 0.7 to run on previous minetest versions...
Attachments
protector_redo(0.7).zip
(14.51 KiB) Downloaded 132 times
 

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

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

by TenPlus1 » Mon Apr 27, 2015 07:18

Quick notice: An overlap bug was fixed in the latest Protector Redo and I would advise anyone using this mod to install the latest version from the front page...
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 4 guests

cron