Syndicate sponge for uplink (#17841)
* Syndicate sponge for uplink * Fix yaml error * Made changes mentioned in review * Made changes according to reviews
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Chemistry.Components;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Chemistry.EntitySystems;
|
||||
|
||||
@@ -8,6 +9,7 @@ public sealed class RehydratableSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedPopupSystem _popups = default!;
|
||||
[Dependency] private readonly SolutionContainerSystem _solutions = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -30,7 +32,10 @@ public sealed class RehydratableSystem : EntitySystem
|
||||
{
|
||||
_popups.PopupEntity(Loc.GetString("rehydratable-component-expands-message", ("owner", uid)), uid);
|
||||
|
||||
var target = Spawn(comp.TargetPrototype, Transform(uid).Coordinates);
|
||||
var randomMob = _random.Pick(comp.PossibleSpawns);
|
||||
|
||||
var target = Spawn(randomMob, Transform(uid).Coordinates);
|
||||
|
||||
Transform(target).AttachToGridOrMap();
|
||||
var ev = new GotRehydratedEvent(target);
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
|
||||
Reference in New Issue
Block a user