Skip to content

Conversation

@MAGGen-hub
Copy link

@MAGGen-hub MAGGen-hub commented Mar 14, 2022

This bug appears only if you remove all work-modules from you mechanoid and tried to install one of them again (Module only appears as hediff. Mechanoid will not do any work if bug happens (even in you install all modules again and only posible solution is killing current mechanoid and replacing him by new one)). See code in Recipe_ModifyMechanoid_UninstallModule on string number 45 to see the reason. I also make some things protected (see commits) because compiler says that they must be protected. This pull also contain changed WhatTheHack.dll file, so it's "ready to play" and if anyone wants they just can replace original WTH mod files with my files, to make it work correctly.

If you become the victim of this bug and your mechanoid refuse to make any types of work, just install any new work module on it and everything will be fine. (This will work only if you replace WTH with my code)

P.S. Sorry for some useless commits... I realized that If you remove the last module mechanoid also lose it's hunting ability so, I remade my fix and change some stuff in reason. Now every thing should work fine...

Make all methods named MakeNewToils() protected, because they are protected in my Rimworld Verse.AI.JobDriver class
Return not null checks to Recipe_ModifyMechanoid_WorkModule.PostSuccessfulApply to repair the bug. If you JobDrivers works even with public MakeNewToils() {see my previous commit} you can just copy changes I made in this commit to you project, to fix the bug.
Hope this fix will not case another bug... But now even if you mechanoid is broken this thing will finaly return him back to normal.
Yes... My own fix won't work for me without this last change...
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