Add advanced machine block craft

This commit is contained in:
2023-11-23 08:44:06 +01:00
parent c2384c6c1b
commit f697cfbcc4
3 changed files with 77 additions and 7 deletions

View File

@@ -585,15 +585,15 @@ end
-- \param registerCompressorRecipe If true compressor recipe for plate will be registered
-- \returns nil
industrialtest.api.registerPlate=function(name,displayName,resources,color,registerCompressorRecipe)
minetest.register_craftitem("industrialtest:"..name.."_plate",{
description=S(displayName.." Plate"),
minetest.register_craftitem("industrialtest:"..name,{
description=displayName,
inventory_image="industrialtest_plate.png",
color=color
})
if registerCompressorRecipe then
for _,value in ipairs(resources) do
industrialtest.api.registerCompressorRecipe({
output="industrialtest:"..name.."_plate "..(value.count or 1),
output="industrialtest:"..name.." "..(value.count or 1),
recipe=value.resource
})
end