1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Refactor building placer

This commit is contained in:
tobspr
2020-06-17 13:12:39 +02:00
parent 4b9df76f2f
commit 84969a9205
11 changed files with 625 additions and 469 deletions

View File

@@ -108,7 +108,7 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
this.root.hubGoals.takeShapeByKey(blueprintShape, cost);
// This actually feels weird
// if (!this.root.keyMapper.getBinding(KEYMAPPINGS.placementModifiers.placeMultiple).isCurrentlyPressed()) {
// if (!this.root.keyMapper.getBinding(KEYMAPPINGS.placementModifiers.placeMultiple).pressed) {
// this.currentBlueprint.set(null);
// }
}
@@ -133,11 +133,7 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
rotateBlueprint() {
if (this.currentBlueprint.get()) {
if (
this.root.keyMapper
.getBinding(KEYMAPPINGS.placement.rotateInverseModifier)
.isCurrentlyPressed()
) {
if (this.root.keyMapper.getBinding(KEYMAPPINGS.placement.rotateInverseModifier).pressed) {
this.currentBlueprint.get().rotateCcw();
} else {
this.currentBlueprint.get().rotateCw();