Well, after posting this, I've been able to get the blocks to assign themselves a number in the circuit by knowing how many blocks away from the power source and update it constantly using a timer and putting getcollidingbodies() I to an array, which is then checked to see if it is a weapon, block, or other. Circuit piece number is done by assigning itself the number of the lowest numbered block above, below, left or right of it and adding 1 to it.
The issue is that with signals, I won't be able to tell which block it's coming from unless I assign that number, but each block with the same number could emit the same signal. And I need to be able to have the blocks know if it really was disconnected from the circuit, because 1 block below it could be destroyed, but the block next to it still connects it to the power source. Or on the other side, the block next to it destroyed and the line of blocks on the other side aren't connected. The block immediately disconnected needs to know how to tell the difference.
So far, I've only been successful about checking if any blocks or power source are next to it at all. If not, InCircuit = false.