Salvage magnet revamp (#23119)
* Generic offering window * More work * weh * Parity * Progression meter * magnet * rona * PG asteroid work * code red * Asteroid spawnings * clams * a * Marker fixes * More fixes * Workings of biome asteroids * A * Fix this loading code * a * Fix masking * weh * Fixes * Magnet claiming * toe * petogue * magnet * Bunch of fixes * Fix default * Fixes * asteroids * Fix offerings * Localisation and a bunch of fixes * a * Fixes * Preliminary draft * Announcement fixes * Fixes and bump spawn rate * Fix asteroid spawns and UI * More fixes * Expeditions fix * fix * Gravity * Fix announcement rounding * a * Offset tweak * sus * jankass * Fix merge
This commit is contained in:
21
Content.Server/Shuttles/DroneConsoleComponent.cs
Normal file
21
Content.Server/Shuttles/DroneConsoleComponent.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Shuttles;
|
||||
|
||||
// Primo shitcode
|
||||
/// <summary>
|
||||
/// Lets you remotely control a shuttle.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class DroneConsoleComponent : Component
|
||||
{
|
||||
[DataField("components", required: true)]
|
||||
public ComponentRegistry Components = default!;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="ShuttleConsoleComponent"/> that we're proxied into.
|
||||
/// </summary>
|
||||
[DataField("entity")]
|
||||
public EntityUid? Entity;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
using Content.Server.Shuttle.Components;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Server.Shuttles.Events;
|
||||
using Content.Server.Station.Components;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Server.Shuttle.Components;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Server.Shuttles.Events;
|
||||
using Content.Server.Station.Systems;
|
||||
|
||||
@@ -10,20 +10,25 @@ namespace Content.Server.Shuttles.Systems;
|
||||
/// </summary>
|
||||
public sealed class SpaceGarbageSystem : EntitySystem
|
||||
{
|
||||
private EntityQuery<TransformComponent> _xformQuery;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
_xformQuery = GetEntityQuery<TransformComponent>();
|
||||
SubscribeLocalEvent<SpaceGarbageComponent, StartCollideEvent>(OnCollide);
|
||||
}
|
||||
|
||||
private void OnCollide(EntityUid uid, SpaceGarbageComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (args.OtherBody.BodyType != BodyType.Static) return;
|
||||
if (args.OtherBody.BodyType != BodyType.Static)
|
||||
return;
|
||||
|
||||
var ourXform = Transform(uid);
|
||||
var otherXform = Transform(args.OtherEntity);
|
||||
var ourXform = _xformQuery.GetComponent(uid);
|
||||
var otherXform = _xformQuery.GetComponent(args.OtherEntity);
|
||||
|
||||
if (ourXform.GridUid == otherXform.GridUid) return;
|
||||
if (ourXform.GridUid == otherXform.GridUid)
|
||||
return;
|
||||
|
||||
QueueDel(uid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user