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:
metalgearsloth
2024-01-04 14:25:32 +11:00
committed by GitHub
parent 98f5f47355
commit bf79acd127
66 changed files with 2257 additions and 1252 deletions

View File

@@ -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);
}