1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-13 11:40:29 +00:00

Fix advanced modems not actually being advanced

We were constructing the peripheral before the advanced property had
been set, thus it was always false. Yay for Java.

Closes #111
This commit is contained in:
SquidDev 2019-02-12 18:11:04 +00:00
parent ae0f093e73
commit ab6f0ccd16

View File

@ -25,6 +25,7 @@ public abstract class TileWirelessModemBase extends TileGeneric implements IPeri
protected TileWirelessModemBase( boolean advanced ) protected TileWirelessModemBase( boolean advanced )
{ {
this.advanced = advanced; this.advanced = advanced;
this.modem = new Peripheral( this ); // Needs to be initialised after advanced
} }
private static class Peripheral extends WirelessModemPeripheral private static class Peripheral extends WirelessModemPeripheral
@ -62,7 +63,7 @@ public abstract class TileWirelessModemBase extends TileGeneric implements IPeri
private final boolean advanced; private final boolean advanced;
private boolean hasModemDirection = false; private boolean hasModemDirection = false;
private EnumFacing modemDirection = EnumFacing.DOWN; private EnumFacing modemDirection = EnumFacing.DOWN;
private final ModemPeripheral modem = new Peripheral( this ); private final ModemPeripheral modem;
private boolean destroyed = false; private boolean destroyed = false;
private boolean on = false; private boolean on = false;