Skip to content

Commit

Permalink
CleanTileReaction, sounds, localization, and sprite
Browse files Browse the repository at this point in the history
  • Loading branch information
FireNameFN committed Dec 28, 2024
1 parent f36751f commit 881f8a8
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 6 deletions.
3 changes: 0 additions & 3 deletions Content.Server/Chemistry/EntitySystems/VaporSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Spawners;
using System.Numerics;
using Content.Server._CorvaxNext.Footprints;

namespace Content.Server.Chemistry.EntitySystems
{
Expand Down Expand Up @@ -50,8 +49,6 @@ private void HandleCollide(Entity<VaporComponent> entity, ref StartCollideEvent
_reactive.DoEntityReaction(args.OtherEntity, solution, ReactionMethod.Touch);
}

RaiseLocalEvent(args.OtherEntity, new FootprintCleanEvent()); // Corvax-Next-Footprints

// Check for collision with a impassable object (e.g. wall) and stop
if ((args.OtherFixture.CollisionLayer & (int) CollisionGroup.Impassable) != 0 && args.OtherFixture.Hard)
{
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/Chemistry/TileReactions/CleanTileReaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
using Robust.Shared.Map;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using System.Linq;
using Content.Shared._CorvaxNext.Footprints;
using Content.Server._CorvaxNext.Footprints;

namespace Content.Server.Chemistry.TileReactions;

Expand Down Expand Up @@ -57,6 +59,11 @@ IEntityManager entityManager

solutionContainerSystem.TryAddSolution(puddleSolution.Value, new Solution(ReplacementReagent, purgeable.Volume));

// Corvax-Next-Footprints-Start
if (entityManager.HasComponent<FootprintComponent>(entity))
entityManager.EventBus.RaiseLocalEvent(entity, new FootprintCleanEvent());
// Corvax-Next-Footprints-End

if (purgeable.Volume <= FixedPoint2.Zero)
break;
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Fluids/EntitySystems/PuddleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ private void UpdateSlip(EntityUid entityUid, PuddleComponent component, Solution
private void UpdateSlow(EntityUid uid, Solution solution, PuddleComponent component) // Corvax-Next-Footprints
{
// Corvax-Next-Footprints-Start
if (!component.ViscosityAffectsMovement)
if (!component.AffectsMovement)
return;
// Corvax-Next-Footprints-End

Expand Down
5 changes: 4 additions & 1 deletion Content.Shared/Fluids/Components/PuddleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ public sealed partial class PuddleComponent : Component

// Corvax-Next-Footprints-Start
[DataField]
public bool ViscosityAffectsMovement = true;
public bool AffectsMovement = true;

[DataField]
public bool AffectsSound = true;
// Corvax-Next-Footprints-End
}
}
5 changes: 5 additions & 0 deletions Content.Shared/Fluids/SharedPuddleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ private void OnRefillableCanDropDragged(Entity<RefillableSolutionComponent> enti

private void OnGetFootstepSound(Entity<PuddleComponent> entity, ref GetFootstepSoundEvent args)
{
// Corvax-Next-Footprints
if (!entity.Comp.AffectsSound)
return;
// Corvax-Next-Footprints

if (!_solutionContainerSystem.ResolveSolution(entity.Owner, entity.Comp.SolutionName, ref entity.Comp.Solution,
out var solution))
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ent-Footprint = след
.desc = Дорожка из жидкости.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
- type: Footprint
- type: Puddle
solution: print
viscosityAffectsMovement: false
affectsMovement: false
affectsSound: false
- type: ExaminableSolution
solution: print
- type: MixableSolution
Expand Down
Binary file modified Resources/Textures/_CorvaxNext/Effects/footprint.rsi/body.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 881f8a8

Please sign in to comment.