Skip to content

[core] Introduce SynthTransaction, refactor synth state tracking#9964

Merged
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
sruon:synth_tx
May 10, 2026
Merged

[core] Introduce SynthTransaction, refactor synth state tracking#9964
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
sruon:synth_tx

Conversation

@sruon
Copy link
Copy Markdown
Contributor

@sruon sruon commented May 6, 2026

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

  • Gets rid of CraftContainer in favor of CCraftState (state tracking) and SynthTransaction (items custody + reward)
  • Adds a handful of guards in the relevant places
  • Adds several test cases

Unlike other transaction types, SynthTransaction operates on a default-lost model, meaning items must explicitly be marked saved for them to not be consumed.

Steps to test these changes

Tests included, ran through a manual checklist for what couldnt be automated

@Xaver-DaRed
Copy link
Copy Markdown
Contributor

Could you be a little more descriptive with variable names?
cs and tx mean nothing.

@sruon sruon requested a review from zach2good May 6, 2026 18:37
return nullptr;
}

auto transaction = std::unique_ptr<SynthTransaction>(new SynthTransaction(xi::Badge<SynthTransaction>{}, player));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this that thing where make_unique can't get around the semantics of Badge?

@Xaver-DaRed
Copy link
Copy Markdown
Contributor

Rebase, please

@Xaver-DaRed Xaver-DaRed merged commit 37db253 into LandSandBoat:base May 10, 2026
18 of 19 checks passed
@sruon sruon deleted the synth_tx branch May 10, 2026 19:05
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.

3 participants