mod query: private object destroyer
mod query: private object destroyer
is there a mod or an existing capability, like tnt, that would allow players to destroy private/locked objects? like for example a chest non-owner should not be able to open the chest, but should be able to destroy it, items and all; same for doors, etc.
- AspireMint
- Member
- Posts: 415
- Joined: Mon Jul 09, 2012 12:59
- GitHub: AspireMint
- IRC: AspireMint
- In-game: AspireMint
- Location: Stuck at spawn
Re: mod query: private object destroyer
You can make new mod, put to init.lua:
Code: Select all
minetest.after(0, function()
for nodename, def in pairs(minetest.registered_nodes) do
if def["can_dig"] then
def["can_dig"] = function() return true end
end
end
end)
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: mod query: private object destroyer
To make it per-player specific, consider registering a new item which uses "on_use" (punch) to remove whatever node it's currently pointing at.
EDIT: Or just extend the "on_dig" function supplied above to take the player name in account.
EDIT: Or just extend the "on_dig" function supplied above to take the player name in account.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: mod query: private object destroyer
awesome, these are both great suggestions, thanks :) xoxoxo
Who is online
Users browsing this forum: No registered users and 6 guests