[Mod] Protector Redo [2.0] [protector]

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

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

by amadin » Sun Oct 23, 2016 06:04

It does not prevent you to use colored glass blocks in a cblocks mod even more bug.

Image

For me the problem with transparent protector logo is not serious.
Attachments
screenshot_20161023_085700.png
screenshot_20161023_085700.png (425.97 KiB) Viewed 4368 times
 

auouymous
Member
 
Posts: 88
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

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

by auouymous » Sun Oct 23, 2016 08:15

amadin wrote:It does not prevent you to use colored glass blocks in a cblocks mod even more bug. For me the problem with transparent protector logo is not serious.


Not a bug, just a missing feature in minetest. It could easily sort map blocks near to far and draw opaque geometry, then sort them far to near and draw semi-transparent geometry. That solves a lot of alpha rendering issues, and depth peeling (harder) would solve the rest.
 

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

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

by TenPlus1 » Wed Nov 02, 2016 17:09

Updated to version 1.9

- Changed 'protector_pvp_spawn' setting to 'protector_spawn' so that server owners can protect area around static spawnpoint by setting a value above 0.
- Tweaked and tidied code
 

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

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

by TenPlus1 » Tue Nov 22, 2016 11:18

Updated to version 2.0

- Added protector placement tool which lets players stand on a protector, face in a direction and place a new one using protector.radius to protect a larger area a lot more easily :) thanks Shara.
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox

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

by firefox » Tue Nov 22, 2016 13:04

TenPlus1 wrote:Updated to version 2.0

- Added protector placement tool which lets players stand on a protector, face in a direction and place a new one using protector.radius to protect a larger area a lot more easily :) thanks Shara.

woooooooot =(0.0)=

+100
 

User avatar
iska
Member
 
Posts: 29
Joined: Thu Apr 23, 2015 17:19
In-game: iska

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

by iska » Sat Nov 26, 2016 12:59

TenPlus1 wrote:Updated to version 2.0

- Added protector placement tool which lets players stand on a protector, face in a direction and place a new one using protector.radius to protect a larger area a lot more easily :) thanks Shara.


Hi Ten!

Just tested the new tool on local server, very impressive, we gonna love it so much, thanks Shara and TenPlus1! :)

Suggestions for improving:
Copy added players from original protection to newly created prots
Add vertical support for people with fly priv (makes sense?)
Maybe add 45 degree angles?
Any chance of adding logo-support?
 

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

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

by TenPlus1 » Thu Dec 29, 2016 18:11

Update:

- Admin commands renamed to /protector_remove and /protector_replace
 

Codesound
Member
 
Posts: 49
Joined: Thu Jun 09, 2016 14:56

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

by Codesound » Fri Jan 06, 2017 09:49

Hi,

sorry for my incompetence
, but I can not understand how to use this mod...
I would use it to protect the spawnpoint of my server and protect specific areas of my level....

- I simply placed the "protection Block" (to protect my area), (image 001);
- Right click on this "protection Block" to add my user name: no one except "username" can break anything in this area... (or not......? image 002);
- If I add another player name on this block, ie "Test 2", also Test 2 can break in this area... is correct?
- to modify the range of this area, I simply modified the "minetest.info"......

............... but certainly all wrong..........
anyone can help me understand how to use this mod?

Thanks for your support

R
Attachments
002.png
002.png (182.85 KiB) Viewed 4368 times
001.png
001.png (203.17 KiB) Viewed 4368 times
 

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

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

by TenPlus1 » Fri Jan 06, 2017 10:37

Hi Codesound, placing a protector automatically has you as it's owner, so no-one can break or add anything to the area it protects (shown by the purple field when you punch it)... You can right-click the protector and add other players to the list so they can change that area also :)

If you are looking to protect a large spawn area then the mod has a setting you add to minetest.conf (usually for servers) which does just that:

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
# set spawn point to 0,10,0
static_spawnpoint = 0,10,0
# protect 100 blocks around spawn
protector_spawn = 100


.. for more information check out the readme.md file:
https://github.com/tenplus1/protector/b ... /README.md
 

Codesound
Member
 
Posts: 49
Joined: Thu Jun 09, 2016 14:56

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

by Codesound » Fri Jan 06, 2017 13:06

Hi,

I'm stupid!!! I try this mod on my server with others 3 players with all permissions.....

it is clear that they can break everything.... Thanks for your support!!!

R
 

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

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

by TenPlus1 » Fri Jan 06, 2017 19:44

If any player has the 'protection_bypass' privelage then yes, protection wont stop them breaking/adding things.
 

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

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

by TenPlus1 » Wed Feb 01, 2017 14:15

Updated:

- Protectors can no longer be moved by mesecon pistons.
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

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

by ExeterDad » Wed Feb 01, 2017 14:42

Just putting this out here. I see in past discussion a request for smaller sized pro blocks. I would also like to see this implemented if possible. I'm laying a huge amount of road on a server. These roads are to encourage building in a organized way. And of course for easy access for players. I really would like a block that has a radius that would exactly span the width of my roads so players can build right up to the roads without leaving a "undeveloped" gap that is protected by a oversized pro block. Our roads are seven blocks wide, so would require a radius of three. Having all the pro blocks set at that radius would result in the player having to set way too many pro blocks. Even the default radius of five (11 blocks) is a little small for players to protect properties in my opinion.

I have been working at implementing a custom pro block "road" node. I managed to get it to display properly when punched. But I can't get my mind around the code to work with the standard larger radius and my smaller "road radius". As a result I'm having to rewrite too much of your code and getting myself in deeper then I'm capable of :D

So any help would be appreciated. Whether it's the added feature... or hints of how I can add it myself.

Thanks :)
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

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

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

by TenPlus1 » Wed Feb 01, 2017 18:13

We already have a setting for protection radius which the server/client can reduce to 3 if needed for intricate build protection, failing that a specialised node just for your road with a mini protection routine build in :)
 

User avatar
ektor
Member
 
Posts: 24
Joined: Sat Sep 24, 2016 11:59
IRC: ektor
In-game: ektor

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

by ektor » Thu Feb 02, 2017 15:06

Hi, your work is very much appreciate TenPlus1, and i enjoy playing in Xanadu :)

There is a question I find usefull, but seems you don't answer yet :
deadmenracing wrote:Excellent mod, thank you! Is there an easy way (...) to limit the number of protection blocks a player can put down? I'm seeing it overused a bit.


Can we configure that in the "minetest.conf" file? Or something to change in the code... and if yes, where?
 

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

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

by TenPlus1 » Thu Feb 02, 2017 21:12

I could look into that as a future feature maybe.
 

User avatar
ektor
Member
 
Posts: 24
Joined: Sat Sep 24, 2016 11:59
IRC: ektor
In-game: ektor

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

by ektor » Fri Feb 03, 2017 12:16

OK, thanks.
 

Codesound
Member
 
Posts: 49
Joined: Thu Jun 09, 2016 14:56

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

by Codesound » Sat Feb 18, 2017 09:23

Hi,

I really appreciate this mod, and I would have a request to improve it:

it is possible to add the possibility to set for each protector the size of the area that it protects?
In its menu that appears, you could add the ability to enter values ​​that correspond to the XYZ coordinates of protection for each block?

it's just a question....
many and many thanks for all!

R
 

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

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

by TenPlus1 » Sat Feb 18, 2017 20:21

I could but checks like that would slow things down... Protector Redo does have a setting for the minetest.conf file however to set protected area size: protector_radius = 5

To protect specific areas of different sizes you could always try the Areas mod.
 

User avatar
poikilos
Member
 
Posts: 32
Joined: Thu Feb 18, 2016 13:45
GitHub: poikilos
In-game: poikilos

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

by poikilos » Wed Feb 22, 2017 19:37

Hello, I looked into this crash but the attached log doesn't help me pinpoint why it crashes. It happens when killing yourself (and possibly other death) by digging in a protected area with latest git version of Minetest server (and windows git build). It seems to be infinite recursion (same function called over and over, lua memory usage approaching 1GB).

NOTE: I made one change to your code to prevent a different crash. Please consider making this change permanent:
return protector.can_dig(1, pos, player:get_player_name(), true, 1)
to
return player and protector.can_dig(1, pos, player:get_player_name(), true, 1) or false
The change above fixes a nil player crash, but I'm not sure if it has other consequences or is related to the problem below.
I was not able to fix the crash below nor understand the cause using the debug output:


The debug output below is from a sitation in multiplayer that I couldn't replicate exactly (player names hidden for privacy):
(parts in between . . . lines were repeated many times)
+ Spoiler


I generated the debug output below by killing myself by punching a protected dirt block over and over until I died (similar to above, but [only sometimes] involves may_replace])
(parts in between . . . lines were repeated many times--stack trace with set_hp error had may set_hp errors per stack trace, until the last stack trace had 1)
+ Spoiler
 

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

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

by TenPlus1 » Wed Feb 22, 2017 21:13

Thanks poikilos, change has been applied to git code.
 

User avatar
poikilos
Member
 
Posts: 32
Joined: Thu Feb 18, 2016 13:45
GitHub: poikilos
In-game: poikilos

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

by poikilos » Wed Feb 22, 2017 22:49

Ok I seemed to have fixed the set_hp infinite recursion bug by adding the following checks before continuing the not protector.can_dig case in the is_protected function (I'm not actually sure why it would be infinite recursion otherwise). I came upon this solution because one of the errors was regarding set_hp and below makes sure digger is really a player before we process protector violations for digger (make sure you add "end" directly before return true as in the code below, so that protected status will return even if digger is not a player):
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
   -- is area protected against digger?
   if not protector.can_dig(protector.radius, pos, digger, false, 1) then
      local player = minetest.get_player_by_name(digger)
      if player and player:is_player() and player:get_hp() > 0 then -- ADDED THIS LINE
         -- hurt player if protection violated

                        ------- process all of those violations (no change to this part of code except indent) -------
      end  -- ADDED THIS LINE
      return true
   end

   -- otherwise can dig or place


As you can see, only two lines of code were added in the code above:
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
if player and player:is_player() and player:get_hp() > 0 then

and
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
end

(the "end" before "return true")
--the other code is just shown for placement.

And here is a debug version (You can safely insert this debug code before the "if player" line above in order to show some helpful info):
+ Spoiler


You can also remove all of the "and player" checks now (unless using the debug version without the real fix afterward which wraps the violation processing) and move the "then" to the previous line, since player is checked before any violations are processed.
 

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

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

by TenPlus1 » Thu Feb 23, 2017 10:06

poikilos: Player check added with some changes... I would recommend joining github so you can post issues and pull requests there :)
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

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

by Hybrid Dog » Thu Feb 23, 2017 15:58

Please save the date, accuracy in seconds, to the meta when someone places a protector. It allows admins to remove old protector nodes of specific people.
 

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

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

by TenPlus1 » Thu Feb 23, 2017 16:08

We already have a /protector_remove command to handle removal of player protectors.
 

Previous

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 11 guests

cron