Open DFliyerz opened 7 years ago
Try re-updating the solenoid.
The toroids all had the solenoid tag as 1, but I'll try that once I get a chance.
For some reason, building it from scratch worked on my third try.
Chances are, something was either misaligned or there is an as-yet unknown order dependence.
It seems to be an order dependance, I built one again and had the same issue as before. I'll have to do some experimenting to figure out what it is.
I thought it was toroids --> solenoid --> injectors, but after trying it again only the toroid directly next to the one fully-built injector was correct for next. Also, assume that alignment is correct for these experiments in order dependance, since I can check them easily with WAILA.
Only the toroids directly next to fully-built injectors are next = 1b, and they'll flash between true and false. Actually, after breaking and re-placing the solenoid, before turning it on, one of them is solenoid = 0b and next = 1b, while another is solenoid = 1b and next = 0b, and the other two are 0b to both. One of the ones next to an injector was even flashing next = 1b while facing the wrong direction entirely.
It seems to work when the injectors face CCW instead of CW, I'll build another to make sure.
Yep, that seems to be the problem.
This should be remedied somehow.
While figuring this out I also had some issues with getting the toroids to recognize the solenoid being somewhat difficult, not being fixed by just breaking and replacing the solenoid, but I'm guessing this would be difficult to fix.
Did you decide on a fix for this Reika?
If not, a couple possibilities I thought of:
1: Track the previous TE, and if the next one matches, invert the direction. ( This will catch when you come in from say the West, but the injector is facing west, and send it properly to the East. )
2: Use the position of the Solenoid to register if the solenoid is facing CW or CCW, and use that to invert the direction or not.
3: Complete rewrite to the check systems. There are multiple alternatives, each with their pros and cons of course. One possibility would be to do it all from the Solenoid, then check the valid locations in a set direction...completely negating the Aim system. 1 big pro to this one, is it could do both hasSolenoid and hasNext all in 1 go. Obvious downside being the work of rewriting the systems.
1: Track the previous TE, and if the next one matches, invert the direction. ( This will catch when you come in from say the West, but the injector is facing west, and send it properly to the East. )
Elaborate?
Let's see if I can do that without making it even more confusing:)
Ok, so the issue is the checkCompleteness function. It uses getNextPart to find the next part in the circle, using each parts Aim. This is where the issue comes in: If it hits an injector facing the wrong direction, the check turns around. It then hits the previous Toroid, which is facing back to the injector, and ping pongs back and forth until the max number of attempts is reached.
My first idea was to always keep track of what the previous part was, to catch any instance of turning around.
Let's say you have: Toroid1 facing Solenoid1 Solenoid1 facing Toroid1 Toroid2 on the other side of Solenoid1, facing Toroid3
Now, when you move out of Toroid1 and check Solenoid1, you keep Toroid1 in a separate variable. You check Solenoid1s getNextPart, which tries to send you back to Toroid1. You compare this with the stored TE, then noticing they match you have caught a reversal. Simple solution is to step back to the solenoid, then go to the opposite of what the Solenoids Aim says. ( So instead say 0, 2 it would be 0, -2 )
That may work, but a misdirected injector is invalid.
Hmm, well, it would be pretty easy to use the above to just disable the injector then. However, you would probably want to communicate this to the player somehow. With a single injector, it would be obvious...but with more than 1, the player just wouldn't see that it isn't working.
You could "break" the multiblock I guess. This would have a visual "I'm not working, fix me!", though it might be really confusing why it builds, then breaks.
Would applying a red tint or something along those lines be too much work for the gain?
Yes, given the injector is not a TESR, just a block. Also, good luck seeing that buried inside the multiblock.
I meant to apply that to the entire multiblock.
Outright impossible.
Figured as much:) A new set of textures where the yellow lines are red would probably be more effort than it'd be worth too.
Yes, not to mention that those are supposed to be wires.
Unfortunately I haven't been able to think of anything better than just undoing the multiblock then at this point.
PS: Sent you a PM on the MCF.
I've been trying to get a fusion reactor to work and, despite making 100% sure that all of the toroids were facing correctly, and even trying the plasma injectors either all facing clockwise/counterclockwise, all towards the center, all out from the center, or all N/E/S/W, I can't get the plasma to follow the toroids. Note: in this picture all of the injectors are facing clockwise, so some of the plasma beams are actually being reflected back.
http://i.imgur.com/5wraSOY.jpg