[2.1.9] Manually upgrading rolling stock with different prototype does not snap to existing entity

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

[2.1.9] Manually upgrading rolling stock with different prototype does not snap to existing entity

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 15 times
LocomotiveFastReplace_0.0.1.zip
Test mod for locomotives with same fast_replaceable_group.
(1.75 KiB) Downloaded 10 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.
robot256
Smart Inserter
Smart Inserter
Posts: 1434
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.1.9] Manually upgrading rolling stock with different prototype does not snap to existing entity

Post by robot256 »

This is still an issue in 2.1.12.

In some positions of the existing train, there is no possible position where you can replace it with a different entity. Send it to a train stop, and you once again get the one-valid-pixel method of placement.

This is an issue in Multiple Unit Train Control because MU Locomotives are not available as items. If the player wants to upgrade the quality of an MU Locomotive manually, they have to place a normal Locomotive on top of it, which means waiting for it to align at a train stop and then find the exact pixel where the positions match.

Using the upgrade planner is also a hassle because you have to select Locomotive and MU Locomotive separately. (Which would be easier if we got "upgrade_alternative" options.)
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”