projects
/
zefram
/
minetest
/
pipeworks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e271dc0
)
Autocrafter only crafts when destination inventory has space
author
bas080
<bas080@hotmail.com>
Sun, 7 Apr 2013 09:30:11 +0000
(11:30 +0200)
committer
bas080
<bas080@hotmail.com>
Sun, 7 Apr 2013 09:30:11 +0000
(11:30 +0200)
autocrafter.lua
patch
|
blob
|
history
diff --git
a/autocrafter.lua
b/autocrafter.lua
index ba62c79b0edf9f519f1d8c2a37b9bacc8dcb4091..a28faecc10f386c1804eca43a68ac69760ecbc49 100644
(file)
--- a/
autocrafter.lua
+++ b/
autocrafter.lua
@@
-11,6
+11,7
@@
function autocraft(inventory)
local input=inventory:get_list("input")
if result.item:is_empty() then return end
result=result.item
+ if not inventory:room_for_item("dst", result) then return end
local to_use={}
for _,item in ipairs(recipe) do
if item~=nil and not item:is_empty() then
@@
-77,4
+78,4
@@
minetest.register_abm({nodenames={"pipeworks:autocrafter"},interval=1,chance=1,
local meta=minetest.env:get_meta(pos)
local inv=meta:get_inventory()
autocraft(inv)
- end})
\ No newline at end of file
+ end})