Skip to content

Commit

Permalink
Simplified vaporizer visuals using GenericVisualizer
Browse files Browse the repository at this point in the history
Added a duplicate fill sprite for the vaporizer so that it doesn't immediately drop below the max fill level when it starts processing
  • Loading branch information
TGRCdev committed Dec 14, 2024
1 parent 549b4cc commit 6feca0e
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 63 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
using Content.Shared.Atmos;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;

namespace Content.Server.Decapoids.Components;

[RegisterComponent, NetworkedComponent]
[RegisterComponent]
[AutoGenerateComponentPause]
public sealed partial class VaporizerComponent : Component
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private void UpdateVisualState(EntityUid uid, VaporizerState state, AppearanceCo
if (!Resolve(uid, ref appearance))
return;

_appearance.SetData(uid, VaporizerVisuals.VisualState, state);
_appearance.SetData(uid, VaporizerVisuals.Indicator, state);
}

public override void Update(float frameTime)
Expand Down
6 changes: 0 additions & 6 deletions Content.Shared/_Impstation/Decapoids/VaporizerState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ namespace Content.Shared._Impstation.Decapoids;

[Serializable, NetSerializable]
public enum VaporizerVisuals : byte
{
VisualState,
}

[Serializable, NetSerializable]
public enum VaporizerVisualLayers : byte
{
Indicator,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
parent: GasTankRoundBase
id: DecapoidVaporTank
description: 'An alien contraption consisting of two tanks. The smaller tank takes in water and converts it into vapor, which is stored in the larger tank. It can hold 5 L of gas, and 30u of fluid.'
components: # todo: some way of knowing that there's an invalid solution
components:
- type: Sprite
sprite: _Impstation/Objects/Tanks/vapor.rsi
layers:
Expand All @@ -120,7 +120,15 @@
map: [ "enum.SolutionContainerLayers.Fill" ]
visible: false
- state: normal
map: [ "enum.VaporizerVisualLayers.Indicator" ]
map: [ "indicator" ]
- type: GenericVisualizer
visuals:
enum.VaporizerVisuals.Indicator:
indicator:
Normal: { state: "normal" }
BadSolution: { state: "bad" }
LowSolution: { state: "low" }
Empty: { state: "empty" }
- type: Appearance
- type: Item
size: Normal
Expand Down Expand Up @@ -177,6 +185,6 @@
solution: waterTank
- type: Vaporizer
- type: SolutionContainerVisuals
maxFillLevels: 4
maxFillLevels: 5
fillBaseName: fill-
solutionName: waterTank
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
{
"name": "fill-4"
},
{
"name": "fill-5"
},
{
"name": "equipped-BACKPACK",
"directions": 4
Expand Down

0 comments on commit 6feca0e

Please sign in to comment.