forked from mtcontrib/pipeworks
Compare commits
1 Commits
2693e2ecbb
...
2019-06-07
Author | SHA1 | Date | |
---|---|---|---|
6ad2c9f568 |
@ -66,11 +66,8 @@ local function run_autocrafter(pos, elapsed)
|
|||||||
local inventory = meta:get_inventory()
|
local inventory = meta:get_inventory()
|
||||||
local craft = get_craft(pos, inventory)
|
local craft = get_craft(pos, inventory)
|
||||||
local output_item = craft.output.item
|
local output_item = craft.output.item
|
||||||
-- NALC: existence de limitgroup ?
|
|
||||||
local limitcraft = minetest.get_item_group(output_item:get_name(), "limitcraft") or 0
|
|
||||||
-- only use crafts that have an actual result
|
-- only use crafts that have an actual result
|
||||||
-- NALC: ou si l'item n'est pas dans le group limitcraft
|
if output_item:is_empty() then
|
||||||
if output_item:is_empty() or limitcraft > 0 then
|
|
||||||
meta:set_string("infotext", "unconfigured Autocrafter: unknown recipe")
|
meta:set_string("infotext", "unconfigured Autocrafter: unknown recipe")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -46,6 +46,11 @@ local function read_entities()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function write_entities()
|
local function write_entities()
|
||||||
|
if not luaentity.entities then
|
||||||
|
-- This can happen if crashing on startup, causing another error that
|
||||||
|
-- masks the original one. Return gracefully in that case instead.
|
||||||
|
return
|
||||||
|
end
|
||||||
for _, entity in pairs(luaentity.entities) do
|
for _, entity in pairs(luaentity.entities) do
|
||||||
setmetatable(entity, nil)
|
setmetatable(entity, nil)
|
||||||
for _, attached in pairs(entity._attached_entities) do
|
for _, attached in pairs(entity._attached_entities) do
|
||||||
|
Reference in New Issue
Block a user