Typo, redundant string interpolation, namespaces and imports cleanup (#2068)
* Readonly, typos and redundant string interpolations * Namespaces * Optimize imports * Address reviews * but actually * Localize missing strings * Remove redundant vars
This commit is contained in:
@@ -77,15 +77,15 @@ namespace Content.Client.GameObjects.Components.Kitchen
|
||||
protected override void UpdateState(BoundUserInterfaceState state)
|
||||
{
|
||||
base.UpdateState(state);
|
||||
if (!(state is MicrowaveUpdateUserInterfaceState cstate))
|
||||
if (!(state is MicrowaveUpdateUserInterfaceState cState))
|
||||
{
|
||||
return;
|
||||
}
|
||||
_menu.ToggleBusyDisableOverlayPanel(cstate.IsMicrowaveBusy);
|
||||
RefreshContentsDisplay(cstate.ReagentQuantities, cstate.ContainedSolids);
|
||||
var currentlySelectedTimeButton = (Button) _menu.CookTimeButtonVbox.GetChild(cstate.ActiveButtonIndex);
|
||||
_menu.ToggleBusyDisableOverlayPanel(cState.IsMicrowaveBusy);
|
||||
RefreshContentsDisplay(cState.ReagentQuantities, cState.ContainedSolids);
|
||||
var currentlySelectedTimeButton = (Button) _menu.CookTimeButtonVbox.GetChild(cState.ActiveButtonIndex);
|
||||
currentlySelectedTimeButton.Pressed = true;
|
||||
var label = cstate.ActiveButtonIndex <= 0 ? Loc.GetString("INSTANT") : cstate.CurrentCookTime.ToString();
|
||||
var label = cState.ActiveButtonIndex <= 0 ? Loc.GetString("INSTANT") : cState.CurrentCookTime.ToString();
|
||||
_menu._cookTimeInfoLabel.Text = $"{Loc.GetString("COOK TIME")}: {label}";
|
||||
}
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@ namespace Content.Client.GameObjects.Components.Kitchen
|
||||
sprite.LayerSetState(MicrowaveVisualizerLayers.BaseUnlit, "mw_running_unlit");
|
||||
var audioParams = AudioParams.Default;
|
||||
audioParams.Loop = true;
|
||||
var schedSound = new ScheduledSound();
|
||||
schedSound.Filename = "/Audio/Machines/microwave_loop.ogg";
|
||||
schedSound.AudioParams = audioParams;
|
||||
var scheduledSound = new ScheduledSound();
|
||||
scheduledSound.Filename = "/Audio/Machines/microwave_loop.ogg";
|
||||
scheduledSound.AudioParams = audioParams;
|
||||
_loopingSoundComponent.StopAllSounds();
|
||||
_loopingSoundComponent.AddScheduledSound(schedSound);
|
||||
_loopingSoundComponent.AddScheduledSound(scheduledSound);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user