big Peripheal refactor

This commit is contained in:
2023-06-04 20:52:24 +02:00
parent 2051f486d4
commit fd2b53167e
10 changed files with 86 additions and 72 deletions

View File

@@ -31,7 +31,7 @@ class Net {
@:allow(kernel.Init)
private function new() {
this.interfaces = [for (e in Peripheral.instance.getModems()) e ]; // TODO: is this the way to do it?
this.interfaces = [for (e in Peripheral.instance.getAllModems()) e ]; // TODO: is this the way to do it?
this.interfaces.push(Loopback.instance);
for (interf in interfaces){
@@ -279,7 +279,7 @@ class Net {
data: null,
};
for (modem in Peripheral.instance.getModems()) {
for (modem in Peripheral.instance.getAllModems()) {
if (!modem.isWireless()) continue;
modem.send(Net.BRODCAST_PORT, Net.instance.networkID, pack);
}