Baseless/helpers/CreateCraftingMachine.lua

19 lines
388 B
Lua
Raw Normal View History

2020-04-22 04:35:40 +00:00
function CreateCraftingMachine (type, prototype)
if CreateEntityWithHealth(
type,
MergeTables(
prototype,
{
crafting_categories = {Baseless.RecipeType()},
crafting_speed = 1,
energy_source = Baseless.EnergySource.Void,
energy_usage = "1W",
}
)
) then
Baseless.RecipeType(true)
return true
end
return false
end