mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-09 17:23:51 +01:00
Creative: Cache creative mode setting
This commit is contained in:
parent
d560f59a74
commit
e86955afae
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user