Skip to content

Commit

Permalink
[Port] Вязкость реагентов следов теперь не влияет на скорость движения (
Browse files Browse the repository at this point in the history
#970)

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

* no viscosity for footprints

* // Corvax-Next-Footsteps

* footprintsteps

* Update PuddleSystem.cs

---------

Co-authored-by: csqrb <[email protected]>
  • Loading branch information
Roudenn and CaptainSqrBeard authored Dec 8, 2024
1 parent 205b403 commit d179fd1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 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); // backmen: footsteps
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(Entity<PuddleComponent> uid, Solution solution) // backmen: footsteps
{
// start-backmen: footsteps
if (!uid.Comp.ViscosityAffectsMovement)
return;
// end-backmen: footsteps

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;

// start-backmen: footsteps
[DataField]
public bool ViscosityAffectsMovement = true;
// end-backmen: footsteps
}
}
5 changes: 3 additions & 2 deletions Resources/Prototypes/Entities/Effects/puddle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
tags:
- DNASolutionScannable

#BACKMEN-EDIT
# start-backmen: footsteps
- type: entity
name: след
id: Footstep
Expand Down Expand Up @@ -208,5 +208,6 @@
solution: step
- type: Puddle
solution: step
viscosityAffectsMovement: false
- type: Appearance
#BACKMEN-EDIT
# end-backmen: footsteps

0 comments on commit d179fd1

Please sign in to comment.