Allow rail-planner with no curved rail
Posted: Sun Oct 31, 2021 10:18 am
I'm trying to create a rail waypoint entity that can be used in place of a straight rail but can be added to a trains schedule. Internally it is a straight rail with 2 hidden train stops to allow for bidirectional traffic.
So my plan was to create an entity rail-waypoint that is just a copy of straight rail. Also create a copy of train-stop that is invisible and will be added to the rail-waypoint via script.
Then I need an item for the rail-waypoint and there I run into trouble:
A waypoint can not be a curved rail since I can't add train stops to that. But there is no way to tell the rail-planner that. The above gives:
So my plan was to create an entity rail-waypoint that is just a copy of straight rail. Also create a copy of train-stop that is invisible and will be added to the rail-waypoint via script.
Then I need an item for the rail-waypoint and there I run into trouble:
Code: Select all
local item_rail_waypoint = table.deepcopy(data.raw["rail-planner"]["rail"])
item_rail_waypoint.name = "rail-waypoint"
item_rail_waypoint.place_result = "rail-waypoint"
item_rail_waypoint.straight_rail = "rail-waypoint"
item_rail_waypoint.curved_rail = nil
So my interface request is for a rail-planner with no curved_rail.1.254 Mods to disable:Failed to load mods: Error while loading item prototype "rail-waypoint" (rail-planner): Key "curved_rail" not found in property tree at ROOT.rail-planner.rail-waypoint