N2 and O2 Both Working, but Conduit Issues
Hey Folks! Hope everyone enjoyed their weekend. The weather here's been pretty great recently, so we actually visited the beach! Felt good to get outside after a long, wet/cool winter.
Back at work, I unfortunately had a bunch of admin work to take care of before I could get back to code. The usual monthly tax stuff, filing returns, paying bills. Plus a handful of email inquiries. But once that was done, it was back to work!
I finally got both the O2 and N2 sensor/pump combos working. In the end, I removed the old Red/Green alarm and made bespoke N2 and O2 alarms to avoid confusion. And I had to create a series of new interactions, triggers, and other bits to get them working. (I still had the N2 sensor using the O2 data, so it was incorrectly changing modes.)
The feeling of victory was brief, however. Once I tried to transplant the alarm/pump stuff from the smaller character generation station to a larger ship, things started failing.
For one thing, I couldn't get the pumps to see the alarms without a lot of deleting and re-adding of conduits. I had forgotten which pieces communicated signals to adjacent tiles, and which were just pass-throughs. So I had to do a lot of trial and error to get signals going to the right places.
To make matters worse, the signal info wouldn't update unless I reloaded the ship. This is likely easy to fix, but was an annoyance.
Furthermore, once I did get things hooked up, there was a problem with too many signals sharing the same conduits. I had them setup such that there were two conduit types (yellow and green) and two detector types (N2 and O2). But when the pump showed me the UI to choose the connected alarm, I only got the N2 alarm twice: once on each conduit. I think my code assumes there is only one item on each signal line, so it doesn't bother showing me others.
All in all, I felt kind of deflated at this point. The conduits failed. The UI failed. And last week's work involved a lot of failing. Making new stuff is really confusing, flaky, and I'm pretty sure nobody is going to want to jump through all these hoops I can barely figure out myself. Progress is going so damned slow, I barely have it in me to keep plugging away at it.
I might have to rip out some of this stuff and replace it with better systems. I might have to start looking at this as a collection of hardened, bespoke systems that interoperate, instead of pliable, multi-use systems that can be endlessly reconfigured.
To that end, I'm taking a slight detour to try a different approach with conduits. Namely, nuking conduits entirely. Instead, I'm going to try a thing where you click an item, open the UI for it, then click the input you want to hook-up. Then, it hides the UI, highlights all compatible items on the ship, and gives you a rubber-band cursor to connect the current item to some other item. Just point-and-click the connection you want, visually.
The one good thing about all this is that after a year or two of fumbling through Unity, I'm starting to learn some useful tricks. The fact that I can draw a UI line on screen is relatively new. The reason for the old convoluted conduit system was because I didn't know how else to do it. Now, I can do some more intuitive, visual things like that. So maybe it'll be better for it in the long run?
Assuming I don't run out of steam (or funds) before I get there :)