big Peripheal refactor
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user