Add distance float position handling with backward compatibility #1
@@ -234,18 +234,20 @@ class ChildRegistrationUtils {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is poor code, it should be fixed at some point
|
|
||||||
if (this.mainClass?.upstreamReactor){
|
if (this.mainClass?.upstreamReactor){
|
||||||
this.mainClass.upstreamReactor = reactor; // Add reactor to the main class
|
this.mainClass.upstreamReactor = reactor; // Add reactor to the main class
|
||||||
} else {
|
this.logger.info(`Upstream reactor registered successfully.`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.mainClass?.reactors) {
|
||||||
if (positionVsParent == "downstream") {
|
if (positionVsParent == "downstream") {
|
||||||
this.mainClass.reactors[0] = reactor;
|
this.mainClass.reactors[0] = reactor;
|
||||||
}
|
}
|
||||||
if (positionVsParent == "upstream") {
|
if (positionVsParent == "upstream") {
|
||||||
this.mainClass.reactors[1] = reactor;
|
this.mainClass.reactors[1] = reactor;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.logger.info(`Reactor registered successfully.`);
|
this.logger.info(`Reactor registered successfully.`);
|
||||||
|
}
|
||||||
|
|
||||||
reactor.emitter.on("stateChange", (data) => {
|
reactor.emitter.on("stateChange", (data) => {
|
||||||
this.mainClass.logger.debug(`State change of upstream reactor detected.`);
|
this.mainClass.logger.debug(`State change of upstream reactor detected.`);
|
||||||
|
|||||||
Reference in New Issue
Block a user