Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AbsorbentTest & Shadowkin Test Fail #1458

Merged
merged 4 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading