From 3e31b0ec758eff35f6d2c5cd48a9097bd8294bd8 Mon Sep 17 00:00:00 2001 From: Darkmajia Date: Sat, 11 Jan 2025 20:12:00 +0000 Subject: [PATCH] upstream imp commenting --- Content.Client/Paper/UI/StampLabel.xaml.cs | 4 ++-- Content.Client/Paper/UI/StampWidget.xaml.cs | 6 ++++-- Content.Server/Nuke/NukeCodePaperSystem.cs | 2 +- Content.Shared/Paper/PaperSystem.cs | 2 +- Content.Shared/Paper/StampComponent.cs | 8 ++++---- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Content.Client/Paper/UI/StampLabel.xaml.cs b/Content.Client/Paper/UI/StampLabel.xaml.cs index 71af8269152c..9cdda2235f93 100644 --- a/Content.Client/Paper/UI/StampLabel.xaml.cs +++ b/Content.Client/Paper/UI/StampLabel.xaml.cs @@ -22,7 +22,7 @@ public sealed partial class StampLabel : Label public float Orientation = 0.0f; /// Determines whether stamp noise is applied on the shader - public bool StampNoise = true; + public bool StampNoise = true; // imp public StampLabel() { @@ -48,7 +48,7 @@ protected override void Draw(DrawingHandleScreen handle) PixelPosition.Y * MathF.Cos(Orientation) + PixelPosition.X * MathF.Sin(Orientation)); _stampShader?.SetParameter("objCoord", GlobalPosition * UIScale * new Vector2(1, -1)); - _stampShader?.SetParameter("useStampNoise", StampNoise); + _stampShader?.SetParameter("useStampNoise", StampNoise); // imp handle.UseShader(_stampShader); handle.SetTransform(GlobalPixelPosition - PixelPosition + offset, Orientation, _textScaling); base.Draw(handle); diff --git a/Content.Client/Paper/UI/StampWidget.xaml.cs b/Content.Client/Paper/UI/StampWidget.xaml.cs index 49d8e654bfce..f4327288c41a 100644 --- a/Content.Client/Paper/UI/StampWidget.xaml.cs +++ b/Content.Client/Paper/UI/StampWidget.xaml.cs @@ -15,7 +15,7 @@ public sealed partial class StampWidget : PanelContainer private StyleBoxTexture? _borderTexture; private ShaderInstance? _stampShader; - /// Determines whether stamp noise is applied on the shader + /// Imp edit, determines whether stamp noise is applied on the shader public bool StampNoise = true; public float Orientation @@ -26,6 +26,8 @@ public float Orientation public StampDisplayInfo StampInfo { set { + // pretty much this whole thing is an imp edit + var resCache = IoCManager.Resolve(); var prototypes = IoCManager.Resolve(); var icon = value.StampLargeIcon; @@ -80,7 +82,7 @@ public StampWidget() protected override void Draw(DrawingHandleScreen handle) { _stampShader?.SetParameter("objCoord", GlobalPosition * UIScale * new Vector2(1, -1)); - _stampShader?.SetParameter("useStampNoise", StampNoise); + _stampShader?.SetParameter("useStampNoise", StampNoise); // imp handle.UseShader(_stampShader); handle.SetTransform(GlobalPosition * UIScale, Orientation, Vector2.One); base.Draw(handle); diff --git a/Content.Server/Nuke/NukeCodePaperSystem.cs b/Content.Server/Nuke/NukeCodePaperSystem.cs index 2269cde26570..612ff25b3299 100644 --- a/Content.Server/Nuke/NukeCodePaperSystem.cs +++ b/Content.Server/Nuke/NukeCodePaperSystem.cs @@ -71,7 +71,7 @@ public bool SendNukeCodes(EntityUid station) "paper_stamp-centcom", new List { - new StampDisplayInfo { StampedName = Loc.GetString("stamp-component-stamped-name-centcom"), StampedColor = Color.FromHex("#BB3232"), StampLargeIcon = "large_stamp-centcom" }, + new StampDisplayInfo { StampedName = Loc.GetString("stamp-component-stamped-name-centcom"), StampedColor = Color.FromHex("#BB3232"), StampLargeIcon = "large_stamp-centcom" }, // imp edit } ); _faxSystem.Receive(faxEnt, printout, null, fax); diff --git a/Content.Shared/Paper/PaperSystem.cs b/Content.Shared/Paper/PaperSystem.cs index 648049fb6d72..533bb5e2f5b7 100644 --- a/Content.Shared/Paper/PaperSystem.cs +++ b/Content.Shared/Paper/PaperSystem.cs @@ -148,7 +148,7 @@ private static StampDisplayInfo GetStampInfo(StampComponent stamp) { StampedName = stamp.StampedName, StampedColor = stamp.StampedColor, - StampLargeIcon = stamp.StampLargeIcon + StampLargeIcon = stamp.StampLargeIcon // imp }; } diff --git a/Content.Shared/Paper/StampComponent.cs b/Content.Shared/Paper/StampComponent.cs index b2336d6d7e12..1ebe1654ee18 100644 --- a/Content.Shared/Paper/StampComponent.cs +++ b/Content.Shared/Paper/StampComponent.cs @@ -24,13 +24,13 @@ public partial struct StampDisplayInfo public Color StampedColor; [DataField("stampLargeIcon")] - public string? StampLargeIcon; + public string? StampLargeIcon; // imp [DataField("stampFont")] - public string? StampFont; + public string? StampFont; // imp [DataField("hasIcon")] - public bool HasIcon = true; + public bool HasIcon = true; // imp }; [RegisterComponent] @@ -52,7 +52,7 @@ public sealed partial class StampComponent : Component /// The sprite state of the stamp to display on the paper when read from stamp Sprite path. /// [DataField("stampLargeIcon")] - public string? StampLargeIcon = null; + public string? StampLargeIcon = null; // imp /// /// The color of the ink used by the stamp in UIs