mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Disable automatic orientation when using belt lock
This commit is contained in:
parent
215e35166a
commit
46ceefd0d8
@ -154,13 +154,13 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
||||
const oldPos = this.lastDragTile;
|
||||
let newPos = this.root.camera.screenToWorld(pos).toTileSpace();
|
||||
|
||||
// Check if camera is moving, since then we do nothing
|
||||
if (this.root.camera.desiredCenter) {
|
||||
// Camera is moving
|
||||
this.lastDragTile = newPos;
|
||||
return;
|
||||
}
|
||||
|
||||
// Direction lock
|
||||
// Check for direction lock
|
||||
if (
|
||||
this.root.keyMapper.getBinding(KEYMAPPINGS.placement.lockBeltDirection).isCurrentlyPressed()
|
||||
) {
|
||||
@ -171,10 +171,15 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
||||
newPos = oldPos.add(delta);
|
||||
}
|
||||
|
||||
// Check if anything changed
|
||||
if (!oldPos.equals(newPos)) {
|
||||
// Automatic Direction
|
||||
if (
|
||||
metaBuilding &&
|
||||
metaBuilding.getRotateAutomaticallyWhilePlacing(this.currentVariant.get()) &&
|
||||
!this.root.keyMapper
|
||||
.getBinding(KEYMAPPINGS.placement.lockBeltDirection)
|
||||
.isCurrentlyPressed() &&
|
||||
!this.root.keyMapper
|
||||
.getBinding(KEYMAPPINGS.placementModifiers.placementDisableAutoOrientation)
|
||||
.isCurrentlyPressed()
|
||||
|
Loading…
Reference in New Issue
Block a user