Skip to content

Commit

Permalink
Fix AbsorbentTest & Shadowkin Test Fail (#1458)
Browse files Browse the repository at this point in the history
classic

this also adds a respiratorcomponent to shadowkin
  • Loading branch information
sleepyyapril authored Jan 11, 2025
1 parent 7485e8d commit 2f6f7be
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public sealed partial class AbsorbentSystem
/// <summary>
/// Tries to clean a number of footprints in a range determined by the component. Returns the number of cleaned footprints.
/// </summary>
private int TryCleanNearbyFootprints(EntityUid user, EntityUid used, Entity<AbsorbentComponent> target, Entity<SolutionComponent> absorbentSoln)
private int TryCleanNearbyFootprints(EntityUid user, EntityUid target, Entity<AbsorbentComponent> used, Entity<SolutionComponent> absorbentSoln)
{
var footprintQuery = GetEntityQuery<FootPrintComponent>();
var targetCoords = Transform(target).Coordinates;
var entities = _lookup.GetEntitiesInRange<FootPrintComponent>(targetCoords, target.Comp.FootprintCleaningRange, LookupFlags.Uncontained);
var entities = _lookup.GetEntitiesInRange<FootPrintComponent>(targetCoords, used.Comp.FootprintCleaningRange, LookupFlags.Uncontained);

// Take up to [MaxCleanedFootprints] footprints closest to the target
var cleaned = entities.AsEnumerable()
Expand All @@ -29,10 +29,10 @@ private int TryCleanNearbyFootprints(EntityUid user, EntityUid used, Entity<Abso
var processed = 0;
foreach (var (uid, footprintComp) in cleaned)
{
if (TryPuddleInteract(user, used, uid, target.Comp, useDelay: null, absorbentSoln))
if (TryPuddleInteract(user, used.Owner, uid, used.Comp, useDelay: null, absorbentSoln))
processed++;

if (processed >= target.Comp.MaxCleanedFootprints)
if (processed >= used.Comp.MaxCleanedFootprints)
break;
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Fluids/EntitySystems/AbsorbentSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void Mop(EntityUid user, EntityUid target, EntityUid used, AbsorbentCompo
return;
}

TryCleanNearbyFootprints(user, used, (target, component), absorberSoln.Value);
TryCleanNearbyFootprints(user, target, (used, component), absorberSoln.Value);
}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Mobs/Species/shadowkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- MobAtmosStandard
- MobFlammable
- BaseMobSpecies
- MobRespirator
id: MobShadowkinBase
name: Urist McShadow
abstract: true
Expand Down

0 comments on commit 2f6f7be

Please sign in to comment.