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

Вязкость реагентов следов теперь не влияет на скорость движения #99

Merged
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
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
Loading