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;
|
||||
if (signalComp) {
|
||||
if (button === enumMouseButton.left) {
|
||||
this.root.systemMgr.systems.constantSignal.querySignalValue(entity, true)
|
||||
this.root.systemMgr.systems.constantSignal.querySignalValue(entity, true);
|
||||
return STOP_PROPAGATION;
|
||||
} else if (button === enumMouseButton.right) {
|
||||
this.root.logic.tryDeleteBuilding(entity);
|
||||
|
@ -36,7 +36,7 @@ export class ConstantSignalSystem extends GameSystemWithFilter {
|
||||
* @param {Entity} entity
|
||||
* @param {Boolean} isEditing
|
||||
*/
|
||||
querySignalValue(entity, isEditing=false) {
|
||||
querySignalValue(entity, isEditing = false) {
|
||||
if (!entity.components.ConstantSignal) {
|
||||
return;
|
||||
}
|
||||
@ -112,23 +112,22 @@ export class ConstantSignalSystem extends GameSystemWithFilter {
|
||||
// Game got stopped
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const entityRef = this.root.entityMgr.findByUid(uid, false);
|
||||
if (!entityRef) {
|
||||
// outdated
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const constantComp = entityRef.components.ConstantSignal;
|
||||
if (!constantComp) {
|
||||
// no longer interesting
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this.root.logic.tryDeleteBuilding(entityRef);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user