allow decals to be removed from placement menu (#9843)

This commit is contained in:
Nemanja
2022-07-17 22:02:03 -04:00
committed by GitHub
parent 9665a11363
commit f8b8b83657
3 changed files with 17 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Client.Stylesheets;
using Content.Shared.Decals;
using Robust.Client.AutoGenerated;
@@ -179,7 +179,8 @@ public sealed partial class DecalPlacerWindow : DefaultWindow
_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();

View File

@@ -1,4 +1,4 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared.Decals
@@ -9,5 +9,6 @@ namespace Content.Shared.Decals
[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;
}
}

View File

@@ -142,6 +142,7 @@
- type: decal
id: WarnEnd
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -149,6 +150,7 @@
- type: decal
id: WarnEndGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -174,6 +176,7 @@
- type: decal
id: WarningLine
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -181,6 +184,7 @@
- type: decal
id: WarningLineGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -188,6 +192,7 @@
- type: decal
id: WarningLineCorner
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -195,6 +200,7 @@
- type: decal
id: WarningLineCornerGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -202,6 +208,7 @@
- type: decal
id: WarningLineCornerFlipped
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -209,6 +216,7 @@
- type: decal
id: WarningLineCornerFlippedGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -216,6 +224,7 @@
- type: decal
id: WarnCorner
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -223,6 +232,7 @@
- type: decal
id: WarnCornerGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -230,6 +240,7 @@
- type: decal
id: WarnCornerFlipped
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi
@@ -237,6 +248,7 @@
- type: decal
id: WarnCornerFlippedGreyscale
showMenu: false
tags: ["station", "markings"]
sprite:
sprite: Decals/markings.rsi