From 2d60a4684c771b350d9c3c0dab794aa21de624e5 Mon Sep 17 00:00:00 2001
From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Date: Mon, 14 Oct 2024 16:05:49 +1300
Subject: [PATCH] Hide role entities in the spawn menu (#32798)
---
.../Atmos/Components/AtmosFixMarkerComponent.cs | 4 +++-
Content.Shared/Roles/MindRoleComponent.cs | 2 ++
Resources/Locale/en-US/entity-categories.ftl | 4 +++-
Resources/Prototypes/Entities/categories.yml | 12 +++++++++++-
4 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/Content.Server/Atmos/Components/AtmosFixMarkerComponent.cs b/Content.Server/Atmos/Components/AtmosFixMarkerComponent.cs
index 5123500239..a60d042fb5 100644
--- a/Content.Server/Atmos/Components/AtmosFixMarkerComponent.cs
+++ b/Content.Server/Atmos/Components/AtmosFixMarkerComponent.cs
@@ -1,9 +1,11 @@
+using Robust.Shared.Prototypes;
+
namespace Content.Server.Atmos.Components
{
///
/// Used by FixGridAtmos. Entities with this may get magically auto-deleted on map initialization in future.
///
- [RegisterComponent]
+ [RegisterComponent, EntityCategory("Mapping")]
public sealed partial class AtmosFixMarkerComponent : Component
{
// See FixGridAtmos for more details
diff --git a/Content.Shared/Roles/MindRoleComponent.cs b/Content.Shared/Roles/MindRoleComponent.cs
index 38b83a8b3f..a3dd0b3bc6 100644
--- a/Content.Shared/Roles/MindRoleComponent.cs
+++ b/Content.Shared/Roles/MindRoleComponent.cs
@@ -42,6 +42,8 @@ public sealed partial class MindRoleComponent : BaseMindRoleComponent
public ProtoId? JobPrototype { get; set; }
}
+// Why does this base component actually exist? It does make auto-categorization easy, but before that it was useless?
+[EntityCategory("Roles")]
public abstract partial class BaseMindRoleComponent : Component
{
diff --git a/Resources/Locale/en-US/entity-categories.ftl b/Resources/Locale/en-US/entity-categories.ftl
index 6067830b7a..4b6cf87942 100644
--- a/Resources/Locale/en-US/entity-categories.ftl
+++ b/Resources/Locale/en-US/entity-categories.ftl
@@ -1,3 +1,5 @@
entity-category-name-actions = Actions
entity-category-name-game-rules = Game Rules
-entity-category-name-objectives = Objectives
\ No newline at end of file
+entity-category-name-objectives = Objectives
+entity-category-name-roles = Mind Roles
+entity-category-name-mapping = Mapping
diff --git a/Resources/Prototypes/Entities/categories.yml b/Resources/Prototypes/Entities/categories.yml
index bc4dd104de..dffc6b6aaf 100644
--- a/Resources/Prototypes/Entities/categories.yml
+++ b/Resources/Prototypes/Entities/categories.yml
@@ -11,4 +11,14 @@
- type: entityCategory
id: Objectives
name: entity-category-name-objectives
- hideSpawnMenu: true
\ No newline at end of file
+ hideSpawnMenu: true
+
+- type: entityCategory
+ id: Roles
+ name: entity-category-name-roles
+ hideSpawnMenu: true
+
+# markers, atmos fixing, etc
+- type: entityCategory
+ id: Mapping
+ name: entity-category-name-mapping
--
2.52.0