me/cache: Add indication of booting/nonbooting to event

The booting/nonbooting event is posted whenever the ME system starts its
"boot" phase and when the "boot" phase is finished. This commit
distinguishes the two phases.

Some subscribers might need this information to determine whether to push
an update or not.

An example is written in this commit - part interface terminal is only
curious about when the terminal boots back up, not when the network enters
the booting state.
This commit is contained in:
Firenoo authored and Martin Robertz committed 2023-10-27 13:52:45 +02:00
1 parent e41c1b8036
commit 59fea5ca02
3 files changed
+31 -2

No files matched your search

+2 -2
View File
@@ -85,7 +85,7 @@ public class PathGridCache implements IPathingGrid {
if (this.updateNetwork) {
if (!this.booting) {
this.myGrid.postEvent(new MENetworkBootingStatusChange());
this.myGrid.postEvent(new MENetworkBootingStatusChange(true));
}
this.booting = true;
@@ -186,7 +186,7 @@ public class PathGridCache implements IPathingGrid {
this.booting = false;
this.setChannelPowerUsage(this.getChannelsByBlocks() / 128.0);
this.myGrid.postEvent(new MENetworkBootingStatusChange());
this.myGrid.postEvent(new MENetworkBootingStatusChange(false));
}
}
}