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

Fix vomit mopping #9358

Merged
merged 1 commit into from
Jul 3, 2022
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
7 changes: 5 additions & 2 deletions Content.Client/Fluids/PuddleVisualizer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using Content.Shared.Fluids;
using JetBrains.Annotations;
Expand All @@ -20,6 +20,9 @@ public sealed class PuddleVisualizer : AppearanceVisualizer
// Whether the underlying solution color should be used
[DataField("recolor")] public bool Recolor;

// Whether the puddle has a unique sprite we don't want to overwrite
[DataField("customPuddleSprite")] public bool CustomPuddleSprite;

public override void InitializeEntity(EntityUid entity)
{
base.InitializeEntity(entity);
Expand Down Expand Up @@ -75,7 +78,7 @@ private void UpdateVisual(AppearanceComponent component, SpriteComponent spriteC
spriteComponent.LayerSetState(0, "sparkles", "Fluids/wet_floor_sparkles.rsi");
spriteComponent.Color = spriteComponent.Color.WithAlpha(0.25f); //should be mostly transparent.
}
else
else if(!CustomPuddleSprite)
{
spriteComponent.LayerSetState(0, "smear-0", "Fluids/smear.rsi"); // TODO: need a way to implement the random smears again when the mop creates new puddles.
}
Expand Down
4 changes: 4 additions & 0 deletions Resources/Prototypes/Entities/Effects/puddle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@
- type: Slippery
launchForwardsMultiplier: 2.0
- type: StepTrigger
- type: Appearance
visuals:
- type: PuddleVisualizer
customPuddleSprite: true

- type: entity
name: toxins vomit
Expand Down