Skip to content

Commit

Permalink
allow decals to be removed from placement menu (#9843)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmoGarbage404 authored Jul 18, 2022
1 parent 9665a11 commit f8b8b83
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Client.Stylesheets;
using Content.Shared.Decals;
using Robust.Client.AutoGenerated;
Expand Down Expand Up @@ -179,7 +179,8 @@ public void Populate()
_decals = new Dictionary<string, Texture>();
foreach (var decalPrototype in prototypes)
{
_decals.Add(decalPrototype.ID, decalPrototype.Sprite.Frame0());
if (decalPrototype.ShowMenu)
_decals.Add(decalPrototype.ID, decalPrototype.Sprite.Frame0());
}

RefreshList();
Expand Down
3 changes: 2 additions & 1 deletion Content.Shared/Decals/DecalPrototype.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;

namespace Content.Shared.Decals
Expand All @@ -9,5 +9,6 @@ public sealed class DecalPrototype : IPrototype
[IdDataFieldAttribute] public string ID { get; } = null!;
[DataField("sprite")] public SpriteSpecifier Sprite { get; } = SpriteSpecifier.Invalid;
[DataField("tags")] public List<string> Tags = new();
[DataField("showMenu")] public bool ShowMenu = true;
}
}
12 changes: 12 additions & 0 deletions Resources/Prototypes/Decals/markings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,15 @@

- type: decal
id: WarnEnd
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warn_end

- type: decal
id: WarnEndGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
Expand All @@ -174,69 +176,79 @@

- type: decal
id: WarningLine
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warningline

- type: decal
id: WarningLineGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warningline_greyscale

- type: decal
id: WarningLineCorner
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warninglinecorner

- type: decal
id: WarningLineCornerGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warninglinecorner_greyscale

- type: decal
id: WarningLineCornerFlipped
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warninglinecorner_flipped

- type: decal
id: WarningLineCornerFlippedGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warninglinecorner_flipped_greyscale

- type: decal
id: WarnCorner
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warn_corner

- type: decal
id: WarnCornerGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warn_corner_greyscale

- type: decal
id: WarnCornerFlipped
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
state: warn_corner_flipped

- type: decal
id: WarnCornerFlippedGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
Expand Down

0 comments on commit f8b8b83

Please sign in to comment.