mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-09 23:37:51 +07:00
Block classes are now responsible for flipping of blocks in schematics. (#6254)
This commit is contained in:
@ -696,9 +696,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
});
|
});
|
||||||
|
|
||||||
//flip rotation
|
//flip rotation
|
||||||
if(x == (req.rotation % 2 == 0)){
|
req.block.flipRotation(req, x);
|
||||||
req.rotation = Mathf.mod(req.rotation + 2, 4);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -989,4 +989,9 @@ public class Block extends UnlockableContent{
|
|||||||
packer.add(PageType.editor, name + "-icon-editor", editorBase);
|
packer.add(PageType.editor, name + "-icon-editor", editorBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void flipRotation(BuildPlan req, boolean x){
|
||||||
|
if(x == (req.rotation % 2 == 0)){
|
||||||
|
req.rotation = Mathf.mod(req.rotation + 2, 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user