[kovarex] [0.17.75] Crash placing modified rail wagons
Posted: Tue Nov 05, 2019 6:12 pm
I was placing some modified locamotives and cargo wagons in editor mode and the game crashed. They were being placed in a line using the auto connect placement feature. I placed into a train from front heading backwards a loco, wagon and clicked to place a second loco when it happened. I saw the 2nd loco appear in the game and the ghost marker then appeared between the 2nd (back) loco and the cargo wagon when the error occured.
Load 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.
The modified wagon entity prototype values were:
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.