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

remote.call API for integration with other mods #3

Open
dewiniaid opened this issue Dec 1, 2017 · 0 comments
Open

remote.call API for integration with other mods #3

dewiniaid opened this issue Dec 1, 2017 · 0 comments
Assignees

Comments

@dewiniaid
Copy link
Owner

Use this issue to discuss requests and questions you might have about the API

I plan to add an API to allow other mods to alter the table of related items used by Quick Item Swap. In the current
implementation, the table is created and initialized at startup; the initial data and code that does this
can be found in qis/mappings.lua.

Since I'm not the target audience of said API (I can just edit the table itself), I'd like to gather feedback from those who are in said target audience before spending development time on this.

You may be interested in such an API if your mod does things like adding additional tiers of items (e.g. Bob's Adjustable Inserters) or variants of such (e.g. Logistic Train Network or Smarter Trains), for instance. Adding your mod's items to the table of mappings will allow it to work with QuickItemSwap.

Currently, the planned process works something like this:

  1. At control.lua initialization time, QIS constructs the default table of mappings. Right now, this consists of table of vanilla items only -- it might later also include things I explicitly add support for on my end.

  2. During on_init and on_load, this table of mappings can be modified by other scripts via use of an API using remote.call.

Note that these modifications must be deterministic -- for any distinct combination of mods and startup/map settings, the end result must be consistent every time to avoid desyncs.

Developing the API for step 2 is the majority of this issue.

@dewiniaid dewiniaid self-assigned this Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant