Convert almost all IActivate instances that open UIs to ActivatableUI (#7028)
* Chem master * Drone support for handhelds * Vending machines, scanners * Cloners, R&D computers * make research a little less sussy * Unfuck wires * PA control computer * Unfuck merge * Clean up git gore for good * Disposals * Microwaves * paper * Magic mirror * More vendors for drones * Solar computer whitelist * EFR review updates
This commit is contained in:
20
Content.Server/Paper/PaperSystem.cs
Normal file
20
Content.Server/Paper/PaperSystem.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.Paper;
|
||||
|
||||
namespace Content.Server.Paper
|
||||
{
|
||||
public sealed class PaperSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<PaperComponent, BeforeActivatableUIOpenEvent>(AfterUIOpen);
|
||||
}
|
||||
|
||||
private void AfterUIOpen(EntityUid uid, PaperComponent component, BeforeActivatableUIOpenEvent args)
|
||||
{
|
||||
component.Mode = SharedPaperComponent.PaperAction.Read;
|
||||
component.UpdateUserInterface();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user