Skip to content

Commit

Permalink
Вязкость реагентов следов теперь не влияет на скорость движения (#99)
Browse files Browse the repository at this point in the history
* no viscosity for footprints

* // Corvax-Next-Footsteps

* footprintsteps
  • Loading branch information
CaptainSqrBeard authored Nov 30, 2024
1 parent d3b3bc2 commit e7ec454
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Content.Server/Fluids/EntitySystems/PuddleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ private void OnSolutionUpdate(Entity<PuddleComponent> entity, ref SolutionContai

_deletionQueue.Remove(entity);
UpdateSlip(entity, entity.Comp, args.Solution);
UpdateSlow(entity, args.Solution);
UpdateSlow(entity, args.Solution, entity.Comp); // Corvax-Next-Footprints
UpdateEvaporation(entity, args.Solution);
UpdateAppearance(entity, entity.Comp);
}
Expand Down Expand Up @@ -421,8 +421,13 @@ private void UpdateSlip(EntityUid entityUid, PuddleComponent component, Solution
}
}

private void UpdateSlow(EntityUid uid, Solution solution)
private void UpdateSlow(EntityUid uid, Solution solution, PuddleComponent component) // Corvax-Next-Footprints
{
// Corvax-Next-Footprints-Start
if (!component.ViscosityAffectsMovement)
return;
// Corvax-Next-Footprints-End

var maxViscosity = 0f;
foreach (var (reagent, _) in solution.Contents)
{
Expand Down
5 changes: 5 additions & 0 deletions Content.Shared/Fluids/Components/PuddleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ public sealed partial class PuddleComponent : Component

[DataField("solutionRef")]
public Entity<SolutionComponent>? Solution;

// Corvax-Next-Footprints-Start
[DataField]
public bool ViscosityAffectsMovement = true;
// Corvax-Next-Footprints-End
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- type: Footprint
- type: Puddle
solution: step
viscosityAffectsMovement: false
- type: Appearance
- type: ExaminableSolution
solution: step
Expand Down

0 comments on commit e7ec454

Please sign in to comment.