So my questions are, how can I select a single train and say to it "hey, move here"?
And how can I create a dummy entity to place (manually, just like a signal except it does nothing) near a rail?
So far I tried this for the dummy entity:
Code: Select all
-- shunt signal entity prototype
local shuntSignal = {
    type = "simple-entity",
    name = "shunt-signal-entity",
    icon = "__shunter-loco__/graphics/shunter-signal.png",
    icon_size = 32,
    flags = {"placeable-neutral", "player-creation"},
    picture = {
        filename = "__shunter-loco__/graphics/shunter-signal.png",
        width  = 32,
        height = 32,
    },
    minable = {
        mining_time = 3,
        result = "shunt-signal-item"
    },
}
-- shunt signal item prototype
local shuntSignalItem = {
    type = "item",
    name = "shunt-signal-item",
    icon = "__shunter-loco__/graphics/shunter-signal.png",
    icon_size = 32,
    stack_size = 100,
    subgroup = data.raw["item"]["rail-signal"].subgroup, --copy the subgroup of the rail signal
    place_result = shuntSignal.name,
}
-- shunt signal recipe prototype
local shuntSignalRecipe = {
    type = "recipe",
    name = "shunt-signal-recipe",
    enabled = true,
    subgroup = data.raw["item"]["rail-signal"].subgroup, --copy the subgroup of the rail signal
    ingredients = {
        {type="item", name="steel-plate", amount=10},
        {type="item", name="iron-stick", amount=10}
    },
    result = shuntSignalItem.name,
}
Thanks in advance :D
