Code: Select all
local smallLoco = factorioUtil.table.deepcopy(data.raw.locomotive.locomotive)
smallLoco.name = "small_locomotive"
smallLoco.minable.result = "small_locomotive"
smallLoco.collision_box = {{-0.6, -0.7}, {0.6, 0.7}}
smallLoco.selection_box = {{-1, -0.9}, {1, 0.9}}
smallLoco.vertical_selection_shift = -0.5
smallLoco.connection_distance = 2
smallLoco.joint_distance = 1
local smallCargoWagon = factorioUtil.table.deepcopy(data.raw["cargo-wagon"]["cargo-wagon"])
smallCargoWagon.name = "small_cargo_wagon"
smallCargoWagon.minable.result = "small_cargo_wagon"
smallCargoWagon.collision_box = {{-0.6, -1.25}, {0.6, 1.25}}
smallCargoWagon.selection_box = {{-1, -1.4}, {1, 1.4}}
smallCargoWagon.vertical_selection_shift = -0.5
smallCargoWagon.connection_distance = 2
smallCargoWagon.joint_distance = 2
To reproduce
In 0.17.75Load the mod zip attached: small_trains_17.0.0.zip
Load the save attached: _small loco test a.zip
In editor place a small_locomotive on the horizontal track with it snapping to the station.
Place a small_cargo_wagon behind it, snapping in place.
Place another small_locomotive behind the cargo wagon, snapping to it.
Game errors.