[TestOf(typeof(EntityUid))]
public sealed class EntityTest
{
+ private static readonly ProtoId<EntityCategoryPrototype> SpawnerCategory = "Spawner";
+
[Test]
public async Task SpawnAndDeleteAllEntitiesOnDifferentMaps()
{
"StationEvent",
"TimedDespawn",
- // Spawner entities
- "DragonRift",
- "RandomHumanoidSpawner",
- "RandomSpawner",
- "ConditionalSpawner",
- "GhostRoleMobSpawner",
- "NukeOperativeSpawner",
- "TimedSpawner",
// makes an announcement on mapInit.
"AnnounceOnSpawn",
};
.Where(p => !p.Abstract)
.Where(p => !pair.IsTestPrototype(p))
.Where(p => !excluded.Any(p.Components.ContainsKey))
+ .Where(p => p.Categories.All(x => x.ID != SpawnerCategory))
.Select(p => p.ID)
.ToList();
+using Robust.Shared.Prototypes;
+
namespace Content.Server.GameTicking.Rules.Components;
/// <summary>
/// and providing loadout + name for the operative on spawn.
/// TODO: Remove once systems can request spawns from the ghost role system directly.
/// </summary>
-[RegisterComponent]
+[RegisterComponent, EntityCategory("Spawner")]
public sealed partial class NukeOperativeSpawnerComponent : Component;
-
/// <summary>
/// Allows a ghost to take this role, spawning a new entity.
/// </summary>
- [RegisterComponent]
+ [RegisterComponent, EntityCategory("Spawner")]
[Access(typeof(GhostRoleSystem))]
public sealed partial class GhostRoleMobSpawnerComponent : Component
{
/// This is added to a marker entity in order to spawn a randomized
/// humanoid ingame.
/// </summary>
-[RegisterComponent]
+[RegisterComponent, EntityCategory("Spawner")]
public sealed partial class RandomHumanoidSpawnerComponent : Component
{
[DataField("settings", customTypeSerializer: typeof(PrototypeIdSerializer<RandomHumanoidSettingsPrototype>))]
namespace Content.Server.Spawners.Components
{
- [RegisterComponent]
+ [RegisterComponent, EntityCategory("Spawner")]
[Virtual]
public partial class ConditionalSpawnerComponent : Component
{
namespace Content.Server.Spawners.Components
{
- [RegisterComponent]
+ [RegisterComponent, EntityCategory("Spawner")]
public sealed partial class RandomSpawnerComponent : ConditionalSpawnerComponent
{
[ViewVariables(VVAccess.ReadWrite)]
/// Can configure the set of entities, spawn timing, spawn chance,
/// and min/max number of entities to spawn.
/// </summary>
-[RegisterComponent]
+[RegisterComponent, EntityCategory("Spawner")]
public sealed partial class TimedSpawnerComponent : Component, ISerializationHooks
{
/// <summary>
using Robust.Shared.Audio;
+using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
namespace Content.Shared.Actions;
-// TODO ACTIONS make this a seprate component and remove the inheritance stuff.
+// TODO ACTIONS make this a separate component and remove the inheritance stuff.
// TODO ACTIONS convert to auto comp state?
// TODO add access attribute. Need to figure out what to do with decal & mapping actions.
// [Access(typeof(SharedActionsSystem))]
+[EntityCategory("Actions")]
public abstract partial class BaseActionComponent : Component
{
public abstract BaseActionEvent? BaseEvent { get; }
foreach (var (slotId, (part, connections, organs)) in allConnections)
{
- var slot = new BodyPrototypeSlot(part != null ? new EntProtoId(part) : null!, connections ?? new HashSet<string>(), organs ?? new Dictionary<string, string>());
+ var slot = new BodyPrototypeSlot(part, connections ?? new HashSet<string>(), organs ?? new Dictionary<string, string>());
slots.Add(slotId, slot);
}
using Robust.Shared.GameStates;
+using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Dragon;
-[NetworkedComponent]
+[NetworkedComponent, EntityCategory("Spawner")]
public abstract partial class SharedDragonRiftComponent : Component
{
[DataField("state")]
--- /dev/null
+entity-category-name-actions = Actions
- type: entity
id: AlertSpriteView
- categories: [ hideSpawnMenu ]
+ categories: [ HideSpawnMenu ]
components:
- type: Sprite
layers:
- type: entity
id: AlertEssenceSpriteView
- categories: [ hideSpawnMenu ]
+ categories: [ HideSpawnMenu ]
components:
- type: Sprite
sprite: /Textures/Interface/Alerts/essence_counter.rsi
name: base flatpack
description: A flatpack used for constructing something.
categories:
- - hideSpawnMenu
+ - HideSpawnMenu
components:
- type: Item
size: Large
- type: entity
id: FlatpackerNoBoardEffect
categories:
- - hideSpawnMenu
+ - HideSpawnMenu
components:
- type: Sprite
sprite: Structures/Machines/autolathe.rsi
--- /dev/null
+- type: entityCategory
+ id: Actions
+ name: entity-category-name-actions
+ hideSpawnMenu: true