Lock rotation of blocks with rotate = false to 0 (#8531)

* Lock rotation of blocks that don't rotate

* Fix input visuals

* Default to false

Quick, stop forcing changes to mods before sk yells at me.

* lock GenericCrafter rotation if rotate = false

* Convert from a setter a to block method

* Simplify

* Revert "lock GenericCrafter rotation if rotate = false"

This reverts commit 26ac41baf5.

* Remove `lockRotation` boolean.

Pointless. If you want something to rotate, just do `rotate = true; drawArrow = false;`
This commit is contained in:
MEEPofFaith
2023-06-16 15:57:54 -04:00
committed by GitHub
parent d14cdfd59c
commit 26c0c7467b
5 changed files with 19 additions and 12 deletions
+6 -1
View File
@@ -1341,9 +1341,14 @@ public class Block extends UnlockableContent implements Senseable{
packer.add(PageType.editor, name + "-icon-editor", editorBase);
}
public int planRotation(int rot){
if(!rotate) return 0;
return rot;
}
public void flipRotation(BuildPlan req, boolean x){
if((x == (req.rotation % 2 == 0)) != invertFlip){
req.rotation = Mathf.mod(req.rotation + 2, 4);
req.rotation = planRotation(Mathf.mod(req.rotation + 2, 4));
}
}