projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d560f59
)
Creative: Cache creative mode setting
author
paramat
<mat.gregory@virginmedia.com>
Tue, 31 Jan 2017 11:41:50 +0000
(11:41 +0000)
committer
paramat
<mat.gregory@virginmedia.com>
Wed, 1 Feb 2017 17:51:35 +0000
(17:51 +0000)
mods/creative/init.lua
patch
|
blob
|
history
diff --git
a/mods/creative/init.lua
b/mods/creative/init.lua
index cd9e2b494f714578ee052d98ccfff4e05ee18db1..7471e603f51af66e13e5ea57ea60707a638417e6 100644
(file)
--- a/
mods/creative/init.lua
+++ b/
mods/creative/init.lua
@@
-1,7
+1,9
@@
creative = {}
+local creative_mode_cache = minetest.setting_getbool("creative_mode")
+
function creative.is_enabled_for(name)
- return
minetest.setting_getbool("creative_mode")
+ return
creative_mode_cache
end
dofile(minetest.get_modpath("creative") .. "/inventory.lua")