Salvage Pod, Uninstall Scatter, and Usability Fixes
Hey Folks! A few new additions today, plus a bunch of clean-up, fixing, and streamlining.
First on the list was to remove orphaned placeholders when the person installing them changed their mind. Previously, ghost items would just be left wherever if the AI got interrupted, but now those ghost items are cleaned-up. I also noticed that installing items on dark ships was hard due to using a lit material, so I added code to change the item being placed to use an unlit GUI shader.
The second major addition was uninstall scatter. When an item is uninstalled, it doesn't necessarily fit anymore where it was previously. It might be a loose item that cannot fit "over" the wall it was on (e.g. conduits), or it might be a future item that splits into multiple items. Whatever the case, the resulting item should end up somewhere that makes sense given placement rules. So I added code to treat the uninstalled item as "dropped," choosing a spot around the person uninstalling it. (And in the process, streamlined some drop/placement code.)
I found out why my power icons were appearing in packaged builds of the game, but not in the editor. So I fixed that. And while I was at it, I also fixed a bug that caused them not to rotate with the ship when docking.
There was a minor bug with alarms, pumps, heaters, and coolers that allowed them to remain on without power if they were placed in the "on" state while in the ship editor. This was due to a missing "IsPowered" flag on each, which is used to check if they should switch off. I recently fixed this with lights, but had forgotten to check other appliances. Now when docking with an unpowered derelict, no more LED lights everywhere!
And speaking of lights, I also noticed that connecting appliances to sensors recently became more difficult due to dim lighting. Since I used ambient lighting before, this never came up. I had to add some code to make the viable target sensors more visible without revealing the whole ship (in case cheaters use it to scout an unfamiliar ship).
A lot of this testing involved a really small ship layout, and I decided to use this opportunity to redesign my "small" ship to be more complete, and usable as a salvage pod. Today's screenshot shows this new ship layout, which is basically a climate-controlled can with an airlock, nav console, and some standard salvage equipment (EVA suit, drill, laser torch, and hull patch). I'd like to use this as a start to the shipbreaker origin story, and that might mean some sort of short-range propulsion system. The big boys will have fusion torches for long-distance, high-g travel. But almost every ship will have monopropellants and maneuver jets for docking maneuvering, and a pod like this can use them for getting around a junkyard.
I'll have to give that system some thought, as it might involve some new features (local space maneuvering UI, monopropellant items and fuel). But I can also work around it for now with debug controls.