Skip to content

Conversation

LeFauxMatt
Copy link
Contributor

This is an early draft of the changes to implement Global Inventory support for Automate.

Replaced all references to "Junimo chests" with "global inventory chests."
Renamed `JunimoMachineGroup` to `GlobalMachineGroup` and updated related properties and methods.
Introduced a `GlobalInventoryId` property in the `IContainer` interface for improved management of global inventory chests.
These changes enhance the system's capability to handle various inventory types while ensuring compatibility with existing functionality.
@LeFauxMatt
Copy link
Contributor Author

@Pathoschild this not 100% working yet, but I wanted to submit an early draft to get your thoughts on the overall implementation so that I can make adjustments before I get too deep into it.

- Removed unnecessary `using` directive from `GlobalMachineGroup.cs`.
- Changed `globalChanged` type to `HashSet<IMachineGroup>` for broader compatibility.
- Introduced `globalAdded` to track newly added global machine groups.
- Updated logic to utilize `globalAdded` for adding groups.
- Filtered `globalChanged` in the rebuild loop to include only `GlobalMachineGroup` types.
@LeFauxMatt
Copy link
Contributor Author

@Pathoschild as a proof of concept, this now works in the few basic tests I have done.

I setup a Chest with a GlobalInventoryId in one location, and setup another chest with the same GlobalInventoryId in a different location. I then connected a regular chest next to one of them with resources, and setup a machine next to the other one. The resources began to process as expected.

There are still a lot of changes needed for reporting the right stats and such, and some more testing to verify whether it can merge multiple groups into a single group when more than one GlobalInventoryId is associated with it.

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

Successfully merging this pull request may close these issues.

1 participant