From 787aa246566e89d7dc4107cf78361a19023a4dc9 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Thu, 14 Oct 2021 11:09:16 +0200 Subject: [PATCH] Add linter support for TimedSpawnerComponent, fix linter errors. --- Content.Server/Spawners/Components/TimedSpawnerComponent.cs | 4 +++- .../Entities/Markers/Spawners/Conditional/timed.yml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Content.Server/Spawners/Components/TimedSpawnerComponent.cs b/Content.Server/Spawners/Components/TimedSpawnerComponent.cs index bb353708d5..ff804342d5 100644 --- a/Content.Server/Spawners/Components/TimedSpawnerComponent.cs +++ b/Content.Server/Spawners/Components/TimedSpawnerComponent.cs @@ -3,9 +3,11 @@ using System.Collections.Generic; using System.Threading; using Robust.Shared.GameObjects; using Robust.Shared.IoC; +using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Robust.Shared.ViewVariables; namespace Content.Server.Spawners.Components @@ -18,7 +20,7 @@ namespace Content.Server.Spawners.Components public override string Name => "TimedSpawner"; [ViewVariables(VVAccess.ReadWrite)] - [DataField("prototypes")] + [DataField("prototypes", customTypeSerializer:typeof(PrototypeIdListSerializer))] public List Prototypes { get; set; } = new(); [ViewVariables(VVAccess.ReadWrite)] diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Conditional/timed.yml b/Resources/Prototypes/Entities/Markers/Spawners/Conditional/timed.yml index 88c262936c..d5f19680f3 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Conditional/timed.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Conditional/timed.yml @@ -10,8 +10,8 @@ - state: ai - type: TimedSpawner prototypes: - - HumanMob_Spirate - - HumanMob_Civilian + - MobSpirate + - MobCivilian chance: 0.75 intervalSeconds: 60 minimumEntitiesSpawned: 1