Add docking window to shuttle consoles (#8756)
* lewd * A * Realtime * Sleepy dork * Draw radar position * Accurate infiltrator * experiments * Better drawing * Labels * I need aan adult * Cleanup * Show toggles * display I guess * A * fix * fix * cleanupsies * Bit more polish * Make sure mass scanners actually work * Remove dummy state * fren * opposite * aghost crash * comment * What's in a name * woops * Show docking ports * Dock highlighting * Drawing dock * Shitty docks * Lots of docking drawing * Autodock working * dork * More graceful shutdown * zoomies * Lines and distance change * revert * Good enough * cleanup * Fix default range * Dock UI and loc update * Update on undock * Loc fixes
This commit is contained in:
28
Content.Server/Shuttles/Systems/SpaceGarbageSystem.cs
Normal file
28
Content.Server/Shuttles/Systems/SpaceGarbageSystem.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
|
||||
namespace Content.Server.Shuttles.Systems;
|
||||
|
||||
/// <summary>
|
||||
/// Deletes anything with <see cref="SpaceGarbageComponent"/> that has a cross-grid collision with a static body.
|
||||
/// </summary>
|
||||
public sealed class SpaceGarbageSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<SpaceGarbageComponent, StartCollideEvent>(OnCollide);
|
||||
}
|
||||
|
||||
private void OnCollide(EntityUid uid, SpaceGarbageComponent component, StartCollideEvent args)
|
||||
{
|
||||
var ourXform = Transform(args.OurFixture.Body.Owner);
|
||||
var otherXform = Transform(args.OtherFixture.Body.Owner);
|
||||
|
||||
if (ourXform.GridEntityId == otherXform.GridEntityId ||
|
||||
args.OtherFixture.Body.BodyType != BodyType.Static) return;
|
||||
|
||||
QueueDel(uid);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user