Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect snapping to belt when replacing a loader with another loader #26

Open
curiosity-a opened this issue Nov 11, 2020 · 3 comments

Comments

@curiosity-a
Copy link

A way to reproduce:

  1. Place an inventory.
  2. Place a belt facing the inventory with one tile inbetween.
  3. Place a loader onto that tile, with its loading side pointing into the inventory. Note that it snaps correctly to load from belt to inventory.
  4. Replace the loader with another one in the above orientation (in practice this would be a loader of a different tier, but for the bug it doesn't matter). Note that the loader changes both orientation and direction, its loading side pointed at the belt, belt side poined at the inventory, direction from belt to inventory.
@Deadlock989
Copy link
Contributor

Can reproduce. From testing there is something very slightly off about the snapping logic section that begins "elseif are_loadable(belt_end) then", possibly being caused by it being a fast-replace event? Not sure.

@Glockshna
Copy link

Glockshna commented Dec 9, 2022

@Deadlock989
Not sure if you're still working on this, but I did some testing and made a video of the different ways I've been able to trigger this.

https://dl.dropboxusercontent.com/s/425f9ls5f7ncz6r/factorio_mLGZOUws6t.mp4

And for anyone stumbling upon this looking for a workaround, turning both of these options off seems to fix the issue for now as it disables the fucky function mentioned above.

these options

Not sure if this helps at all.

You've likely already thought of this but just in case, if I had the time or inclination I might look at returning out of
local function on_built_entity(event)

If it's being called on a quick replace event, but because quick replace itself seems to work fine as long as this function is out of the equation.

@Deadlock989
Copy link
Contributor

@Deadlock989 Not sure if you're still working on this,

Hi - I handed custody of this mod over in 2019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants