From 881f8a81d20d04012e557940b3f6ffa22e595e19 Mon Sep 17 00:00:00 2001 From: FN Date: Sat, 28 Dec 2024 07:31:36 +0700 Subject: [PATCH] CleanTileReaction, sounds, localization, and sprite --- .../Chemistry/EntitySystems/VaporSystem.cs | 3 --- .../TileReactions/CleanTileReaction.cs | 7 +++++++ .../Fluids/EntitySystems/PuddleSystem.cs | 2 +- .../Fluids/Components/PuddleComponent.cs | 5 ++++- Content.Shared/Fluids/SharedPuddleSystem.cs | 5 +++++ .../_corvaxnext/entities/effects/footprint.ftl | 2 ++ .../_CorvaxNext/Entities/Effects/footprint.yml | 3 ++- .../_CorvaxNext/Effects/footprint.rsi/body.png | Bin 779 -> 810 bytes 8 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/effects/footprint.ftl diff --git a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs index 590e4df7cf9..c9b64e649e5 100644 --- a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs @@ -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 { @@ -50,8 +49,6 @@ private void HandleCollide(Entity 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) { diff --git a/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs b/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs index f2d1bcebe1c..3dfe7ac1242 100644 --- a/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs +++ b/Content.Server/Chemistry/TileReactions/CleanTileReaction.cs @@ -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; @@ -57,6 +59,11 @@ IEntityManager entityManager solutionContainerSystem.TryAddSolution(puddleSolution.Value, new Solution(ReplacementReagent, purgeable.Volume)); + // Corvax-Next-Footprints-Start + if (entityManager.HasComponent(entity)) + entityManager.EventBus.RaiseLocalEvent(entity, new FootprintCleanEvent()); + // Corvax-Next-Footprints-End + if (purgeable.Volume <= FixedPoint2.Zero) break; } diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs index b59010c4c47..cc1f66aa0ab 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs @@ -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 diff --git a/Content.Shared/Fluids/Components/PuddleComponent.cs b/Content.Shared/Fluids/Components/PuddleComponent.cs index 3e08a725841..50fc86c3b5c 100644 --- a/Content.Shared/Fluids/Components/PuddleComponent.cs +++ b/Content.Shared/Fluids/Components/PuddleComponent.cs @@ -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 } } diff --git a/Content.Shared/Fluids/SharedPuddleSystem.cs b/Content.Shared/Fluids/SharedPuddleSystem.cs index f573c042c55..2b54c961589 100644 --- a/Content.Shared/Fluids/SharedPuddleSystem.cs +++ b/Content.Shared/Fluids/SharedPuddleSystem.cs @@ -73,6 +73,11 @@ private void OnRefillableCanDropDragged(Entity enti private void OnGetFootstepSound(Entity 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; diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/effects/footprint.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/effects/footprint.ftl new file mode 100644 index 00000000000..52168cf7aaf --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_corvaxnext/entities/effects/footprint.ftl @@ -0,0 +1,2 @@ +ent-Footprint = след + .desc = Дорожка из жидкости. diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Effects/footprint.yml b/Resources/Prototypes/_CorvaxNext/Entities/Effects/footprint.yml index 01f4dba7f5b..a9e12f8a8f3 100644 --- a/Resources/Prototypes/_CorvaxNext/Entities/Effects/footprint.yml +++ b/Resources/Prototypes/_CorvaxNext/Entities/Effects/footprint.yml @@ -29,7 +29,8 @@ - type: Footprint - type: Puddle solution: print - viscosityAffectsMovement: false + affectsMovement: false + affectsSound: false - type: ExaminableSolution solution: print - type: MixableSolution diff --git a/Resources/Textures/_CorvaxNext/Effects/footprint.rsi/body.png b/Resources/Textures/_CorvaxNext/Effects/footprint.rsi/body.png index 9dda6bc78e419976c8696c37b37dea8742f3811b..6c2163ba662587128cc5e63bdc6bd291f015d31f 100644 GIT binary patch delta 736 zcmV<60w4X02C4>-G=IlQL_t(oN9~p|uIfMxMFT>JH9!X&g9esBfe=E7f-TU%#-M{W zAR0br^iSjrN%Vj5iYGBrG!xrn-)lRQDT?p-W}qPh)9Lipp!yjx0q67ii@{73=6?Zl zyWL(qZOEGZbl8Nl-|rX81gelG(ek3(Iak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