перенос файлов сервера из папки White в _White
This commit is contained in:
27
Content.Server/_White/Economy/CommandBudgetSystem.cs
Normal file
27
Content.Server/_White/Economy/CommandBudgetSystem.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Content.Server.Cargo.Components;
|
||||
using Content.Server.Paper;
|
||||
using Content.Server.Station.Systems;
|
||||
|
||||
namespace Content.Server._White.Economy;
|
||||
|
||||
public sealed class CommandBudgetSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly PaperSystem _paper = default!;
|
||||
[Dependency] private readonly StationSystem _station = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<CommandBudgetPinPaperComponent, MapInitEvent>(OnMapInit);
|
||||
}
|
||||
|
||||
private void OnMapInit(EntityUid uid, CommandBudgetPinPaperComponent component, MapInitEvent args)
|
||||
{
|
||||
if (!TryComp(_station.GetOwningStation(uid), out StationBankAccountComponent? account))
|
||||
return;
|
||||
|
||||
var pin = account.BankAccount.AccountPin;
|
||||
_paper.SetContent(uid,Loc. GetString("command-budget-pin-message", ("pin", pin)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user