mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add basic protection support to builtin
This commit is contained in:
parent
2636c92075
commit
06a5eceb81
4 changed files with 53 additions and 0 deletions
|
@ -106,3 +106,14 @@ function minetest.setting_get_pos(name)
|
|||
return minetest.string_to_pos(value)
|
||||
end
|
||||
|
||||
-- To be overriden by protection mods
|
||||
function minetest.is_protected(pos, name)
|
||||
return false
|
||||
end
|
||||
|
||||
function minetest.record_protection_violation(pos, name)
|
||||
for _, func in pairs(minetest.registered_on_protection_violation) do
|
||||
func(pos, name)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue