Departmental Economy (#36445)

* Cargo Accounts, Request Consoles, and lock boxes

* Funding Allocation Computer

* final changes

* test fix

* remove dumb code

* ScarKy0 review

* first cour

* second cour

* Update machines.yml

* review

---------

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Co-authored-by: Milon <milonpl.git@proton.me>
This commit is contained in:
Nemanja
2025-04-13 09:22:36 -04:00
committed by GitHub
parent 5f78b72763
commit 12b75beeab
62 changed files with 2106 additions and 331 deletions

View File

@@ -0,0 +1,49 @@
using Content.Shared.Cargo.Prototypes;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Cargo.Components;
/// <summary>
/// A console that manipulates the distribution of revenue on the station.
/// </summary>
[RegisterComponent, NetworkedComponent]
[Access(typeof(SharedCargoSystem))]
public sealed partial class FundingAllocationConsoleComponent : Component
{
/// <summary>
/// Sound played when the budget distribution is set.
/// </summary>
[DataField]
public SoundSpecifier SetDistributionSound = new SoundCollectionSpecifier("CargoPing");
}
[Serializable, NetSerializable]
public sealed class SetFundingAllocationBuiMessage : BoundUserInterfaceMessage
{
public Dictionary<ProtoId<CargoAccountPrototype>, int> Percents;
public SetFundingAllocationBuiMessage(Dictionary<ProtoId<CargoAccountPrototype>, int> percents)
{
Percents = percents;
}
}
[Serializable, NetSerializable]
public sealed class FundingAllocationConsoleBuiState : BoundUserInterfaceState
{
public NetEntity Station;
public FundingAllocationConsoleBuiState(NetEntity station)
{
Station = station;
}
}
[Serializable, NetSerializable]
public enum FundingAllocationConsoleUiKey : byte
{
Key
}