forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
412 changed files
with
23,304 additions
and
11,756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Content.Shared.Conveyor; | ||
using Content.Shared.Materials; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.Materials; | ||
|
||
public sealed class RecyclerVisualizerSystem : VisualizerSystem<RecyclerVisualsComponent> | ||
{ | ||
protected override void OnAppearanceChange(EntityUid uid, RecyclerVisualsComponent component, ref AppearanceChangeEvent args) | ||
{ | ||
if (args.Sprite == null || !args.Sprite.LayerMapTryGet(RecyclerVisualLayers.Main, out var layer)) | ||
return; | ||
|
||
AppearanceSystem.TryGetData<ConveyorState>(uid, ConveyorVisuals.State, out var running); | ||
AppearanceSystem.TryGetData<bool>(uid, RecyclerVisuals.Bloody, out var bloody); | ||
AppearanceSystem.TryGetData<bool>(uid, RecyclerVisuals.Broken, out var broken); | ||
|
||
var activityState = running == ConveyorState.Off ? 0 : 1; | ||
if (broken) //breakage overrides activity | ||
activityState = 2; | ||
|
||
var bloodyKey = bloody ? component.BloodyKey : string.Empty; | ||
|
||
var state = $"{component.BaseKey}{activityState}{bloodyKey}"; | ||
args.Sprite.LayerSetState(layer, state); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace Content.Client.Materials; | ||
|
||
[RegisterComponent] | ||
public sealed partial class RecyclerVisualsComponent : Component | ||
{ | ||
/// <summary> | ||
/// Key appended to state string if bloody. | ||
/// </summary> | ||
[DataField] | ||
public string BloodyKey = "bld"; | ||
|
||
/// <summary> | ||
/// Base key for the visual state. | ||
/// </summary> | ||
[DataField] | ||
public string BaseKey = "grinder-o"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.