[0.18.19] Crash when using rail planner on modded rail entities with order property
Posted: Wed Apr 22, 2020 12:27 am
I have the following prototype in the mods directory:
The entity tramRailStraight is incorrectly assigned an order. After crafting a tram-rail and placing it down in any new world, using the rail planner to extend the track will crash the game immediately.
Code: Select all
local recipe = table.deepcopy(data.raw.recipe["rail"])
recipe.enabled = true
recipe.name = "tram-rail"
recipe.ingredients = {{"iron-plate",1}}
recipe.result = "tram-rail"
local tramRail = table.deepcopy(data.raw["rail-planner"]["rail"])
tramRail.name = "tram-rail"
tramRail.straight_rail = "tram-rail-straight"
local tramRailStraight = table.deepcopy(data.raw["straight-rail"]["straight-rail"])
tramRailStraight.name = "tram-rail-straight"
tramRailStraight.order = "a"
data:extend{tramRail,recipe,tramRailStraight}