add further out-of-range failsafes for extrusion setting

This commit is contained in:
FaceDeer 2017-09-10 21:35:26 -06:00
parent 268b4d1626
commit c6aa2840d3

@ -204,8 +204,8 @@ minetest.register_node("digtron:builder", {
local extrusion_count = 0 local extrusion_count = 0
local extrusion_target = meta:get_int("extrusion") local extrusion_target = meta:get_int("extrusion")
if extrusion_target == nil or extrusion_target > 100 then if extrusion_target == nil or extrusion_target < 1 or extrusion_target > 100 then
extrusion_target = 100 -- failsafe extrusion_target = 1 -- failsafe
end end
local return_items = {} local return_items = {}
@ -255,8 +255,8 @@ minetest.register_node("digtron:builder", {
local extrusion_count = 0 local extrusion_count = 0
local extrusion_target = meta:get_int("extrusion") local extrusion_target = meta:get_int("extrusion")
if extrusion_target == nil or extrusion_target > 100 then if extrusion_target == nil or extrusion_target < 1 or extrusion_target > 100 then
extrusion_target = 100 -- failsafe extrusion_target = 1 -- failsafe
end end
local built_count = 0 local built_count = 0