Bugfix for 1.3 version [Recipe_ModifyMechanoid_WorkModule.PostSuccessfulApply NULLReferecnceException!]#65
Open
MAGGen-hub wants to merge 4 commits intorheirman:masterfrom
Open
Bugfix for 1.3 version [Recipe_ModifyMechanoid_WorkModule.PostSuccessfulApply NULLReferecnceException!]#65MAGGen-hub wants to merge 4 commits intorheirman:masterfrom
MAGGen-hub wants to merge 4 commits intorheirman:masterfrom
Conversation
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...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 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...