A mod that adds a door that can be only be open/closed by the person that placed it. However, it is meant to be used with node protection since people can just dig around it. Also, it currently has a bug where if a person places it where the door doesn't have enough room to be placed, it disappears instead of going back into the inventory. If anyone knows how to fix this, it would be greatly appreciated.
Craft Recipe:
Same as a regular door except steel for the handle.
'wood', 'wood'
'wood', 'steel_ingot'
'wood', 'wood'
Dependencies:
None. Only the default is required.
License:
Everything is under the WTFPL.
Download link:
https://github.com/MetalDescendant/mine ... all/master
After placing in the correct mod directory, rename the unzipped directory to "locked_door"
created on Minetest-c55 0.4.dev-20120606
[Mod] Locked door [locked_door]
[Mod] Locked door [locked_door]
Last edited by Koros on Wed Aug 01, 2012 10:26, edited 1 time in total.
you can use the node declarations' can_dig to check for ownership :-)
Ex.:
can_dig function either has to return true or false, if false, player can't dig the door.
(Though without node protection of any kind, they can dig anywhere around it :-/)
Ex.:
Code: Select all
minetest.register_node( 'riventest:door_a_c', {
Description = 'Top Closed Door',
[...]
can_dig = function(pos,player)
meta = minetest.env:get_meta(pos)
return has_door_privilege(meta, player)
end,
})
(Though without node protection of any kind, they can dig anywhere around it :-/)
Last edited by mauvebic on Wed Aug 01, 2012 01:33, edited 1 time in total.
Thanks for the suggestion mauvebic. Unfortunately, it doesn't prevent people from sneaking through the door by digging and running into it, or at least it didn't stop that on my computer. Instead, I've made the door immortal when closed and able to be dug when open to stop that. I think i'll add your suggestion to my code though to protect the open doors that aren't under node protection.
-
- Member
- Posts: 160
- Joined: Tue Sep 18, 2012 22:11
please update, its kindof unusable right now
Gr8 b8, m8. I rel8, str8 appreci8, and congratul8. I r8 this b8 an 8/8. Plz no h8, I'm str8 ir8. Cr8 more, can't w8. We should convers8, I won't ber8, my number is 8888888, ask for N8. No calls l8 or out of st8. If on a d8, ask K8 to loc8. Even with a full pl8, I always have time to communic8 so don't hesit8.
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest