mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-14 19:29:57 +01:00
* Make ServerPackaging automatically get extra server assemblies * Make the switch * Use Content.Server.deps.json instead * Remove debug * Rewrite Now recursively fetches dependencies from Content.Server Only copies dependencies not covered by Robust This removes the need to manually specify most of the dependencies, even the content ones! Also look at runtime key properly to figure out the proper dll name. This actually removes some assemblies that were duplicated between the main directory and assemblies (various Microsoft.Extensions stuff) * Fix test compile errors when updating dependencies Ran across this while updating dependencies on the RT .NET 10 update. Should be fine to merge immediately. * More .NET 10 prep * Convert to SLNX Hell yeah * slnx now has size-2 indents * Update SLNX with new RT system * Remove reference to RT test in toolshed test * Remove accidental usage of transitive RT dependencies * Move Robust project references to RobustApi * Update solution file * Fix warnings in pow3r * Fix nullable warnings in integration tests idk where these came from * gitignore binlog files * Fix transitive dependency warnings in Content.Benchmarks * Update slnx * Okay, the Robust API thing didn't pan out. New plan. It apparently broke clean builds, as the dependencies aren't in the project asset list or something anymore. I tried to fix this, but it seems impossible to do without relying on .NET SDK internals, as there's no point in the NuGet graph walk process that seems cleanly extensible. Instead let's just do the much dumber thing: a bunch of .props files for content to import. Hooray! This also means that I have to go through and *explicitly* disable transitive dependencies everywhere in RT. This thankfully isn't too hard. * Update RT to 269.0.0 * One last solution update * Fix more data definition issues * Update RT to 269.0.1 * Fix it again --------- Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
100 lines
2.7 KiB
C#
100 lines
2.7 KiB
C#
using Content.Shared.Whitelist;
|
|
using Robust.Shared.Analyzers;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.SmartFridge;
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
|
|
[Access(typeof(SmartFridgeSystem))]
|
|
public sealed partial class SmartFridgeComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The container ID that this SmartFridge stores its inventory in
|
|
/// </summary>
|
|
[DataField]
|
|
public string Container = "smart_fridge_inventory";
|
|
|
|
/// <summary>
|
|
/// Whitelist for what entities can be inserted
|
|
/// </summary>
|
|
[DataField]
|
|
public EntityWhitelist? Whitelist;
|
|
|
|
/// <summary>
|
|
/// Blacklist for what entities can be inserted
|
|
/// </summary>
|
|
[DataField]
|
|
public EntityWhitelist? Blacklist;
|
|
|
|
/// <summary>
|
|
/// The sound played on inserting an item into the fridge
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier? InsertSound = new SoundCollectionSpecifier("MachineInsert");
|
|
|
|
/// <summary>
|
|
/// A list of entries to display in the UI
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public List<SmartFridgeEntry> Entries = new();
|
|
|
|
/// <summary>
|
|
/// A mapping of smart fridge entries to the actual contained contents
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
[Access(typeof(SmartFridgeSystem), Other = AccessPermissions.ReadExecute)]
|
|
public Dictionary<SmartFridgeEntry, HashSet<NetEntity>> ContainedEntries = new();
|
|
|
|
/// <summary>
|
|
/// The flavour text displayed at the bottom of the SmartFridge's UI
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId FlavorText = "smart-fridge-request-generic";
|
|
|
|
/// <summary>
|
|
/// Sound that plays when ejecting an item
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier SoundVend = new SoundCollectionSpecifier("VendingDispense")
|
|
{
|
|
Params = new AudioParams
|
|
{
|
|
Volume = -4f,
|
|
Variation = 0.15f
|
|
}
|
|
};
|
|
|
|
/// <summary>
|
|
/// Sound that plays when an item can't be ejected
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier SoundDeny = new SoundCollectionSpecifier("VendingDeny");
|
|
}
|
|
|
|
[Serializable, NetSerializable, DataRecord]
|
|
public partial record struct SmartFridgeEntry
|
|
{
|
|
public string Name;
|
|
|
|
public SmartFridgeEntry(string name)
|
|
{
|
|
Name = name;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum SmartFridgeUiKey : byte
|
|
{
|
|
Key,
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class SmartFridgeDispenseItemMessage(SmartFridgeEntry entry) : BoundUserInterfaceMessage
|
|
{
|
|
public SmartFridgeEntry Entry = entry;
|
|
}
|