Pass variant to getHasDirectionLockAvailable

This commit is contained in:
tobspr 2022-02-22 16:39:03 +01:00
parent 556caed760
commit 6ed7ec6010
3 changed files with 4 additions and 3 deletions

View File

@ -192,7 +192,7 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
const metaBuilding = this.currentMetaBuilding.get(); const metaBuilding = this.currentMetaBuilding.get();
return ( return (
metaBuilding && metaBuilding &&
metaBuilding.getHasDirectionLockAvailable() && metaBuilding.getHasDirectionLockAvailable(this.currentVariant.get()) &&
this.root.keyMapper.getBinding(KEYMAPPINGS.placementModifiers.lockBeltDirection).pressed this.root.keyMapper.getBinding(KEYMAPPINGS.placementModifiers.lockBeltDirection).pressed
); );
} }

View File

@ -49,7 +49,7 @@ export class HUDKeybindingOverlay extends BaseHUDPart {
!this.mapOverviewActive && !this.mapOverviewActive &&
placer && placer &&
placer.currentMetaBuilding.get() && placer.currentMetaBuilding.get() &&
placer.currentMetaBuilding.get().getHasDirectionLockAvailable() placer.currentMetaBuilding.get().getHasDirectionLockAvailable(placer.currentVariant.get())
); );
} }

View File

@ -52,8 +52,9 @@ export class MetaBuilding {
/** /**
* Returns whether the building has the direction lock switch available * Returns whether the building has the direction lock switch available
* @param {string} variant
*/ */
getHasDirectionLockAvailable() { getHasDirectionLockAvailable(variant) {
return false; return false;
} }