diff --git a/Content.Client/_CorvaxNext/FootPrint/FootPrintsVisualizerSystem.cs b/Content.Client/_CorvaxNext/FootPrint/FootPrintsVisualizerSystem.cs index 117d56d2b11..1412ba183d7 100644 --- a/Content.Client/_CorvaxNext/FootPrint/FootPrintsVisualizerSystem.cs +++ b/Content.Client/_CorvaxNext/FootPrint/FootPrintsVisualizerSystem.cs @@ -1,11 +1,11 @@ -using Content.Shared._CorvaxNext.FootPrint; +using Content.Shared._CorvaxNext.Footprint; using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Shared.Random; -namespace Content.Client._CorvaxNext.FootPrint; +namespace Content.Client._CorvaxNext.Footprint; -public sealed class FootPrintsVisualizerSystem : VisualizerSystem +public sealed class FootprintsVisualizerSystem : VisualizerSystem { [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly IRobustRandom _random = default!; @@ -14,52 +14,52 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnInitialized); - SubscribeLocalEvent(OnShutdown); + SubscribeLocalEvent(OnInitialized); + SubscribeLocalEvent(OnShutdown); } - private void OnInitialized(EntityUid uid, FootPrintComponent comp, ComponentInit args) + private void OnInitialized(EntityUid uid, FootprintComponent comp, ComponentInit args) { if (!TryComp(uid, out var sprite)) return; - sprite.LayerMapReserveBlank(FootPrintVisualLayers.Print); + sprite.LayerMapReserveBlank(FootprintVisualLayers.Print); UpdateAppearance(uid, comp, sprite); } - private void OnShutdown(EntityUid uid, FootPrintComponent comp, ComponentShutdown args) + private void OnShutdown(EntityUid uid, FootprintComponent comp, ComponentShutdown args) { if (TryComp(uid, out var sprite) && - sprite.LayerMapTryGet(FootPrintVisualLayers.Print, out var layer)) + sprite.LayerMapTryGet(FootprintVisualLayers.Print, out var layer)) { sprite.RemoveLayer(layer); } } - private void UpdateAppearance(EntityUid uid, FootPrintComponent component, SpriteComponent sprite) + private void UpdateAppearance(EntityUid uid, FootprintComponent component, SpriteComponent sprite) { - if (!sprite.LayerMapTryGet(FootPrintVisualLayers.Print, out var layer) - || !TryComp(component.PrintOwner, out var printsComponent) + if (!sprite.LayerMapTryGet(FootprintVisualLayers.Print, out var layer) + || !TryComp(component.FootprintsVisualizer, out var printsComponent) || !TryComp(uid, out var appearance)) return; - if (!_appearance.TryGetData(uid, FootPrintVisualState.State, out var printVisuals, appearance)) + if (!_appearance.TryGetData(uid, FootprintVisualState.State, out var printVisuals, appearance)) return; sprite.LayerSetState(layer, new RSI.StateId(printVisuals switch { - FootPrintVisuals.BareFootPrint => printsComponent.RightStep ? printsComponent.RightBarePrint : printsComponent.LeftBarePrint, - FootPrintVisuals.ShoesPrint => printsComponent.ShoesPrint, - FootPrintVisuals.SuitPrint => printsComponent.SuitPrint, - FootPrintVisuals.Dragging => _random.Pick(printsComponent.DraggingPrint), + FootprintVisuals.BareFootprint => printsComponent.RightStep ? printsComponent.RightBarePrint : printsComponent.LeftBarePrint, + FootprintVisuals.ShoesPrint => printsComponent.ShoesPrint, + FootprintVisuals.SuitPrint => printsComponent.SuitPrint, + FootprintVisuals.Dragging => _random.Pick(printsComponent.DraggingPrint), _ => throw new ArgumentOutOfRangeException($"Unknown {printVisuals} parameter.") }), printsComponent.RsiPath); - if (_appearance.TryGetData(uid, FootPrintVisualState.Color, out var printColor, appearance)) + if (_appearance.TryGetData(uid, FootprintVisualState.Color, out var printColor, appearance)) sprite.LayerSetColor(layer, printColor); } - protected override void OnAppearanceChange (EntityUid uid, FootPrintComponent component, ref AppearanceChangeEvent args) + protected override void OnAppearanceChange (EntityUid uid, FootprintComponent component, ref AppearanceChangeEvent args) { if (args.Sprite is not { } sprite) return; diff --git a/Content.Server/_CorvaxNext/FootPrint/FootPrintsSystem.cs b/Content.Server/_CorvaxNext/FootPrint/FootPrintsSystem.cs index de4da76bbb4..7ee709722e1 100644 --- a/Content.Server/_CorvaxNext/FootPrint/FootPrintsSystem.cs +++ b/Content.Server/_CorvaxNext/FootPrint/FootPrintsSystem.cs @@ -2,16 +2,16 @@ using Content.Shared.Inventory; using Content.Shared.Mobs; using Content.Shared.Mobs.Components; -using Content.Shared._CorvaxNext.FootPrint; +using Content.Shared._CorvaxNext.Footprint; using Content.Shared.Standing; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; using Robust.Shared.Map; using Robust.Shared.Random; -namespace Content.Server._CorvaxNext.FootPrint; +namespace Content.Server._CorvaxNext.Footprint; -public sealed class FootPrintsSystem : EntitySystem +public sealed class FootprintsSystem : EntitySystem { [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly InventorySystem _inventory = default!; @@ -33,16 +33,16 @@ public override void Initialize() _mobThresholdQuery = GetEntityQuery(); _appearanceQuery = GetEntityQuery(); - SubscribeLocalEvent(OnStartupComponent); - SubscribeLocalEvent(OnMove); + SubscribeLocalEvent(OnStartupComponent); + SubscribeLocalEvent(OnMove); } - private void OnStartupComponent(EntityUid uid, FootPrintVisualiserComponent component, ComponentStartup args) + private void OnStartupComponent(EntityUid uid, FootprintVisualizerComponent component, ComponentStartup args) { component.StepSize = Math.Max(0f, component.StepSize + _random.NextFloat(-0.05f, 0.05f)); } - private void OnMove(EntityUid uid, FootPrintVisualiserComponent component, ref MoveEvent args) + private void OnMove(EntityUid uid, FootprintVisualizerComponent component, ref MoveEvent args) { if (component.PrintsColor.A <= 0f || !_transformQuery.TryComp(uid, out var transform) @@ -60,15 +60,15 @@ private void OnMove(EntityUid uid, FootPrintVisualiserComponent component, ref M component.RightStep = !component.RightStep; var entity = Spawn(component.StepProtoId, CalcCoords(gridUid, component, transform, dragging)); - var footPrintComponent = EnsureComp(entity); + var footPrintComponent = EnsureComp(entity); - footPrintComponent.PrintOwner = uid; + footPrintComponent.FootprintsVisualizer = uid; Dirty(entity, footPrintComponent); if (_appearanceQuery.TryComp(entity, out var appearance)) { - _appearance.SetData(entity, FootPrintVisualState.State, PickState(uid, dragging), appearance); - _appearance.SetData(entity, FootPrintVisualState.Color, component.PrintsColor, appearance); + _appearance.SetData(entity, FootprintVisualState.State, PickState(uid, dragging), appearance); + _appearance.SetData(entity, FootprintVisualState.Color, component.PrintsColor, appearance); } if (!_transformQuery.TryComp(entity, out var stepTransform)) @@ -89,7 +89,7 @@ private void OnMove(EntityUid uid, FootPrintVisualiserComponent component, ref M _solution.TryAddReagent(footPrintComponent.Solution.Value, component.ReagentToTransfer, 1, out _); } - private EntityCoordinates CalcCoords(EntityUid uid, FootPrintVisualiserComponent component, TransformComponent transform, bool state) + private EntityCoordinates CalcCoords(EntityUid uid, FootprintVisualizerComponent component, TransformComponent transform, bool state) { if (state) return new EntityCoordinates(uid, transform.LocalPosition); @@ -101,18 +101,18 @@ private EntityCoordinates CalcCoords(EntityUid uid, FootPrintVisualiserComponent return new EntityCoordinates(uid, transform.LocalPosition + offset); } - private FootPrintVisuals PickState(EntityUid uid, bool dragging) + private FootprintVisuals PickState(EntityUid uid, bool dragging) { - var state = FootPrintVisuals.BareFootPrint; + var state = FootprintVisuals.BareFootprint; if (_inventory.TryGetSlotEntity(uid, "shoes", out _)) - state = FootPrintVisuals.ShoesPrint; + state = FootprintVisuals.ShoesPrint; if (_inventory.TryGetSlotEntity(uid, "outerClothing", out var suit) && TryComp(suit, out _)) - state = FootPrintVisuals.SuitPrint; + state = FootprintVisuals.SuitPrint; if (dragging) - state = FootPrintVisuals.Dragging; + state = FootprintVisuals.Dragging; return state; } diff --git a/Content.Server/_CorvaxNext/FootPrint/PuddleFootPrintsSystem.cs b/Content.Server/_CorvaxNext/FootPrint/PuddleFootPrintsSystem.cs index cc051b90a51..6f4b90d7a13 100644 --- a/Content.Server/_CorvaxNext/FootPrint/PuddleFootPrintsSystem.cs +++ b/Content.Server/_CorvaxNext/FootPrint/PuddleFootPrintsSystem.cs @@ -1,14 +1,14 @@ using System.Linq; -using Content.Shared._CorvaxNext.FootPrint; +using Content.Shared._CorvaxNext.Footprint; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Fluids; using Content.Shared.Fluids.Components; using Robust.Shared.Physics.Events; -namespace Content.Server._CorvaxNext.FootPrint; +namespace Content.Server._CorvaxNext.Footprint; -public sealed class PuddleFootPrintsSystem : EntitySystem +public sealed class PuddleFootprintsSystem : EntitySystem { [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; @@ -16,14 +16,14 @@ public sealed class PuddleFootPrintsSystem : EntitySystem public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnStepTrigger); + SubscribeLocalEvent(OnStepTrigger); } - private void OnStepTrigger(EntityUid uid, PuddleFootPrintsComponent component, ref EndCollideEvent args) + private void OnStepTrigger(EntityUid uid, PuddleFootprintsComponent component, ref EndCollideEvent args) { if (!TryComp(uid, out var appearance) || !TryComp(uid, out var puddle) - || !TryComp(args.OtherEntity, out var tripper) + || !TryComp(args.OtherEntity, out var tripper) || !TryComp(uid, out var solutionManager) ||!_solutionContainer.ResolveSolution((uid, solutionManager), puddle.SolutionName, ref puddle.Solution, out var solutions)) return; @@ -45,7 +45,7 @@ private void OnStepTrigger(EntityUid uid, PuddleFootPrintsComponent component, r _solutionContainer.RemoveEachReagent(puddle.Solution.Value, 1); } - private void AddColor(Color col, float quantity, FootPrintVisualiserComponent component) + private void AddColor(Color col, float quantity, FootprintVisualizerComponent component) { component.PrintsColor = component.ColorQuantity == 0f ? col : Color.InterpolateBetween(component.PrintsColor, col, component.ColorInterpolationFactor); component.ColorQuantity += quantity; diff --git a/Content.Shared/_CorvaxNext/Footprint/FootPrintComponent.cs b/Content.Shared/_CorvaxNext/Footprint/FootPrintComponent.cs index 93cf4c2d592..652e4860f48 100644 --- a/Content.Shared/_CorvaxNext/Footprint/FootPrintComponent.cs +++ b/Content.Shared/_CorvaxNext/Footprint/FootPrintComponent.cs @@ -1,19 +1,19 @@ using Content.Shared.Chemistry.Components; using Robust.Shared.GameStates; -namespace Content.Shared._CorvaxNext.FootPrint; +namespace Content.Shared._CorvaxNext.Footprint; /// /// This is used for marking footsteps, handling footprint drawing. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] -public sealed partial class FootPrintComponent : Component +public sealed partial class FootprintComponent : Component { /// - /// Owner (with ) of a print (this component). + /// Owner (with ) of a print (this component). /// [AutoNetworkedField] - public EntityUid PrintOwner; + public EntityUid FootprintsVisualizer; [DataField] public string SolutionName = "step"; diff --git a/Content.Shared/_CorvaxNext/Footprint/FootPrintVisuals.cs b/Content.Shared/_CorvaxNext/Footprint/FootPrintVisuals.cs index c1db76c73aa..776a5ea148f 100644 --- a/Content.Shared/_CorvaxNext/Footprint/FootPrintVisuals.cs +++ b/Content.Shared/_CorvaxNext/Footprint/FootPrintVisuals.cs @@ -1,25 +1,25 @@ using Robust.Shared.Serialization; -namespace Content.Shared._CorvaxNext.FootPrint; +namespace Content.Shared._CorvaxNext.Footprint; [Serializable, NetSerializable] -public enum FootPrintVisuals : byte +public enum FootprintVisuals : byte { - BareFootPrint, + BareFootprint, ShoesPrint, SuitPrint, Dragging } [Serializable, NetSerializable] -public enum FootPrintVisualState : byte +public enum FootprintVisualState : byte { State, Color } [Serializable, NetSerializable] -public enum FootPrintVisualLayers : byte +public enum FootprintVisualLayers : byte { Print } diff --git a/Content.Shared/_CorvaxNext/Footprint/FootPrintVisualiserComponent.cs b/Content.Shared/_CorvaxNext/Footprint/FootprintVisualizerComponent.cs similarity index 93% rename from Content.Shared/_CorvaxNext/Footprint/FootPrintVisualiserComponent.cs rename to Content.Shared/_CorvaxNext/Footprint/FootprintVisualizerComponent.cs index fb92364f3c4..fec1239adda 100644 --- a/Content.Shared/_CorvaxNext/Footprint/FootPrintVisualiserComponent.cs +++ b/Content.Shared/_CorvaxNext/Footprint/FootprintVisualizerComponent.cs @@ -2,10 +2,10 @@ using Robust.Shared.Prototypes; using Robust.Shared.Utility; -namespace Content.Shared._CorvaxNext.FootPrint; +namespace Content.Shared._CorvaxNext.Footprint; [RegisterComponent] -public sealed partial class FootPrintVisualiserComponent : Component +public sealed partial class FootprintVisualizerComponent : Component { [ViewVariables(VVAccess.ReadOnly), DataField] public ResPath RsiPath = new("/Textures/_CorvaxNext/Effects/footprints.rsi"); @@ -35,7 +35,7 @@ public sealed partial class FootPrintVisualiserComponent : Component // yea, those [ViewVariables(VVAccess.ReadOnly), DataField] - public EntProtoId StepProtoId = "Footstep"; + public EntProtoId StepProtoId = "Footstep"; [ViewVariables(VVAccess.ReadOnly), DataField] public Color PrintsColor = Color.FromHex("#00000000"); diff --git a/Content.Shared/_CorvaxNext/Footprint/PuddleFootPrintsComponent.cs b/Content.Shared/_CorvaxNext/Footprint/PuddleFootPrintsComponent.cs index 61671f5e7ed..30a680f8bc2 100644 --- a/Content.Shared/_CorvaxNext/Footprint/PuddleFootPrintsComponent.cs +++ b/Content.Shared/_CorvaxNext/Footprint/PuddleFootPrintsComponent.cs @@ -1,7 +1,7 @@ -namespace Content.Shared._CorvaxNext.FootPrint; +namespace Content.Shared._CorvaxNext.Footprint; [RegisterComponent] -public sealed partial class PuddleFootPrintsComponent : Component +public sealed partial class PuddleFootprintsComponent : Component { [ViewVariables(VVAccess.ReadWrite)] public float SizeRatio = 0.2f; diff --git a/Resources/Prototypes/Entities/Effects/puddle.yml b/Resources/Prototypes/Entities/Effects/puddle.yml index 51a7bfeb151..c8c130d3ccc 100644 --- a/Resources/Prototypes/Entities/Effects/puddle.yml +++ b/Resources/Prototypes/Entities/Effects/puddle.yml @@ -165,4 +165,4 @@ - type: Tag tags: - DNASolutionScannable - - type: PuddleFootPrints # Corvax-Next-Footprints + - type: PuddleFootprints # Corvax-Next-Footprints diff --git a/Resources/Prototypes/Entities/Mobs/Species/arachnid.yml b/Resources/Prototypes/Entities/Mobs/Species/arachnid.yml index 698ba191d8c..610c7061b55 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/arachnid.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/arachnid.yml @@ -115,7 +115,7 @@ visible: false - type: Inventory templateId: arachnid - - type: FootPrints # Corvax-Next-Footprints + - type: Footprints # Corvax-Next-Footprints leftBarePrint: "footprint-left-bare-spider" rightBarePrint: "footprint-right-bare-spider" diff --git a/Resources/Prototypes/Entities/Mobs/Species/diona.yml b/Resources/Prototypes/Entities/Mobs/Species/diona.yml index afa0a3c6266..7396d743544 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/diona.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/diona.yml @@ -110,7 +110,7 @@ 32: sprite: Mobs/Species/Human/displacement.rsi state: jumpsuit-female - - type: FootPrints # Corvax-Next-Footprints + - type: Footprints # Corvax-Next-Footprints leftBarePrint: "footprint-left-bare-diona" rightBarePrint: "footprint-right-bare-diona" diff --git a/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml b/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml index 55c679d0db5..fbb99db43ff 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml @@ -63,7 +63,7 @@ 32: sprite: Mobs/Species/Human/displacement.rsi state: jumpsuit-female - - type: FootPrints # Corvax-Next-Footprints + - type: Footprints # Corvax-Next-Footprints leftBarePrint: "footprint-left-bare-dwarf" rightBarePrint: "footprint-right-bare-dwarf" diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index 98c66a72a62..0c86f1b63ed 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -27,7 +27,7 @@ 32: sprite: Mobs/Species/Human/displacement.rsi state: jumpsuit-female - - type: FootPrints # Corvax-Next-Footprints + - type: Footprints # Corvax-Next-Footprints - type: entity diff --git a/Resources/Prototypes/Entities/Mobs/Species/moth.yml b/Resources/Prototypes/Entities/Mobs/Species/moth.yml index 13ede9f9b3c..bcaa4f6e1c1 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/moth.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/moth.yml @@ -122,7 +122,7 @@ 32: sprite: Mobs/Species/Human/displacement.rsi state: jumpsuit-female - - type: FootPrints # Corvax-Next-Footprints + - type: Footprints # Corvax-Next-Footprints - type: entity parent: BaseSpeciesDummy diff --git a/Resources/Prototypes/Entities/Mobs/Species/reptilian.yml b/Resources/Prototypes/Entities/Mobs/Species/reptilian.yml index f78bb520812..03922db10c9 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/reptilian.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/reptilian.yml @@ -76,7 +76,7 @@ 32: sprite: Mobs/Species/Human/displacement.rsi state: jumpsuit-female - - type: FootPrints # Corvax-Next-Footprints + - type: Footprints # Corvax-Next-Footprints leftBarePrint: "footprint-left-bare-lizard" rightBarePrint: "footprint-right-bare-lizard" diff --git a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml index 09cf25bb5af..114ee420372 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml @@ -109,7 +109,7 @@ 32: sprite: Mobs/Species/Human/displacement.rsi state: jumpsuit-female - - type: FootPrints # Corvax-Next-Footprints + - type: Footprints # Corvax-Next-Footprints - type: entity parent: BaseSpeciesDummy diff --git a/Resources/Prototypes/Entities/Mobs/Species/slime.yml b/Resources/Prototypes/Entities/Mobs/Species/slime.yml index 1fa37b69704..b111f8257c8 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/slime.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/slime.yml @@ -116,7 +116,7 @@ 32: sprite: Mobs/Species/Human/displacement.rsi state: jumpsuit-female - - type: FootPrints # Corvax-Next-Footprints + - type: Footprints # Corvax-Next-Footprints leftBarePrint: "footprint-left-bare-slime" rightBarePrint: "footprint-right-bare-slime" diff --git a/Resources/Prototypes/Entities/Mobs/Species/vox.yml b/Resources/Prototypes/Entities/Mobs/Species/vox.yml index 11ed3b84329..f79934b669e 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/vox.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/vox.yml @@ -130,7 +130,7 @@ 32: sprite: Mobs/Species/Vox/displacement.rsi state: shoes - - type: FootPrints # Corvax-Next-Footprints + - type: Footprints # Corvax-Next-Footprints leftBarePrint: "footprint-left-bare-lizard" rightBarePrint: "footprint-right-bare-lizard" diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Effects/puddle.yml b/Resources/Prototypes/_CorvaxNext/Entities/Effects/footstep.yml similarity index 97% rename from Resources/Prototypes/_CorvaxNext/Entities/Effects/puddle.yml rename to Resources/Prototypes/_CorvaxNext/Entities/Effects/footstep.yml index 3a726e10fbe..2bf3df9bdb0 100644 --- a/Resources/Prototypes/_CorvaxNext/Entities/Effects/puddle.yml +++ b/Resources/Prototypes/_CorvaxNext/Entities/Effects/footstep.yml @@ -31,7 +31,7 @@ - type: SolutionContainerManager solutions: step: { maxVol: 2 } - - type: FootPrint + - type: Footprint - type: Puddle solution: step - type: Appearance \ No newline at end of file