mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Corrects some code style issues.
This commit is contained in:
parent
8ec646a8f6
commit
fbc543cf3f
@ -128,9 +128,9 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
|
|||||||
if (!this.root.app.settings.getAllSettings().rotationByBuilding) {
|
if (!this.root.app.settings.getAllSettings().rotationByBuilding) {
|
||||||
return this.currentBaseRotationGeneral;
|
return this.currentBaseRotationGeneral;
|
||||||
}
|
}
|
||||||
const building = this.currentMetaBuilding.get();
|
const metaBuilding = this.currentMetaBuilding.get();
|
||||||
if (building != undefined && this.preferredBaseRotations.hasOwnProperty(building.getId())) {
|
if (metaBuilding && this.preferredBaseRotations.hasOwnProperty(metaBuilding.getId())) {
|
||||||
return this.preferredBaseRotations[building.getId()];
|
return this.preferredBaseRotations[metaBuilding.getId()];
|
||||||
} else {
|
} else {
|
||||||
return this.currentBaseRotationGeneral;
|
return this.currentBaseRotationGeneral;
|
||||||
}
|
}
|
||||||
@ -138,14 +138,15 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the base rotation for the current meta-building.
|
* Sets the base rotation for the current meta-building.
|
||||||
|
* @param {number} rotation The new rotation/angle.
|
||||||
*/
|
*/
|
||||||
set currentBaseRotation(rotation) {
|
set currentBaseRotation(rotation) {
|
||||||
if (!this.root.app.settings.getAllSettings().rotationByBuilding) {
|
if (!this.root.app.settings.getAllSettings().rotationByBuilding) {
|
||||||
this.currentBaseRotationGeneral = rotation;
|
this.currentBaseRotationGeneral = rotation;
|
||||||
} else {
|
} else {
|
||||||
const building = this.currentMetaBuilding.get();
|
const metaBuilding = this.currentMetaBuilding.get();
|
||||||
if (building != undefined) {
|
if (metaBuilding) {
|
||||||
this.preferredBaseRotations[building.getId()] = rotation;
|
this.preferredBaseRotations[metaBuilding.getId()] = rotation;
|
||||||
} else {
|
} else {
|
||||||
this.currentBaseRotationGeneral = rotation;
|
this.currentBaseRotationGeneral = rotation;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user