Add empty_spool as fab output
This commit is contained in:
parent
b85e325cd5
commit
4a09dc785f
@ -78,7 +78,8 @@ local function making(pos, crd, nvm, inv)
|
||||
local rtype = RecipeType[crd.stage]
|
||||
local recipe = recipes.get(nvm, rtype, owner)
|
||||
local output = ItemStack(recipe.output.name .. " " .. recipe.output.num)
|
||||
if inv:room_for_item("dst", output) then
|
||||
local waste = recipe.waste and ItemStack(recipe.waste.name .. " " .. recipe.waste.num)
|
||||
if inv:room_for_item("dst", output) and (not waste or inv:room_for_item("dst", waste)) then
|
||||
for _,item in ipairs(recipe.input) do
|
||||
local input = ItemStack(item.name.." "..item.num)
|
||||
if not inv:contains_item("src", input) then
|
||||
@ -91,6 +92,9 @@ local function making(pos, crd, nvm, inv)
|
||||
inv:remove_item("src", input)
|
||||
end
|
||||
inv:add_item("dst", output)
|
||||
if waste then
|
||||
inv:add_item("dst", waste)
|
||||
end
|
||||
crd.State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||
return
|
||||
end
|
||||
|
@ -51,11 +51,13 @@ minetest.register_craftitem("techage:ta5_aichip2", {
|
||||
|
||||
techage.recipes.add("ta2_electronic_fab", {
|
||||
output = "techage:vacuum_tube 2",
|
||||
waste = "basic_materials:empty_spool 1",
|
||||
input = {"default:glass 1", "basic_materials:copper_wire 1", "basic_materials:plastic_sheet 1", "techage:usmium_nuggets 1"}
|
||||
})
|
||||
|
||||
techage.recipes.add("ta3_electronic_fab", {
|
||||
output = "techage:vacuum_tube 2",
|
||||
waste = "basic_materials:empty_spool 1",
|
||||
input = {"default:glass 1", "basic_materials:copper_wire 1", "basic_materials:plastic_sheet 1", "techage:usmium_nuggets 1"}
|
||||
})
|
||||
|
||||
@ -81,17 +83,20 @@ techage.recipes.add("ta4_electronic_fab", {
|
||||
|
||||
techage.recipes.add("ta4_electronic_fab", {
|
||||
output = "techage:ta4_leds 8",
|
||||
waste = "basic_materials:empty_spool 1",
|
||||
input = {"basic_materials:plastic_sheet 4", "basic_materials:copper_wire 1", "techage:ta4_silicon_wafer 1"}
|
||||
})
|
||||
|
||||
techage.recipes.add("ta4_electronic_fab", {
|
||||
output = "techage:ta5_aichip 2",
|
||||
waste = "basic_materials:empty_spool 2",
|
||||
input = {"techage:ta4_leds 8", "basic_materials:copper_wire 1", "basic_materials:gold_wire 1", "techage:ta4_silicon_wafer 1"},
|
||||
ex_points = 10,
|
||||
})
|
||||
|
||||
techage.recipes.add("ta4_electronic_fab", {
|
||||
output = "techage:ta5_aichip2 2",
|
||||
waste = "basic_materials:empty_spool 2",
|
||||
input = {"techage:ta4_leds 8", "basic_materials:copper_wire 1", "basic_materials:gold_wire 1", "techage:ta4_silicon_wafer 1"},
|
||||
ex_points = 50,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user