Page 1 of 1

[Mod] dsprotectxz [0.1] [dsprotectxz]

PostPosted: Sun Jun 16, 2013 03:28
by deasanta
Subject: [Mod] dsprotectxz [0.1] [dsprotectxz]

Very basic mod to protect a 1 x ∞ x 1 area by placing a cloud at a given hight with protection meta data in it.
Based on: glomie's protector mod

Image

Item: dsprotectxz:protectwand - Wand to protect a column of blocks at X,,Z
Item: dsprotectxz:protectionwand - Wand to check protection of blocks at X,,Z
Item: dsprotectxz:unprotectwand - Wand to unprotect a column of blocks at X,,Z
privilege: dsprotectxz - Grant / Revoke user's right to remove a protective block

GitHub: github.com/deasanta/minetest-dsprotectxz
Download: github.com/deasanta/minetest-dsprotectxz/archive/master.zip

License: (see README.txt)
Sourcecode: WTFPL
Textures: WTFPL

Mod dependencies: default

Mod conflicts: (Unknown)

Compatibility:
This mod should work with on Minetest 0.4.6 and 0.4.7

Installation: add to mods folder and change as you like

Configuration: see init.lua

Notes:
- mod is named "dsprotectxz" - use grep or search/replace function to change to what you want
- there are no crafts for this mod to keep it simple and open to modification - use the /giveme dsprotectxz:protectwand command to get started
- depends on default but easy to change in config area of init.lua so that it does not have to
- there may be other mods with similar functions that may even work better
- at the time of writing this mod the engine allowed us check blocks quite far away - this may not always be the case
- error checking is minimal - can be increased if required
- interaction feedback in minimal - can be increased if required
- feel free to rework this mod as you like and but respect copyright of other authors - see readme.txt
- i'm not a lua expert, advice on how to code these mods better or more efficiently will be appreciated

PostPosted: Sun Jun 16, 2013 10:32
by Jordach
GitHub: github.com/deasanta/minetest-dsprotectxz
Download: github.com/deasanta/minetest-dsprotectxz/archive/master.zip
Should be:
https://github.com/deasanta/minetest-dsprotectxz
https://github.com/deasanta/minetest-dsprotectxz/archive/master.zip

Otherwise, nice mod.

PostPosted: Sun Jun 16, 2013 12:18
by sfan5
IMO It shouldn't go from -30,000 to 30,000

PostPosted: Sun Jun 16, 2013 12:44
by deasanta
sfan5 wrote:IMO It shouldn't go from -30,000 to 30,000

The idea is to bypass the for next loop by simply not checking the y coordinate. The mod is written so that it can be used in conjunction with other protector (like) mods. Could be handy to protect an area that you do not want to be minable or if you are looking for a simpler implementation where height or depth is no issue. Tnx for opinion. I'll hold back on the move request until i've clarified it's use better in v0.02.