Skip to content

Commit

Permalink
upstream imp commenting
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkmajia committed Jan 11, 2025
1 parent eeb9457 commit 3e31b0e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Content.Client/Paper/UI/StampLabel.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions Content.Client/Paper/UI/StampWidget.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,6 +26,8 @@ public float Orientation

public StampDisplayInfo StampInfo {
set {
// pretty much this whole thing is an imp edit

var resCache = IoCManager.Resolve<IResourceCache>();
var prototypes = IoCManager.Resolve<IPrototypeManager>();
var icon = value.StampLargeIcon;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Nuke/NukeCodePaperSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public bool SendNukeCodes(EntityUid station)
"paper_stamp-centcom",
new List<StampDisplayInfo>
{
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);
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Paper/PaperSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private static StampDisplayInfo GetStampInfo(StampComponent stamp)
{
StampedName = stamp.StampedName,
StampedColor = stamp.StampedColor,
StampLargeIcon = stamp.StampLargeIcon
StampLargeIcon = stamp.StampLargeIcon // imp
};
}

Expand Down
8 changes: 4 additions & 4 deletions Content.Shared/Paper/StampComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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.
/// </summary>
[DataField("stampLargeIcon")]
public string? StampLargeIcon = null;
public string? StampLargeIcon = null; // imp

/// <summary>
/// The color of the ink used by the stamp in UIs
Expand Down

0 comments on commit 3e31b0e

Please sign in to comment.