Refactoring of solar control console (#4072)
* Refactor/fix client-side of solar control computer (introduce ComputerBoundUserInterface & fix bugs) * Refactor server side of solar control computer (introduce BaseComputerUserInterfaceComponent) * If you can't interact, then messages to computers are blocked. * Add 'not powered' messages, migrate activation logic partially to an EntitySystem * Move solar control console to a XAML UI * Remove useless comment on UserInterfaceKey * BaseComputerUserInterfaceComponent: Remove EnsureComponent<PowerReceiver>, it's not necessary * Fix solar panel occlusion check direction * Solar Control Console refactors/etc. : Handle namespace renames
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Server.GameObjects.Components;
|
||||
using Content.Shared.GameTicking;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Maths;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class ComputerUIActivatorSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<BaseComputerUserInterfaceComponent, ActivateInWorldEvent>(HandleActivate);
|
||||
}
|
||||
|
||||
private void HandleActivate(EntityUid uid, BaseComputerUserInterfaceComponent component, ActivateInWorldEvent args)
|
||||
{
|
||||
component.ActivateThunk(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user