Chem guidebook (#17123)
* im good at atomizing. welcome to half-finished chem guides. * wagh * e * save work * aa * woweee UI * finishing the last of it * don't actually update the engine :( --------- Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
This commit is contained in:
42
Content.Shared/Chemistry/SharedChemistryGuideDataSystem.cs
Normal file
42
Content.Shared/Chemistry/SharedChemistryGuideDataSystem.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Chemistry;
|
||||
|
||||
/// <summary>
|
||||
/// This handles the chemistry guidebook and caching it.
|
||||
/// </summary>
|
||||
public abstract class SharedChemistryGuideDataSystem : EntitySystem
|
||||
{
|
||||
[Dependency] protected readonly IPrototypeManager PrototypeManager = default!;
|
||||
|
||||
protected readonly Dictionary<string, ReagentGuideEntry> Registry = new();
|
||||
|
||||
public IReadOnlyDictionary<string, ReagentGuideEntry> ReagentGuideRegistry => Registry;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ReagentGuideRegistryChangedEvent : EntityEventArgs
|
||||
{
|
||||
public ReagentGuideChangeset Changeset;
|
||||
|
||||
public ReagentGuideRegistryChangedEvent(ReagentGuideChangeset changeset)
|
||||
{
|
||||
Changeset = changeset;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ReagentGuideChangeset
|
||||
{
|
||||
public Dictionary<string,ReagentGuideEntry> GuideEntries;
|
||||
|
||||
public HashSet<string> Removed;
|
||||
|
||||
public ReagentGuideChangeset(Dictionary<string, ReagentGuideEntry> guideEntries, HashSet<string> removed)
|
||||
{
|
||||
GuideEntries = guideEntries;
|
||||
Removed = removed;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user