Compare commits

...

4 Commits

Author SHA1 Message Date
Astoria 9302d35daa Correct speed and dont reset when stopped 3 weeks ago
Astoria 789d41d92f Merge remote-tracking branch 'origin/main'
# Conflicts:
#	src/main/java/net/brokenmoon/redcontrol/blockentities/CpuEntity.java
3 weeks ago
Astoria 2db508cbdb Merge remote-tracking branch 'origin/main' 3 weeks ago
Astoria 6ace534075 Slow down reset time and reset d register 3 weeks ago

@ -28,7 +28,7 @@ public class CpuEntity extends Peripheral implements CpuControl {
@Override
public CpuState getCpuState() {return state;}
private int resetTimer = 5;
private int resetTimer = 40;
@ -45,12 +45,12 @@ public class CpuEntity extends Peripheral implements CpuControl {
be.notTicked = false;
}
if(be.state == CpuState.RUNNING) {
for (int i = 0; i < 1000; i++)
for (int i = 0; i < 500; i++)
be.step();
} else{
if (be.state == CpuState.RESET && be.resetTimer > 0){
be.resetTimer--;
} else {
} else if(be.state == CpuState.RESET) {
be.core = new Emulator(be.getBus().getRedBus());
}
}
@ -81,7 +81,7 @@ public class CpuEntity extends Peripheral implements CpuControl {
public void reset() {
this.core.reset(this.defaultDriveId, this.defaultMonitorId);
state = CpuState.RESET;
resetTimer = 5;
resetTimer = 40;
markDirty();
world.updateListeners(pos, this.getCachedState(), this.getCachedState(), Block.NOTIFY_LISTENERS);
}

Loading…
Cancel
Save