1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-09-07 19:15:22 +02:00

2 Commits

Author SHA1 Message Date
2693e2ecbb Merge branch 'master' into nalc-1.2 2019-05-04 19:56:03 +02:00
sys4-fr
c93df73a5c Rend les items du groupe limitcraft non craftable par l'autocrafter 2019-03-02 19:29:26 +01:00
2 changed files with 4 additions and 6 deletions

View File

@@ -66,8 +66,11 @@ local function run_autocrafter(pos, elapsed)
local inventory = meta:get_inventory()
local craft = get_craft(pos, inventory)
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
if output_item:is_empty() then
-- NALC: ou si l'item n'est pas dans le group limitcraft
if output_item:is_empty() or limitcraft > 0 then
meta:set_string("infotext", "unconfigured Autocrafter: unknown recipe")
return false
end

View File

@@ -46,11 +46,6 @@ local function read_entities()
end
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
setmetatable(entity, nil)
for _, attached in pairs(entity._attached_entities) do