Blocks & Decoration A way to move groups of blocks?

Laluzi

Skeletron
What I'm suggesting is something that seems kind of janky to implement, but it's something I've dearly wanted for a while. How many times I've built, furnished, and walled two sides of a building before realizing they weren't perfectly symmetrical or that I misjudged where the center of the building was, and I had to bulldoze half of one room to widen it by a block or some other asinine change that undoes the past two hours of hammering and painting that I've done.

I'm not sure how feasible this is, but I've got an item that could end up in the Mechanic, Steampunker, or even Cyborg's inventory, depending on what aesthetic it's given*. I'm suggesting a tool which would allow you to select and deselect blocks individually, similar to alt-clicking files in a directory. Once you're done selecting your aggregation of blocks, you can then drag-move all of them in the same direction (straight or complex; can be two blocks up, can be three blocks down and five blocks right) and deposit them in a new location. This only works if every block may move in the direction highlighted; it will fail if something's in the way. You can move selections that are two or more blocks thick - you could accomplish this by recursively asking each highlighted block if they can make the move, then asking every block that failed to move if they can make that move again after the past layer moved. You stop recursing when no more blocks have moved for that single direction (i.e., move up one space), meaning whatever happened on the previous loop won't change the outcome of any further loops. The tech talk isn't relevant for anything except how I envision this could be implemented, but the point is that blocks won't run into themselves while they're all being moved in the same direction, but you do need to clear the area you want to move your blocks into.

Executing the move or switching to a different tool deselects the blocks. It's not something you have to deselect manually or de-wire, as that would be tedious. Gravity-affected blocks will fall if they aren't supported in their new position, but they won't fall mid-transit.

Moved blocks will ideally retain their paint job and hammering. Furniture might be maintained and might be popped off, depending on what's simpler to code. I'm guessing it would be popped off, given that blocks have to be moved one by one, and you'd end up with scenarios where a two-block-wide furniture is sitting on a single block for a fraction of a frame. Chests that contain items may be a problem, and probably have to be emptied before the tool can be used. Walls... probably don't move with it. It'd be nice if they did, but they might need a separate tool.

Thoughts?


*I bring up Cyborg because he's got a dearth of items, and you could do a neat mag-lev visual, holding blocks in stasis and moving them via the power of lasers or something. Or it can just go with the rest of the building items. It could even belong to the Travelling Merchant, for all that everyone loves that method.
 
Back
Top Bottom