[2.1.9] Manually fast-replacing rolling stock with different entity does not snap

Post your bugs and problems so we can fix them.
robot256
Smart Inserter
Smart Inserter
Posts: 1379
Joined: Sun Mar 17, 2019 1:52 am
Contact:

[2.1.9] Manually fast-replacing rolling stock with different entity does not snap

Post by robot256 »

What did you do?
1. Create a modded locomotive "New Locomotive" with the same fast_replaceable_group as the base locomotive. (See attached test mod)
2. Start a new game or open the attached save. Place a Locomotive on some track.
3. Pick up a "New Locomotive" item and attempt to place it on top of the Locomotive to upgrade it.
What happened?
4. The New Locomotive placement preview slides continuously across the existing locomotive. It highlights green for exactly one pixel (1/256 tile), and red everywhere else. If you click while it is green, the Locomotive is upgraded to New Locomotive correctly.
What did you expect to happen?
I expected the New Locomotive preview to snap to the Locomotive entity from +/-1 tile in the same way that upgrading a Locomotive to a different quality does.

It looks like the logic to detect when entities should snap to upgrade only looks at the entity name, not the fast_replaceable_group. This makes it very annoying to do manually.
Attachments
LocomotiveSnapTest.zip
Test save for locomotive upgrading.
(1.59 MiB) Downloaded 3 times
LocomotiveFastReplace_0.0.1.zip
Test mod for locomotives with same fast_replaceable_group.
(1.75 KiB) Downloaded 3 times
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Post Reply

Return to “Bug Reports”