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

Микро-рефактор следов #949

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ private string GetStateId(FootprintVisualType visualType, FootprintEmitterCompon
return visualType switch
{
FootprintVisualType.BareFootprint => emitter.IsRightStep
? emitter.RightBareFootState
: emitter.LeftBareFootState,
FootprintVisualType.ShoeFootprint => emitter.ShoeFootState,
FootprintVisualType.SuitFootprint => emitter.PressureSuitFootState,
? _random.Pick(emitter.RightBareFootState)
: _random.Pick(emitter.LeftBareFootState),
FootprintVisualType.ShoeFootprint => _random.Pick(emitter.ShoeFootState),
FootprintVisualType.SuitFootprint => _random.Pick(emitter.PressureSuitFootState),
FootprintVisualType.DragMark => _random.Pick(emitter.DraggingStates),
_ => throw new ArgumentOutOfRangeException(
$"Unknown footprint visual type: {visualType}")
Expand Down
32 changes: 22 additions & 10 deletions Content.Shared/_Sunrise/Footprints/FootprintsSerializables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,38 +76,50 @@ public sealed partial class FootprintEmitterComponent : Component
/// State ID for left bare footprint
/// </summary>
[ViewVariables(VVAccess.ReadOnly), DataField]
public string LeftBareFootState = "footprint-left-bare-human";
public string[] LeftBareFootState =
{
"footprint-left-bare-human",
};

/// <summary>
/// State ID for right bare footprint
/// </summary>
[ViewVariables(VVAccess.ReadOnly), DataField]
public string RightBareFootState = "footprint-right-bare-human";
public string[] RightBareFootState =
{
"footprint-right-bare-human",
};

/// <summary>
/// State ID for shoe footprint
/// </summary>
[ViewVariables(VVAccess.ReadOnly), DataField]
public string ShoeFootState = "footprint-shoes";
public string[] ShoeFootState =
{
"footprint-shoes",
};

/// <summary>
/// State ID for pressure suit footprint
/// </summary>
[ViewVariables(VVAccess.ReadOnly), DataField]
public string PressureSuitFootState = "footprint-suit";
public string[] PressureSuitFootState =
{
"footprint-suit",
};

/// <summary>
/// Array of state IDs for dragging animations
/// </summary>
[ViewVariables(VVAccess.ReadOnly), DataField]
public string[] DraggingStates =
[
{
"dragging-1",
"dragging-2",
"dragging-3",
"dragging-4",
"dragging-5",
];
};

/// <summary>
/// Prototype ID for footprint entity
Expand All @@ -130,16 +142,16 @@ public sealed partial class FootprintEmitterComponent : Component
[DataField]
public float DragMarkInterval = 0.5f;

[ViewVariables(VVAccess.ReadOnly), DataField("footsSolution")]
[ViewVariables(VVAccess.ReadOnly), DataField]
public string FootsSolutionName = "foots";

[ViewVariables(VVAccess.ReadOnly), DataField("footssolutionRef")]
[ViewVariables(VVAccess.ReadOnly), DataField]
public Entity<SolutionComponent>? FootsSolution;

[ViewVariables(VVAccess.ReadOnly), DataField("bodySurfaceSolution")]
[ViewVariables(VVAccess.ReadOnly), DataField]
public string BodySurfaceSolutionName = "body_surface";

[ViewVariables(VVAccess.ReadOnly), DataField("bodySurfacesolutionRef")]
[ViewVariables(VVAccess.ReadOnly), DataField]
public Entity<SolutionComponent>? BodySurfaceSolution;

[ViewVariables(VVAccess.ReadWrite)]
Expand Down
Loading