mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Remember ternary statements
This commit is contained in:
parent
887d41bd06
commit
bd8809fcb0
@ -467,8 +467,7 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
|
||||
index = 0;
|
||||
console.warn("Invalid variant selected:", this.currentVariant.get());
|
||||
}
|
||||
const direction =
|
||||
!this.root.keyMapper.getBinding(KEYMAPPINGS.placement.rotateInverseModifier).pressed * 2 + 1;
|
||||
const direction = this.root.keyMapper.getBinding(KEYMAPPINGS.placement.rotateInverseModifier).pressed ? -1 : 1;
|
||||
let newIndex = (index + direction) % availableVariants.length;
|
||||
if (newIndex < 0) {
|
||||
newIndex += availableVariants.length;
|
||||
|
Loading…
Reference in New Issue
Block a user