Power Upgrades Done, Retrofitting Layouts
Hey Folks! I've finally got the power system upgrades to a point where they're more generally usable, and I'm starting to look at some item rendering bugs.
The power system needed a few more fixes before I could use it elsewhere in the game. One of the more significant changes was to make interactions more robust by having them store participants by ID instead of by reference. This allowed them to reacquire targets if those targets changed modes, such as when crew is using a reactor that switches on or off. It was a mostly invisible change on the surface, but fixed a lot of null reference issues behind the scenes.
I also noticed that I had some legacy code that was generating power in the recharging component, instead of the fusion component. I tidied that up and now recharging only removes power to recharge things, and fusion creates power.
Furthermore, for some reason my conduits and junctions all had running power components that did nothing. This was a lot of wasted processing, so I removed that.
With those changes done, reactors were finally stable enough to start replacing the old versions I had on ship and station layouts. I've updated the big test ship, K-Leg station, and the chargen station to all use the new reactor and backup batteries.
The next thing I'm looking into is a rendering/inventory bug involving dropped items. Dropping a food packet in the crew's starting inventory seems to remove it without adding it to the ground.
After tracing the code when dropping food packets, I think I've found the problem. The game is searching the nearby area for things to stack the dropped item on, and it's finding the stuff inside the crew's pockets, stacking on those. I'm in the process of ignoring any items in containers nearby, since those should be handled through the container itself, not the contents.
I should be able to fix that tomorrow, and once that's done, maybe a little bit of derelict love?