Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synced all research tab buttons, fixes #290 #497

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SokyranTheDragon
Copy link
Member

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 the Game 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 since AreaManager and AutoSlaughterManager are included under the Maps 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 made ResearchManager.SetCurrentProject debug-only. I've done this due to ResearchManager.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).

This should sync stop research, dev finish now, and dev apply techprints. This required a sync worker delegate for `ResearchManager` to work.

I've left the current syncing for selecting research by using `MainTabWindow_Research.DoBeginResearch`, and made `ResearchManager.SetCurrentProject` debug-only. I've done this due to `ResearchManager.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).
@SokyranTheDragon SokyranTheDragon added fix Fixes for a bug or desync. 1.5 Fixes or bugs relating to 1.5 (Not Anomaly). labels Aug 21, 2024
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). fix Fixes for a bug or desync.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant