Repository navigation
Fix special cargo selection - #4
Open
arclabs561 wants to merge 1 commit into
Open
arclabs561 wants to merge 1 commit into
arclabs561 wants to merge 1 commit into
Conversation
The Windows Trade Center scans cargo IDs in ascending order. A match updates the row and advances to the next cargo (0x48cd32 and 0x48cda7). Each row therefore keeps the last eligible ID. The port stopped at the first match. At Latin, Guinness Barrels (129) and Bio-Engineered Kelp (148) both qualify. Running the original CE r4 scan under QEMU gave kelp at 125 credits per ton. Replaying a one-ton sale in the patched port removed the kelp, left the Guinness aboard, and credited 125. Exercise both rows with three overlapping goods. The highest ID fails SellOn but passes BuyOn, so the two rows must pick different IDs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When several special goods qualify at a port, Nova picks the highest eligible cargo ID for each trade row. At Latin, that means the port buys Bio-Engineered Kelp for 125 credits per ton. I checked the sale in game and added a regression test for both rows.