Skip to content

fix: resolve bug in Complex demo#383

Closed
GEFNENEN wants to merge 2 commits intocrashkonijn:masterfrom
GEFNENEN:master
Closed

fix: resolve bug in Complex demo#383
GEFNENEN wants to merge 2 commits intocrashkonijn:masterfrom
GEFNENEN:master

Conversation

@GEFNENEN
Copy link
Contributor

Fixed a bug where the CreateItemAction consumed resources without producing items.

Fixed a bug where the CreateItemAction consumed resources without producing items.
Move resource removal to Complete method
Copilot AI review requested due to automatic review settings January 14, 2026 05:50
@github-actions github-actions bot added the bug label Jan 14, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in the Complex demo where the CreateItemAction would consume resources (iron and wood) without producing the corresponding items. The fix ensures atomic behavior by moving resource removal to happen only when item creation completes successfully.

Changes:

  • Moved RemoveRequiredResources call from BeforePerform to Complete method to ensure resources are only consumed when items are successfully created

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GEFNENEN GEFNENEN closed this Jan 14, 2026
@GEFNENEN
Copy link
Contributor Author

I've created another pull request to fix it correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments