1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Add minetest.is_creative_enabled

This commit is contained in:
Wuzzy 2020-05-26 02:11:19 +02:00 committed by sfan5
parent 9a64a9fd94
commit 65a6a316d0
5 changed files with 17 additions and 10 deletions

View file

@ -164,6 +164,12 @@ function core.record_protection_violation(pos, name)
end
end
-- To be overridden by Creative mods
local creative_mode_cache = core.settings:get_bool("creative_mode")
function core.is_creative_enabled(name)
return creative_mode_cache
end
-- Checks if specified volume intersects a protected volume