-- 1. Item in inventory
data:extend({
{
type = "item",
name = "interstellar-teleporter",
icon = "InterstellarTeleport/graphics/teleporter_icon.png",
icon_size = 256,
subgroup = "defensive-structure",
order = "a[teleporter]",
place_result = "interstellar-teleporter",
stack_size = 10
}
})
-- 2. Crafting recipe
data:extend({
{
type = "recipe",
name = "interstellar-teleporter",
enabled = false,
ingredients = {
{type = "item", name = "processing-unit", amount = 50},
{type = "item", name = "refined-concrete", amount = 100},
{type = "item", name = "accumulator", amount = 20}
},
results = {
{type = "item", name = "interstellar-teleporter", amount = 1}
}
}
})
local teleporter_animation = {
filename = "InterstellarTeleport/graphics/teleporter_anim.png",
priority = "extra-high",
width = 256,
height = 256,
frame_count = 32,
line_length = 8,
animation_speed = 0.4,
scale = 0.35,
shift = {0, -0.2}
}
-- 3. Teleporter building (Assembling machine with permanent animation)
data:extend({
{
type = "assembling-machine",
name = "interstellar-teleporter",
icon = "InterstellarTeleport/graphics/teleporter_icon.png",
icon_size = 256,
flags = {"placeable-neutral", "player-creation", "not-rotatable"},
minable = {mining_time = 0.5, result = "interstellar-teleporter"},
max_health = 500,
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.4, -1.4}, {1.4, 1.4}},
render_layer = "floor-mechanics",
crafting_categories = {"crafting"},
crafting_speed = 1,
energy_source = {type = "void"},
energy_usage = "1kW",
match_animation_speed_to_activity = false,
graphics_set = {
working_visualisations = {
{
always_draw = true,
constant_speed = true,
render_layer = "floor-mechanics",
animation = teleporter_animation
}
}
},
friendly_map_color = {r = 1.0, g = 0.3, b = 0.8}
}
})
-- 4. Technology
data:extend({
{
type = "technology",
name = "interstellar-teleportation",
icon = "InterstellarTeleport/graphics/teleporter_icon.png",
icon_size = 256,
prerequisites = {"rocket-silo"},
unit = {
count = 500,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"space-science-pack", 1}
},
time = 30
},
effects = {
{
type = "unlock-recipe",
recipe = "interstellar-teleporter"
}
},
order = "e-a-b"
}
})