Skip to content

Commit

Permalink
WHITE comments added
Browse files Browse the repository at this point in the history
  • Loading branch information
HellCatten committed Aug 24, 2024
1 parent f85c918 commit d954321
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public sealed class MagnetPickupSystem : EntitySystem
[Dependency] private readonly InventorySystem _inventory = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly SharedStorageSystem _storage = default!;
[Dependency] private readonly SharedItemToggleSystem _itemToggle = default!;
[Dependency] private readonly SharedItemToggleSystem _itemToggle = default!; // WD EDIT

private static readonly TimeSpan ScanDelay = TimeSpan.FromSeconds(1);

Expand All @@ -29,7 +29,7 @@ public override void Initialize()
{
base.Initialize();
_physicsQuery = GetEntityQuery<PhysicsComponent>();
SubscribeLocalEvent<MagnetPickupComponent, ExaminedEvent>(onExamined);
SubscribeLocalEvent<MagnetPickupComponent, ExaminedEvent>(onExamined); // WD EDIT
SubscribeLocalEvent<MagnetPickupComponent, MapInitEvent>(OnMagnetMapInit);
}

Expand All @@ -38,6 +38,7 @@ private void OnMagnetMapInit(EntityUid uid, MagnetPickupComponent component, Map
component.NextScan = _timing.CurTime;
}

//WD EDIT
private void onExamined(Entity<MagnetPickupComponent> entity, ref ExaminedEvent args)
{
var onMsg = _itemToggle.IsActivated(entity.Owner)
Expand All @@ -54,11 +55,13 @@ public override void Update(float frameTime)

while (query.MoveNext(out var uid, out var comp, out var storage, out var xform, out var meta))
{
// WD EDIT START
if (!TryComp<ItemToggleComponent>(uid, out var toggle))
continue;

if (!_itemToggle.IsActivated(uid, toggle))
continue;
// WD EDIT END

if (comp.NextScan > currentTime)
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- ArtifactFragment
- Ore
- type: Dumpable
# WHITE EDIT START
- type: ItemToggle
soundActivate:
collection: sparks
Expand All @@ -35,3 +36,4 @@
collection: sparks
params:
variation: 0.250
# WHITE EDIT END
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@
- type: MaterialStorageMagnetPickup # Delta V - Summary: Adds magnet pull from Frontier
magnetEnabled: True
range: 0.30 # Delta V - End Magnet Pull
- type: PlaceableSurface
- type: PlaceableSurface # WHITE EDIT

- type: entity
parent: OreProcessor
Expand Down

0 comments on commit d954321

Please sign in to comment.