diff options
author | Wuzzy <Wuzzy2@mail.ru> | 2020-05-26 02:11:19 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-05-29 22:45:40 +0200 |
commit | 65a6a316d081d3951438bbbcfce74c9c65db407a (patch) | |
tree | b063fae3fd4bb9d75be05905f6f53ae19982fb01 /builtin/game/misc.lua | |
parent | 9a64a9fd9427fc3b62d4dc9bf1ca7c15477ebc5a (diff) | |
download | minetest-65a6a316d081d3951438bbbcfce74c9c65db407a.tar.gz minetest-65a6a316d081d3951438bbbcfce74c9c65db407a.tar.bz2 minetest-65a6a316d081d3951438bbbcfce74c9c65db407a.zip |
Add minetest.is_creative_enabled
Diffstat (limited to 'builtin/game/misc.lua')
-rw-r--r-- | builtin/game/misc.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua index 0ed11ada0..341e613c2 100644 --- a/builtin/game/misc.lua +++ b/builtin/game/misc.lua @@ -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 |