mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-07-05 01:28:57 +00:00
Changed motherboard speed to be in percentage of 1mhz instead of in Hertz
This commit is contained in:
parent
77b82992df
commit
a530a9741e
@ -36,7 +36,8 @@ public abstract class TimedDevice extends Device {
|
||||
super(computer);
|
||||
setSpeed(cyclesPerSecond);
|
||||
}
|
||||
@ConfigurableField(name = "Speed", description = "(in hertz)")
|
||||
@ConfigurableField(name = "Speed", description = "(Percentage)")
|
||||
public int speedRatio = 100;
|
||||
public long cyclesPerSecond = defaultCyclesPerSecond();
|
||||
@ConfigurableField(name = "Max speed")
|
||||
public boolean maxspeed = false;
|
||||
@ -170,6 +171,7 @@ public abstract class TimedDevice extends Device {
|
||||
|
||||
@Override
|
||||
public void reconfigure() {
|
||||
cyclesPerSecond = defaultCyclesPerSecond() * speedRatio / 100;
|
||||
if (cyclesPerSecond == 0) {
|
||||
cyclesPerSecond = defaultCyclesPerSecond();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user