tonumber() the config'd items limit

This commit is contained in:
Vanessa Ezekowitz 2017-04-06 00:02:31 -04:00
parent ef68e058ec
commit 2aa9556748

View File

@ -1,6 +1,6 @@
local luaentity = pipeworks.luaentity local luaentity = pipeworks.luaentity
local enable_max_limit = minetest.setting_get("pipeworks_enable_items_per_tube_limit") local enable_max_limit = minetest.setting_get("pipeworks_enable_items_per_tube_limit")
local max_tube_limit = minetest.setting_get("pipeworks_max_items_per_tube") or 40 local max_tube_limit = tonumber(minetest.setting_get("pipeworks_max_items_per_tube")) or 40
function pipeworks.tube_item(pos, item) function pipeworks.tube_item(pos, item)
error("obsolete pipeworks.tube_item() called; change caller to use pipeworks.tube_inject_item() instead") error("obsolete pipeworks.tube_item() called; change caller to use pipeworks.tube_inject_item() instead")