[1.5.1] Better Future Block Controller turning off all options when connected to C&C after snapshotting tech

Mindlessmrawesome

Well-Known Member
Jul 1, 2016
354
543
500
Afternoon everyone!

I am trying to make a system where the shields on an anti-grav tech turn off when the power goes below 25%. To do this, instead of hooking every single shield up via a wire to the logic system that checks the power levels, I'm instead just using a better future block controller switch to control the shields. I got it to work flawlessly, but then... I go and snapshot my tech, and when I reload it, for some reason, the anti-grav refuses to turn on. This should be impossible, because I disabled the option for the block controller switch to control anti-grav, hovers, and health bubbles.

Curiously, it appears that when a tech that has a block controller switch controlled by circuits and systems is snapshotted, it loads in with all options that are disabled on the block controller switch turned off across the tech (as if you had given the block controller switch access to control them, and then turned off the block controller switch).

Since this text description is a little complicated, I've taken a couple of screenshots to demonstrate the issue, which I've linked below, along with my hypothesis on the problem and a potentially really easy fix if it's true.


This is the tech I am working on:
the problem tech.PNG

I will attach the snapshot file below (it's called "Alien Swordfish.png") so that the devs can download it for their own testing. Do note that it's designed to fly up to 1000 altitude using a booster, so while testing, it might be beneficial for you to remove the booster as it can be annoying.

Here is a picture of the problematic block controller switch inside of the tech:
Block controller switch inside the tech.png

I've circled it with blue. Take note that it is only set to control shields, as highlighted by the smaller blue circle. All of the other icons are greyed out. This block controller switch is set to deactivate when the tech's power level is below 25%, thus turning off its shields and preserving power for the anti-grav.

When I first added this system with the block controller switch to the tech, it worked perfectly fine. But after snapshotting and pasting another one of these into my world, the anti-grav refused to turn on, despite there being no possible way for it to be controlled by the block controller switch as pictured above.

To diagnose the problem, I tried placing another block controller switch on the tech, as pictured below:
second block controller switch being funky.png

As you can see, the second block controller switch is showing that the anti-grav, the hovers, and the repair bubbles are switched off (notated by the fact that their icons are red), despite there being no possible way for this to happen using the internal block controller switch since it's set to only control shields. When I hover over the option to allow the block controller to enable/disable what it controls, it says that all four of the categories for are circuit controlled. Somehow, upon saving/loading the tech, all categories got disabled by the tech's internal block controller.


HYPOTHESIS AND POTENTIAL FIX:

My guess as to what happened is that when the tech loaded in, for a brief second, the block controller switch hadn't loaded the categories that it was allowed to control. If this is true, then this would mean that for a brief split-second while it was finishing loading in, it would be allowed to have control of the tech's anti-grav, shield bubbles, repair bubbles, and hover pads. And since the tech spawns in with zero power, and the controller is set to deactivate upon having less than 25% power using a circuits and systems setup... it must've turned off all categories during it's loading, and then proceeded to finish loading in, restricting it's control back to only shields.

If this hypothesis is true, then this bug can be squashed with a fairly easy fix; make it so that the block controller switch cannot activate/deactivate via circuits and systems until it is finished loading in and it's control categories have been fully loaded.

Also, I actually think that two bugs are on display here (totally by accident). The second bug is on display in the third picture; despite no other block controller on the tech actually having control over anything except for shield bubbles (albeit possibly for a split second while the tech was loading in), all four categories display as "option is circuit controlled" when they're hovered over. This is incorrect; only the shields are circuit controlled. Maybe this bug fix can hit two birds with one stone.

Hoping to see this bug being fixed sometime in the next couple of updates. If anything else is needed other than what is provided, leave a comment and I'll upload it here.
 

Attachments