The refactor which you knew that would come
Note: For everybody screaming that my title is incorrect... It's an inside joke between me and 18 million Dutchies.

Today I finally pushed a commit to the master branch, which is the work of about two to three weeks of refactoring. Superjeeeej! If you don't know what a refactor is... It's doing stuff to your game, without changing the actual behaviour of the game.
So why refactor? Well... In my case: even though my project is technically only about a month old, it carries tech debt more than a year old. If you've read my Dev Blog before, you know that Starship CEO isn't the first game I'm working on, and if you know me personally, you know that even saying 'it started with StarTrade Empire' skips over older try-outs. But this iteration of my ADHD started with StarTrade Empire, went on to St. Mary's, became StarTrader, became Starship CEO.
And all those games started by copying what I'd made for the previous version, removing what I no longer needed, then writing what the new game needed, before my attention ultimately shifted towards newer, greener games.
So all those games carried some technical debt: buggy code, half-built features, untested optimisations, accepted hard-coded stuff. And all of it worked perfectly: In StarTrade Empire, I set up the placement system, using nothing but GPU-instanced meshes; In St. Mary's I perfected (well... ) the activity system, allowing doctors and patients to interact, go to the toilet, use an X-ray machine, so Starship CEO had the perfect start, right? RIGHT?!
Like I said, it all worked perfectly, so... yes? Until of course I wanted to use more advanced meshes. I found a very cool pack of meshes I can use for the interior of my ship, very detailed, everything in the same style and it allows me to not have to think about the things I despise most: Graphics. One problem: Now, for the first time in three or four games, I had a toilet that actually looked like a toilet, a table people could actually sit on, a helm that was actually being used and... Well, it all went to shit:
People turned away from the drinking fountain while using it, lay in bed at a 90-degree angle and just hovering a few cm above the bed; paintings hung upside-down; the shower was on the ceiling, and no matter how hard I tried to align the walls with where they were supposed to be, they kept showing up in the wrong places. And so it was time for a refactor. A placeable entity is now fully defined in its capability:

The PlaceableCapability carries the cells a furn needs, what, if anything, they fill, what affects pathfinding, what surfaces and volumes it takes up, where the mesh attaches to the mouse and what the cell must be. This allows me to create all kinds of complex configurations for furns, for example, a door uses the new capability to be placed on a wall, claiming the surfaces on both sides of the wall, an airlock is now authored as requiring an inside and outside cell, with a hull in between, etc.
The result of all this? A bit more code in the DataMachine, but far less complexity in the C# code: Any furniture, no matter how complicated, is now built using the same set of rules as a simple chair...
A month in, and I'm almost sure I have now, really, kicked the last of the tech debt Starship CEO inherited out of the airlock...
Almost...