Skip to content
Permalink
Browse files

Creative: Cache creative mode setting

  • Loading branch information...
paramat committed Jan 31, 2017
1 parent d560f59 commit e86955afae515fcb150f98ad4bc86d0aea91d6c7
Showing with 3 additions and 1 deletion.
  1. +3 −1 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")

0 comments on commit e86955a

Please sign in to comment.
You can’t perform that action at this time.