[0.4.8] Protection support

User avatar
ShadowNinja
Member
 
Posts: 194
Joined: Tue Jan 22, 2013 22:35
GitHub: ShadowNinja
IRC: ShadowNinja
In-game: ShadowNinja

[0.4.8] Protection support

by ShadowNinja » Sat Nov 02, 2013 18:28

Support for protection mods has recently been added to the Minetest API.
You can see an example of how protection mods should use this here.

Any mods that want to check if a position is protected should use minetest.is_protected(pos, playername). This is an improvement over having to use hacks like this.

This also allows you to do special things on protection violations, for example damaging or banning the player.

Protection mods that do not update will still work, mostly. Any mod that checks protection at a position will believe that the position is unprotected, whether or not it is.

You can get more details in lua_api.txt.
Last edited by ShadowNinja on Sat Nov 02, 2013 19:05, edited 1 time in total.
I play on my Minetest server and VanessaE's.
The best way to contact me is usually IRC (InchraNet, freenode).
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sat Nov 02, 2013 18:54

This is truly wonderful news.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sat Nov 02, 2013 19:00

This is quite a vague topic.

  • Is it in cpp api, built in, or minetest_game?
  • Will protection mods automatically support it, or do they need to be updated?
  • Link to lua_api
  • [0.4.8]?

That's not really a hack.
Last edited by rubenwardy on Sat Nov 02, 2013 19:05, edited 1 time in total.
 

User avatar
Menche
Member
 
Posts: 994
Joined: Sat Jul 02, 2011 00:43

by Menche » Sat Nov 02, 2013 19:27

It appears to be in builtin/*.lua.
An innocent kitten dies every time you top-post.
I am on the Voxelands Forums more often than here.
Try Voxelands (forked from Minetest 0.3) by darkrose
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Nov 02, 2013 20:30

rubenwardy wrote:This is quite a vague topic.

  • Is it in cpp api, built in, or minetest_game?
  • Will protection mods automatically support it, or do they need to be updated?
  • Link to lua_api
  • [0.4.8]?

That's not really a hack.


To answer the questions:

WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 


Return to Minetest News

Who is online

Users browsing this forum: No registered users and 5 guests

cron