What I'm trying to make is an Alien Hatchery that can craft Aliens.
Input will be something like Alien Atrifacts and somethign else, and the output should be one of the Alien recipies available.
So how do I assign an entity to a recipe?
Here is the Entity code I currently have:
Code: Select all
---- Alien Hatchery
{
type = "assembling-machine",
-- type = "lab",
name = "Alien_Hatchery",
icon = "__Natural-Evolution__/graphics/icons/Alien_Hatchery.png",
flags = {"placeable-neutral", "placeable-player", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "Alien_Hatchery"},
max_health = 150,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
resistances =
{
{
type = "fire",
percent = 70
}
},
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
fast_replaceable_group = "assembling-machine",
light = {intensity = 0.75, size = 8},
on_animation =
{
filename = "__Natural-Evolution__/graphics/entity/Alien_Hatchery.png",
width = 113,
height = 91,
frame_count = 33,
line_length = 11,
animation_speed = 1 / 3,
shift = {0.2, 0.15}
},
off_animation =
{
filename = "__Natural-Evolution__/graphics/entity/Alien_Hatchery.png",
width = 113,
height = 91,
frame_count = 1,
shift = {0.2, 0.15}
},
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
working_sound =
{
sound =
{
filename = "__base__/sound/lab.ogg",
volume = 0.7
},
apparent_volume = 1.5
},
crafting_categories = {"crafting"},
crafting_speed = 0.5,
energy_source =
{
type = "electric",
usage_priority = "secondary-input",
emissions = 0.05 / 1.5
},
energy_usage = "400kW",
--[[inputs =
{
"alien-artifact",
"science-pack-1",
},
]]
ingredient_count = 2,
module_slots = 2
},