RimWorld

RimWorld

Short Circuit Blues
Supes 8 May, 2021 @ 4:48am
Breakdown to flick error
Supes here, I recently updated Powerlogic, and although I haven't made any code or def changes to my fuses, I'd thought I'd check that this mod still works.

what I noticed was that the breakdown-to-flick option is broken, but I think that's because no flicker comp has been added to the fuses (I saw the commented out operation in the ShortCircuit_Patches.xml, which might have broken this).

Just thought you should know :)
< >
Showing 1-4 of 4 comments
blues  [developer] 25 May, 2021 @ 11:35am 
Thanks for your interest and notice, Supes.
I vaguely remember the flick thing. I commented that patch out because i was able to flick'em without the comp, not sure how.
If you say so, maybe it was a double patch somewhere i didn't realize. I will check it whenever possible.
blues  [developer] 25 May, 2021 @ 12:23pm 
And, yes. It was the commented out patch. I'll uncomment it, and with some little checkup I'm going to push an update.
Supes 25 May, 2021 @ 10:53pm 
Originally posted by ('sallgood) blues:
I commented that patch out because i was able to flick'em without the comp, not sure how.

It's certainly possible, though you cant use RimWorld.FlickUtility for that. If you want to do it without patching in a flickable, then you'd have to designate directly while skipping the flickable comp stuff.

you'd need to remove this code (no flickable patched means it's trying to access a property (SwitchIsOn) on a null)
CompFlickable comp2 = b.GetComp<CompFlickable>(); if (!comp.BrokenDown && comp2.SwitchIsOn && flag3) { comp2.DoFlick(); FlickUtility.UpdateFlickDesignation(b); PatchPowerLogic.fused = true; __result = true; return false; }

and replace it with this code
Designation designation = b.Map.designationManager.DesignationOn(b, DesignationDefOf.Flick); if (designation == null) { b.Map.designationManager.AddDesignation(new Designation(b, DesignationDefOf.Flick)); PatchedPowerLogic.fused = true; __result = true; return false; }
blues  [developer] 26 May, 2021 @ 12:30pm 
I wasn't looking but, that's a pretty bypass and it works as it is. I might use it right away.
Btw, the flag3 is "luck". It calculates the fuse activating chance.

I didn't try any bypass like this when it worked back then, I just forgot to add the patch to the file but it was still working. Still baffles me what was it :)

Thanks again Supes.
< >
Showing 1-4 of 4 comments
Per page: 1530 50