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

Add auto-hotswapping functionality #2

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

Conversation

ilyvion
Copy link

@ilyvion ilyvion commented May 25, 2024

As the title suggests, this adds support for auto-hotswapping.

The way I made it is so that, at a five second interval, for all the assemblies in the HotSwapMain.AssemblyFiles dictionary, look for files named [PathToAssembly.dll].hotswap. If such a file exists, delete it, and then call HotSwapMain.ScheduleHotSwap(). This lets you easily add a step to your build script to create such a file after having built, thus saving you from even having to go into RimWorld and hit Home or click the hotswap button. Here's a small demo of it in action:

Animation

I also added a settings dialog to turn the feature on or off. (It is off by default)

I have not updated the dlls because I don't think it's sensible to rely on external contributors providing safe ones in PRs.

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.

1 participant