1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-25 02:47:39 +00:00

Add a test which boots a computer and runs forever

Ideally we'd add a couple more tests in the future, but this'll do for
now.

The bootstrap class is largely yoinked from CCTweaks-Lua, so is a tad
ugly. It works though.
This commit is contained in:
SquidDev
2019-02-26 08:44:17 +00:00
parent f1d10809d5
commit c373583723
6 changed files with 484 additions and 3 deletions

View File

@@ -186,7 +186,7 @@ public class Computer
}
}
public void advance()
public void tick()
{
synchronized( this )
{
@@ -568,7 +568,7 @@ public class Computer
@SuppressWarnings( "unused" )
public void advance( double dt )
{
advance();
tick();
}
public static final String[] s_sideNames = IAPIEnvironment.SIDE_NAMES;

View File

@@ -105,7 +105,7 @@ public class ServerComputer extends ServerTerminal implements IComputer, IComput
public void update()
{
super.update();
m_computer.advance();
m_computer.tick();
m_changedLastFrame = m_computer.pollAndResetChanged() || m_changed;
m_changed = false;