Remove random reaction system (#1345)

* wow

* d
This commit is contained in:
Red
2025-06-01 15:01:32 +03:00
committed by GitHub
parent 759e7c73d9
commit a99f2fcd50
11 changed files with 38 additions and 139 deletions

View File

@@ -1,26 +0,0 @@
using Content.Server.GameTicking.Events;
using Content.Shared.Chemistry.Reaction;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
namespace Content.Server._CP14.Alchemy.EntitySystems;
public sealed class CP14RandomReagentReactionsSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly IRobustRandom _random = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RoundStartingEvent>(OnRoundStart);
}
private void OnRoundStart(RoundStartingEvent ev)
{
foreach (var reaction in _proto.EnumeratePrototypes<ReactionPrototype>())
{
reaction.Cp14RandomProductIndex = _random.Next(reaction.Cp14RandomProducts.Count);
}
}
}