Revert "Solution Entities" (#23160)
Revert "Solution Entities (#21916)"
This reverts commit d75e743dd7.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Content.Server.Chemistry.Components;
|
||||
using Content.Server.Chemistry.Containers.EntitySystems;
|
||||
using Content.Shared.Chemistry.EntitySystems;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Popups;
|
||||
@@ -17,23 +16,21 @@ public sealed class RehydratableSystem : EntitySystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<RehydratableComponent, SolutionContainerChangedEvent>(OnSolutionChange);
|
||||
SubscribeLocalEvent<RehydratableComponent, SolutionChangedEvent>(OnSolutionChange);
|
||||
}
|
||||
|
||||
private void OnSolutionChange(Entity<RehydratableComponent> entity, ref SolutionContainerChangedEvent args)
|
||||
private void OnSolutionChange(EntityUid uid, RehydratableComponent comp, SolutionChangedEvent args)
|
||||
{
|
||||
var quantity = _solutions.GetTotalPrototypeQuantity(entity, entity.Comp.CatalystPrototype);
|
||||
if (quantity != FixedPoint2.Zero && quantity >= entity.Comp.CatalystMinimum)
|
||||
var quantity = _solutions.GetTotalPrototypeQuantity(uid, comp.CatalystPrototype);
|
||||
if (quantity != FixedPoint2.Zero && quantity >= comp.CatalystMinimum)
|
||||
{
|
||||
Expand(entity);
|
||||
Expand(uid, comp);
|
||||
}
|
||||
}
|
||||
|
||||
// Try not to make this public if you can help it.
|
||||
private void Expand(Entity<RehydratableComponent> entity)
|
||||
private void Expand(EntityUid uid, RehydratableComponent comp)
|
||||
{
|
||||
var (uid, comp) = entity;
|
||||
|
||||
_popups.PopupEntity(Loc.GetString("rehydratable-component-expands-message", ("owner", uid)), uid);
|
||||
|
||||
var randomMob = _random.Pick(comp.PossibleSpawns);
|
||||
|
||||
Reference in New Issue
Block a user