mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
cycle variants backward with shift
This commit is contained in:
parent
b57cde7398
commit
43f72e9f54
@ -467,7 +467,11 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
|
||||
index = 0;
|
||||
console.warn("Invalid variant selected:", this.currentVariant.get());
|
||||
}
|
||||
const newIndex = (index + 1) % availableVariants.length;
|
||||
const direction = !this.root.keyMapper.getBinding(KEYMAPPINGS.placement.rotateInverseModifier).pressed * 2 + 1;
|
||||
let newIndex = (index + direction) % availableVariants.length;
|
||||
if (newIndex < 0) {
|
||||
newIndex += availableVariants.length;
|
||||
}
|
||||
const newVariant = availableVariants[newIndex];
|
||||
this.setVariant(newVariant);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user