]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix nymphs being deleted immediatly after spawning (#25344)
authorArendian <137322659+Arendian@users.noreply.github.com>
Sat, 17 Feb 2024 16:38:21 +0000 (17:38 +0100)
committerGitHub <noreply@github.com>
Sat, 17 Feb 2024 16:38:21 +0000 (09:38 -0700)
* nymphs now don't get deleted together with the body of the diona

* moved nymph system to server

Content.Server/Species/Systems/NymphSystem.cs [moved from Content.Shared/Species/Systems/NymphSystem.cs with 75% similarity]

similarity index 75%
rename from Content.Shared/Species/Systems/NymphSystem.cs
rename to Content.Server/Species/Systems/NymphSystem.cs
index 7acbf2e152868d40eb2031a46d2b22d768bb1d37..8d0646ae8e46777b6fc4216e43234d9f340d0f61 100644 (file)
@@ -1,15 +1,15 @@
+using Content.Server.Mind;
 using Content.Shared.Species.Components;
 using Content.Shared.Body.Events;
-using Content.Shared.Mind;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Timing;
 
-namespace Content.Shared.Species;
+namespace Content.Server.Species.Systems;
 
 public sealed partial class NymphSystem : EntitySystem
 {
-    [Dependency] protected readonly IPrototypeManager _protoManager = default!;
-    [Dependency] private readonly SharedMindSystem _mindSystem = default!;
+    [Dependency] private readonly IPrototypeManager _protoManager= default!;
+    [Dependency] private readonly MindSystem _mindSystem = default!;
     [Dependency] private readonly IGameTiming _timing = default!;
 
     public override void Initialize()
@@ -31,11 +31,11 @@ public sealed partial class NymphSystem : EntitySystem
             return;
 
         var coords = Transform(uid).Coordinates;
-        var nymph = EntityManager.SpawnEntity(entityProto.ID, coords);
+        var nymph = EntityManager.SpawnAtPosition(entityProto.ID, coords);
 
         if (comp.TransferMind == true && _mindSystem.TryGetMind(args.OldBody, out var mindId, out var mind))
             _mindSystem.TransferTo(mindId, nymph, mind: mind);
 
-        EntityManager.QueueDeleteEntity(uid);
+        QueueDel(uid);
     }
 }