Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this fixing or adding?
This adds an option for trade functionality based on my proposal here: #336 (comment)
The concrete implementation has changed slightly, but overall the functionality is the same: Enable the option, build the structure, send units for free or get units for a token cost.
The core of the networking system was taken from Pokemon Emerald's Wonder Trade system.
This also includes a small patch to the bot, to allow reading ability data from the game.
The accompanying data PR is here: Ziktofel/Archipelago-SC2-data#315
How was this tested?
Generating a multiworld with 4 players, of whom 3 had trade enabled, and then sending various units back and forth. I also made sure to at least load a map from each campaign mod (WoL, HotS, LotV Prologue, LotV and NCO) to test the updated dependencies.
Notably simultaneous trade requests weren't tested, owing to me only being one person, but I have some confidence that it works since it's based on a working system.