Skip to content

Commit e86955a

Browse files
committedFeb 1, 2017
Creative: Cache creative mode setting
1 parent d560f59 commit e86955a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

Diff for: ‎mods/creative/init.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
creative = {}
22

3+
local creative_mode_cache = minetest.setting_getbool("creative_mode")
4+
35
function creative.is_enabled_for(name)
4-
return minetest.setting_getbool("creative_mode")
6+
return creative_mode_cache
57
end
68

79
dofile(minetest.get_modpath("creative") .. "/inventory.lua")

0 commit comments

Comments
 (0)
Please sign in to comment.