Synced all research tab buttons, fixes #290 #497
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.
This should sync stop research, dev finish now, and dev apply techprints. This required a sync worker delegate for
ResearchManager
to work.I've decided to include
ResearchManager
sync worker in theGame
region, as it's a game-wide element (doesn't matter where in the world your colony is, the research will be accessible by you). I've done so sinceAreaManager
andAutoSlaughterManager
are included under theMaps
region. However, @Zetrith if you'd prefer me to change it and either move it to an existing region or make a new region (Research
?) - just let me know and I'll update the PR.I've left the current syncing for selecting research by using
MainTabWindow_Research.DoBeginResearch
, and madeResearchManager.SetCurrentProject
debug-only. I've done this due toResearchManager.SetCurrentProject
being called by "Dev: Finish now" button, which would allow anyone without ability to execute debug-only methods to change their active research to any possible research, ignoring any prerequisites.Alternative approach to this would be to drop the current sync method and make
ResearchManager.SetCurrentProject
synced normally, and then applying a Harmony patch to it which would check if the selected research is valid (and prevent it from being executed if not allowed).