CatStation/Content.Shared/Chemistry/SharedChemistryGuideDataSystem.cs
Whatstone a8453723d8
Cleanup: ProtoMan Part 1 - remove Shared EntitySystem IPrototypeManager instances (#44386)
* Remove Shared System IPrototypeManager instances

* Remove RecipeManager IPrototypeManager instance

* Fix ItemSystem IPrototypeManager refs, use TryComp

* SharedItemSystem changes, EntWhitelist CompName

* HasComponent->HasComp
2026-06-29 10:18:44 +00:00

42 lines
1.2 KiB
C#

using Content.Shared.Chemistry.Reagent;
using Robust.Shared.Serialization;
namespace Content.Shared.Chemistry;
/// <summary>
/// This handles the chemistry guidebook and caching it.
/// </summary>
public abstract partial class SharedChemistryGuideDataSystem : EntitySystem
{
protected readonly Dictionary<string, ReagentGuideEntry> Registry = new();
public IReadOnlyDictionary<string, ReagentGuideEntry> ReagentGuideRegistry => Registry;
// Only ran on the server
public abstract void ReloadAllReagentPrototypes();
}
[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;
}
}