Some work on the mess that is this power code.
Jesus. Tons of fixes, refactors and other things. The powernet's code is still awful though.
This commit is contained in:
@@ -75,6 +75,7 @@
|
||||
<Compile Include="GameObjects\Components\Items\ClientHandsComponent.cs" />
|
||||
<Compile Include="Interfaces\GameObjects\Components\Items\IHandsComponent.cs" />
|
||||
<Compile Include="UserInterface\HandsGui.cs" />
|
||||
<Compile Include="GameObjects\Components\Power\PowerDebugTool.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Content.Client.GameObjects;
|
||||
using Content.Client.GameObjects.Components.Power;
|
||||
using Content.Client.GameObjects.Components.Storage;
|
||||
using Content.Client.Interfaces.GameObjects;
|
||||
using SS14.Shared.ContentPack;
|
||||
@@ -43,6 +44,7 @@ namespace Content.Client
|
||||
factory.RegisterReference<HandsComponent, IHandsComponent>();
|
||||
factory.Register<ClientStorageComponent>();
|
||||
factory.Register<ClientInventoryComponent>();
|
||||
factory.Register<PowerDebugTool>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Power;
|
||||
using SS14.Client.UserInterface.Controls;
|
||||
using SS14.Client.UserInterface.CustomControls;
|
||||
using SS14.Shared.GameObjects;
|
||||
using SS14.Shared.Interfaces.GameObjects;
|
||||
using SS14.Shared.Interfaces.Network;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Power
|
||||
{
|
||||
public class PowerDebugTool : SharedPowerDebugTool
|
||||
{
|
||||
public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null)
|
||||
{
|
||||
base.HandleMessage(message, netChannel, component);
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case OpenDataWindowMsg msg:
|
||||
var window = new SS14Window();
|
||||
window.Contents.AddChild(new Label() { Text = msg.Data });
|
||||
window.AddToScreen();
|
||||
window.Open();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user