fixes the solarcontrolwindow

updates submodule (just realized i didn't need to, whatever)
This commit is contained in:
Paul
2021-07-22 20:02:18 +02:00
parent c7e32ff0c7
commit ed384fbc91
3 changed files with 10 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
<SS14Window xmlns="https://spacestation14.io" <SS14Window xmlns="https://spacestation14.io"
xmlns:scc="clr-namespace:Content.Client.GameObjects.Components.Power" xmlns:power="clr-namespace:Content.Client.Power"
Title="{Loc 'solar-control-window-title'}" Title="{Loc 'solar-control-window-title'}"
Resizable="False"> Resizable="False">
<BoxContainer Orientation="Horizontal"> <BoxContainer Orientation="Horizontal">
@@ -26,7 +26,7 @@
<Label Text="{Loc 'solar-control-window-press-enter-to-confirm'}"/><Label Text=""/> <Label Text="{Loc 'solar-control-window-press-enter-to-confirm'}"/><Label Text=""/>
</GridContainer> </GridContainer>
<scc:SolarControlNotARadar Name="NotARadar"/> <power:SolarControlNotARadar Name="NotARadar"/>
</BoxContainer> </BoxContainer>
</SS14Window> </SS14Window>

View File

@@ -1,21 +1,19 @@
using System; using System;
using JetBrains.Annotations; using Content.Client.GameObjects.Components;
using Content.Shared.Solar; using Content.Shared.Solar;
using JetBrains.Annotations;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
using Robust.Client.Graphics; using Robust.Client.Graphics;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface; using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects; using Robust.Client.UserInterface.XAML;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Timing; using Robust.Shared.Timing;
namespace Content.Client.GameObjects.Components.Power namespace Content.Client.Power
{ {
[GenerateTypedNameReferences] [GenerateTypedNameReferences]
public sealed partial class SolarControlWindow : SS14Window, IComputerWindow<SolarControlConsoleBoundInterfaceState> public sealed partial class SolarControlWindow : SS14Window, IComputerWindow<SolarControlConsoleBoundInterfaceState>
@@ -31,7 +29,7 @@ namespace Content.Client.GameObjects.Components.Power
{ {
PanelRotation.OnTextEntered += (text) => { PanelRotation.OnTextEntered += (text) => {
double value; double value;
if (double.TryParse(text.Text, out value)) if (double.TryParse((string?) text.Text, out value))
{ {
SolarControlConsoleAdjustMessage msg = new SolarControlConsoleAdjustMessage(); SolarControlConsoleAdjustMessage msg = new SolarControlConsoleAdjustMessage();
msg.Rotation = Angle.FromDegrees(value); msg.Rotation = Angle.FromDegrees(value);
@@ -44,7 +42,7 @@ namespace Content.Client.GameObjects.Components.Power
}; };
PanelVelocity.OnTextEntered += (text) => { PanelVelocity.OnTextEntered += (text) => {
double value; double value;
if (double.TryParse(text.Text, out value)) if (double.TryParse((string?) text.Text, out value))
{ {
SolarControlConsoleAdjustMessage msg = new SolarControlConsoleAdjustMessage(); SolarControlConsoleAdjustMessage msg = new SolarControlConsoleAdjustMessage();
msg.Rotation = NotARadar.PredictedPanelRotation; msg.Rotation = NotARadar.PredictedPanelRotation;