Skip to content
Permalink
Browse files

Turn on ServerComputer instances if they have timed out

  • Loading branch information...
SquidDev committed Sep 16, 2017
1 parent 1c8480a commit cd6b076efe0ec22b89b7b374f80265248dd026fa
@@ -37,6 +37,7 @@
protected String m_label;
protected boolean m_on;
protected boolean m_startOn;
protected boolean m_fresh;

protected TileComputerBase()
{
@@ -45,6 +46,7 @@ protected TileComputerBase()
m_label = null;
m_on = false;
m_startOn = false;
m_fresh = false;
}

@Override
@@ -213,7 +215,7 @@ public void update()
ServerComputer computer = createServerComputer();
if( computer != null )
{
if( m_startOn )
if( m_startOn || (m_fresh && m_on) )
{
computer.turnOn();
m_startOn = false;
@@ -223,6 +225,7 @@ public void update()
{
updateOutput();
}
m_fresh = false;
m_computerID = computer.getID();
m_label = computer.getLabel();
m_on = computer.isOn();
@@ -471,6 +474,7 @@ public ServerComputer createServerComputer()
{
ServerComputer computer = createComputer( m_instanceID, m_computerID );
ComputerCraft.serverComputerRegistry.add( m_instanceID, computer );
m_fresh = true;
changed = true;
}
if( changed )

0 comments on commit cd6b076

Please sign in to comment.
You can’t perform that action at this time.