diff options
author | gpcf <gabriel@gpcf.eu> | 2018-09-21 23:39:41 +0200 |
---|---|---|
committer | LNJ <git@lnj.li> | 2018-09-21 23:39:41 +0200 |
commit | 08a52054a6ce28e621554fae63ede207aa4c0ea1 (patch) | |
tree | 92a37115760938da3d06487574a9f9b8ad1883ba | |
parent | bc48fc0c077a453c20d758318eee6ad6d06783b9 (diff) |
Fix crash when drawers_controller_interval is undefined (#21)
-rw-r--r-- | lua/controller.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/controller.lua b/lua/controller.lua index e36ff71..4092606 100644 --- a/lua/controller.lua +++ b/lua/controller.lua @@ -43,7 +43,8 @@ Controllers that have no items will not continue scanning drawers. ]]-- local MP = core.get_modpath(core.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-local controller_interval = tonumber(core.setting_get("drawers_controller_interval"))
+local controller_interval = tonumber(core.setting_get("drawers_controller_interval")) or 7.0
+
local function controller_can_dig(pos, player)
local meta = core.get_meta(pos);
|