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

Krastorio 2 inserter drop location compatibility #41

Open
alcarithemad opened this issue Feb 25, 2024 · 1 comment
Open

Krastorio 2 inserter drop location compatibility #41

alcarithemad opened this issue Feb 25, 2024 · 1 comment

Comments

@alcarithemad
Copy link

In Krastorio 2, it's possible (via hotkey or added UI) to change whether inserters target the near or far side of the destination tile. However, this state is lost when the stage is rebuilt, and not propagated to later stages.

I don't know much about Factorio modding, but the K2 code that does it appears to be here.

Reading the API docs, I think you need to check for allow_custom_vectors on inserter prototypes and, when it's truthy, explicitly track the state of entity drop_position when rebuilding or copying entities to a later stage?

(I don't have it installed anywhere but I would not be surprised to learn this also affects Bob's Adjustable Inserters)

@GlassBricks
Copy link
Owner

GlassBricks commented Feb 25, 2024

To fix this completely, the Krastorio2 code has to support this a bit. With bob's inserters, a custom event is raised when inserters are adjusted that allows the mod to record the change; there isn't (yet) such an event in the Krastorio2.
(The base game also doesn't have an event for inserter position changes).

A workaround for now is to open/close the inserter GUI after changing settings; that should cause an update check.

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

2 participants