Skip to content

Conversation

@Tick-git
Copy link

Hey,
The work is still in progress, but I'm opening this draft PR to avoid losing any changes — and in case someone else wants to pick it up. I'm pausing contributions for now and will check back in once Zetrith returns. 👍

Fix #539: Resolved the issue in the quest cache system by introducing a removal list that's processed after each async tick on the map.

And I started refactoring the async quest handling with the following goals in mind:

  • Removed reliance on static quest cache data.
  • Reorganized logic into non-static classes for better maintainability.
  • Added a QuestManagerAsync, modeled after RimWorld’s source code.
  • Abstracted the dependency on AsyncTimeComp via an interface — with the idea that time handling might eventually be tied to factions or players across maps.
  • Simplified and clarified some complex LINQ queries.
  • Aimed to make the code more expressive and easier to follow.
  • Added TODOs for potential problems discovered during testing.

Cheers! :)

Fix for: rwmt#539
Resolved the issue in the quest cache system by introducing a removal list that's processed after each async tick on the map.

And I started refactoring the async quest handling with the following goals in mind:
- Removed reliance on static quest cache data.
- Reorganized logic into non-static classes for better maintainability.
- Added a QuestManagerAsync, modeled after RimWorld’s source code.
- Abstracted the dependency on AsyncTimeComp via an interface — with the idea that time handling might eventually be tied to factions or players across maps.
- Simplified and clarified some complex LINQ queries.
- Aimed to make the code more expressive and easier to follow.
- Added TODOs for items discovered during testing.

Cheers
@notfood notfood changed the base branch from master to dev July 1, 2025 16:34
@notfood notfood added enhancement New feature or request. help wanted Extra attention is needed async Bugs or issues only in async time mode. 1.5 Fixes or bugs relating to 1.5 (Not Anomaly). labels Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.5 Fixes or bugs relating to 1.5 (Not Anomaly). async Bugs or issues only in async time mode. enhancement New feature or request. help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InvalidOperationException when ticking quests during async time due to modification during enumeration

2 participants