diff options
author | FaceDeer <derksenmobile@gmail.com> | 2017-09-10 21:35:26 -0600 |
---|---|---|
committer | FaceDeer <derksenmobile@gmail.com> | 2017-09-10 21:35:26 -0600 |
commit | c6aa2840d34d99f92889dc21860d54bffcb114b4 (patch) | |
tree | 55aa72d372c907f6e9843d7680bed9a7c783a842 | |
parent | 268b4d16263104f1c1710fdacbeb61a75de69ec3 (diff) |
add further out-of-range failsafes for extrusion setting
-rw-r--r-- | node_builders.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/node_builders.lua b/node_builders.lua index 08a1727..4ca62ae 100644 --- a/node_builders.lua +++ b/node_builders.lua @@ -204,8 +204,8 @@ minetest.register_node("digtron:builder", { local extrusion_count = 0 local extrusion_target = meta:get_int("extrusion") - if extrusion_target == nil or extrusion_target > 100 then - extrusion_target = 100 -- failsafe + if extrusion_target == nil or extrusion_target < 1 or extrusion_target > 100 then + extrusion_target = 1 -- failsafe end local return_items = {} @@ -255,8 +255,8 @@ minetest.register_node("digtron:builder", { local extrusion_count = 0 local extrusion_target = meta:get_int("extrusion") - if extrusion_target == nil or extrusion_target > 100 then - extrusion_target = 100 -- failsafe + if extrusion_target == nil or extrusion_target < 1 or extrusion_target > 100 then + extrusion_target = 1 -- failsafe end local built_count = 0 |