[1.1.50] Crash When Setting Locomotive(/Wagon/Fluid Wagon) Weight to 0.0001
Posted: Thu Jan 20, 2022 7:53 pm
I have a simple mod that sets locomotive, wagon, and fluid wagon weight and max hp to 0.0001:
data.lua
When I use this mod, and load a map with a moving locomotive, the game crashes. When I use this mod and load a map without a moving locomotive, then place a locomotive and have it move by right clicking on the train ui, the game hangs, but does not crash. Entering the train and manually moving it does not cause the game to hang.
I've attached the save file, which is simply a set of trains moving back and forth. This file generates the crash very consistently as soon as it is opened. In other files, the crash doesnt happen immediately and I need to have the train move by ctrl clicking on the train UI.
data.lua
Code: Select all
local locomotive = data.raw["locomotive"]["locomotive"]
locomotive.max_health = 0.0001
locomotive.weight = 0.0001
local cargo = data.raw["cargo-wagon"]["cargo-wagon"]
cargo.max_health = 0.0001
cargo.weight = 0.0001
fluid = data.raw["fluid-wagon"]["fluid-wagon"]
fluid.max_health = 0.0001
fluid.weight = 0.0001
I've attached the save file, which is simply a set of trains moving back and forth. This file generates the crash very consistently as soon as it is opened. In other files, the crash doesnt happen immediately and I need to have the train move by ctrl clicking on the train UI.