Files
tbd-station-14/Content.Shared/Chemistry/SharedChemistryGuideDataSystem.cs
SlamBamActionman 3200ba88a5 Add ability for +VVEDIT users to scale damage/healing in the game (#35255)
* Initial commit

* Add universal modifier for all damage/heals, make guidebooks work.

* help text
2025-02-18 08:28:42 +01:00

46 lines
1.3 KiB
C#

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;
// 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;
}
}