Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into Cabinetification
Browse files Browse the repository at this point in the history
  • Loading branch information
ps3moira committed Jan 19, 2025
2 parents b542938 + c0fcf4b commit 91b6654
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
10 changes: 9 additions & 1 deletion Content.Server/Implants/ImplantedSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Shared.Implants.Components;
using Content.Server.Body.Components;
using Content.Shared.Implants.Components;
using Robust.Shared.Containers;

namespace Content.Server.Implants;
Expand All @@ -9,6 +10,7 @@ public void InitializeImplanted()
{
SubscribeLocalEvent<ImplantedComponent, ComponentInit>(OnImplantedInit);
SubscribeLocalEvent<ImplantedComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<ImplantedComponent, BeingGibbedEvent>(OnGibbed);
}

private void OnImplantedInit(EntityUid uid, ImplantedComponent component, ComponentInit args)
Expand All @@ -22,4 +24,10 @@ private void OnShutdown(EntityUid uid, ImplantedComponent component, ComponentSh
//If the entity is deleted, get rid of the implants
_container.CleanContainer(component.ImplantContainer);
}

private void OnGibbed(Entity<ImplantedComponent> ent, ref BeingGibbedEvent args)
{
//If the entity is gibbed, get rid of the implants
_container.CleanContainer(ent.Comp.ImplantContainer);
}
}
10 changes: 3 additions & 7 deletions Content.Shared/Implants/SharedSubdermalImplantSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Linq;
using Content.Shared.Actions;
using Content.Shared.Implants.Components;
using Content.Shared.Interaction;
Expand All @@ -8,6 +7,7 @@
using JetBrains.Annotations;
using Robust.Shared.Containers;
using Robust.Shared.Network;
using System.Linq;

namespace Content.Shared.Implants;

Expand All @@ -17,6 +17,7 @@ public abstract class SharedSubdermalImplantSystem : EntitySystem
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly TagSystem _tag = default!;
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;

public const string BaseStorageId = "storagebase";

Expand Down Expand Up @@ -75,16 +76,11 @@ private void OnRemove(EntityUid uid, SubdermalImplantComponent component, EntGot
if (!_container.TryGetContainer(uid, BaseStorageId, out var storageImplant))
return;

var entCoords = Transform(component.ImplantedEntity.Value).Coordinates;

var containedEntites = storageImplant.ContainedEntities.ToArray();

foreach (var entity in containedEntites)
{
if (Terminating(entity))
continue;

_container.RemoveEntity(storageImplant.Owner, entity, force: true, destination: entCoords);
_transformSystem.DropNextTo(entity, uid);
}
}

Expand Down
16 changes: 8 additions & 8 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
Entries:
- author: deltanedas
changes:
- message: Adjusted the costs and production times of all electronics so they're
more consistent with eachother.
type: Tweak
id: 7331
time: '2024-09-09T19:34:18.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/31524
- author: Winkarst-cpu
changes:
- message: Now fire axe (the flaming one), and an advanced circular saw are Syndicate
Expand Down Expand Up @@ -3913,3 +3905,11 @@
id: 7830
time: '2025-01-19T05:32:34.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/34475
- author: Winkarst-cpu
changes:
- message: Now items from the storage implant drop on the floor upon gibbing of
the owner.
type: Tweak
id: 7831
time: '2025-01-19T19:48:58.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/33493

0 comments on commit 91b6654

Please sign in to comment.