mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Fix Lint (Once more)
This commit is contained in:
parent
6a2bdb22ab
commit
f6714fdcc2
@ -31,7 +31,7 @@ export class HUDEditConstantSignal extends BaseHUDPart {
|
|||||||
const signalComp = entity.components.ConstantSignal;
|
const signalComp = entity.components.ConstantSignal;
|
||||||
if (signalComp) {
|
if (signalComp) {
|
||||||
if (button === enumMouseButton.left) {
|
if (button === enumMouseButton.left) {
|
||||||
this.root.systemMgr.systems.constantSignal.querySignalValue(entity, true)
|
this.root.systemMgr.systems.constantSignal.querySignalValue(entity, true);
|
||||||
return STOP_PROPAGATION;
|
return STOP_PROPAGATION;
|
||||||
} else if (button === enumMouseButton.right) {
|
} else if (button === enumMouseButton.right) {
|
||||||
this.root.logic.tryDeleteBuilding(entity);
|
this.root.logic.tryDeleteBuilding(entity);
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export class ConstantSignalSystem extends GameSystemWithFilter {
|
|||||||
* @param {Entity} entity
|
* @param {Entity} entity
|
||||||
* @param {Boolean} isEditing
|
* @param {Boolean} isEditing
|
||||||
*/
|
*/
|
||||||
querySignalValue(entity, isEditing=false) {
|
querySignalValue(entity, isEditing = false) {
|
||||||
if (!entity.components.ConstantSignal) {
|
if (!entity.components.ConstantSignal) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -112,23 +112,22 @@ export class ConstantSignalSystem extends GameSystemWithFilter {
|
|||||||
// Game got stopped
|
// Game got stopped
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const entityRef = this.root.entityMgr.findByUid(uid, false);
|
const entityRef = this.root.entityMgr.findByUid(uid, false);
|
||||||
if (!entityRef) {
|
if (!entityRef) {
|
||||||
// outdated
|
// outdated
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const constantComp = entityRef.components.ConstantSignal;
|
const constantComp = entityRef.components.ConstantSignal;
|
||||||
if (!constantComp) {
|
if (!constantComp) {
|
||||||
// no longer interesting
|
// no longer interesting
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.root.logic.tryDeleteBuilding(entityRef);
|
this.root.logic.tryDeleteBuilding(entityRef);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user