More borg tweaks (#19143)

* borg tweaks but i'm gonna go code fun stuff first

* werkin' on it

* a ton of tweaks

* fuck everyone and then myself
This commit is contained in:
Nemanja
2023-08-14 19:34:23 -04:00
committed by GitHub
parent 8b0eb7e4de
commit 7ddee71379
40 changed files with 299 additions and 175 deletions

View File

@@ -1,4 +1,3 @@
using Content.Shared.Random.Helpers;
using Robust.Server.Containers;
using Robust.Shared.Containers;
@@ -13,9 +12,6 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
[DataField("containers")]
public List<string> Containers = new();
[DataField("randomOffset")]
public float RandomOffset = 0.25f;
public void Execute(EntityUid owner, DestructibleSystem system, EntityUid? cause = null)
{
if (!system.EntityManager.TryGetComponent<ContainerManagerComponent>(owner, out var containerManager))
@@ -29,11 +25,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
if (!containerSys.TryGetContainer(owner, containerId, out var container, containerManager))
continue;
var entities = containerSys.EmptyContainer(container, true);
foreach (var ent in entities)
{
ent.RandomOffset(RandomOffset);
}
containerSys.EmptyContainer(container, true);
}
}
}