Skip to content

Commit

Permalink
force icon visible, fix active sprite
Browse files Browse the repository at this point in the history
  • Loading branch information
whatston3 committed Dec 23, 2024
1 parent 664b75e commit 938e16e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Content.Client/_NF/Trade/TradeCrateVisualizerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public sealed class TradeCrateVisualizerSystem : VisualizerSystem<TradeCrateComp
[Dependency] private readonly SpriteSystem _spriteSystem = default!;

private const string FallbackIconID = "CargoOther";
private const string CargoPriorityActiveState = "cargo_priority";
private const string CargoPriorityActiveState = "cargo_priority_active";
private const string CargoPriorityInactiveState = "cargo_priority_inactive";

protected override void OnAppearanceChange(EntityUid uid, TradeCrateComponent component, ref AppearanceChangeEvent args)
Expand All @@ -31,6 +31,7 @@ protected override void OnAppearanceChange(EntityUid uid, TradeCrateComponent co
icon = _prototypeManager.Index<TradeCrateDestinationPrototype>(FallbackIconID);

args.Sprite.LayerSetTexture(TradeCrateVisualLayers.Icon, _spriteSystem.Frame0(icon.Icon));
args.Sprite.LayerSetVisible(TradeCrateVisualLayers.Icon, true);
if (_appearance.TryGetData(uid, TradeCrateVisuals.IsPriority, out bool isPriority) && isPriority)
{
args.Sprite.LayerSetVisible(TradeCrateVisualLayers.Priority, true);
Expand Down

0 comments on commit 938e16e

Please sign in to comment.