Make PA 40% less jank (#9278)

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2022-08-08 10:31:53 +10:00
committed by GitHub
parent 9078e4caf5
commit f695d239c9
4 changed files with 12 additions and 6 deletions

View File

@@ -334,11 +334,13 @@ namespace Content.Client.ParticleAccelerator.UI
{
return new(this, resourceCache, name, state);
}
UpdateUI(false, false, false, false);
}
private bool StrengthSpinBoxValid(int n)
{
return (n >= 0 && n <= 4 && !_blockSpinBox);
return (n >= 0 && n <= 3 && !_blockSpinBox);
}
private void PowerStateChanged(object? sender, ValueChangedEventArgs e)
@@ -358,13 +360,15 @@ namespace Content.Client.ParticleAccelerator.UI
case 3:
newState = ParticleAcceleratorPowerState.Level2;
break;
case 4:
newState = ParticleAcceleratorPowerState.Level3;
break;
// They can't reach this level anyway and I just want to fix the bugginess for now.
//case 4:
// newState = ParticleAcceleratorPowerState.Level3;
// break;
default:
return;
}
_stateSpinBox.SetButtonDisabled(true);
Owner.SendPowerStateMessage(newState);
}