Skip to content

Improve rotations for certain nodes#247

Open
AbbyRead wants to merge 5 commits intoChefZander:masterfrom
AbbyRead:rotation-fixes
Open

Improve rotations for certain nodes#247
AbbyRead wants to merge 5 commits intoChefZander:masterfrom
AbbyRead:rotation-fixes

Conversation

@AbbyRead
Copy link
Contributor

This PR makes it so drawers and storinators can be rotated using the screwdriver, and other blocks such as those in sbz_chem get better default rotation deterministics. Aside from that, deployers and node breakers face away from the clicked face they are placed against (more intuitive since it's probably being connected to a pipe or storage).

There's still a lot more I intend to do for this, but this at least addresses some of Issue 222. I still want to figure out pipeworks enough to get the one-way tubes to orient better by default, and some things like the pebble enhancer and decay accelerator still aren't able to rotate. We're partway there at least though!

This is intended only for blocks where the rotation serves no gameplay purpose other than cosmetic.  I've touched things up and verified the accuracy of all the comments.  I've also tested in-game, and it seems to all be working as intended.  Feels very nice.
Since the metadata contains both color and facing, we have to bitmask and handle the proper bits for rotation.  Tested ingame and working so far in all cases.
Doing the same thing as with storinators here.  Tested and working ingame in all cases so far.
It makes more sense to me, as this is probably how you would set things up when playing, attaching node breakers and deployers to a nearby tube or other receptical rather than clicking a (for some reason already there?) plant for instance.  Also, it makes it more obvious what you're looking at if the textured face that does stuff is visible from the get-go.
There's not really much I can figure out how to do with this to get it any better at this time aside from shortcutting unnecessary checks that make it look glitchy due to processing time before orientating.  Pipeworks is complicated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments