Add linter support for TimedSpawnerComponent, fix linter errors.

This commit is contained in:
Vera Aguilera Puerto
2021-10-14 11:09:16 +02:00
parent 48e99a8e4c
commit 787aa24656
2 changed files with 5 additions and 3 deletions

View File

@@ -3,9 +3,11 @@ using System.Collections.Generic;
using System.Threading; using System.Threading;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
namespace Content.Server.Spawners.Components namespace Content.Server.Spawners.Components
@@ -18,7 +20,7 @@ namespace Content.Server.Spawners.Components
public override string Name => "TimedSpawner"; public override string Name => "TimedSpawner";
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("prototypes")] [DataField("prototypes", customTypeSerializer:typeof(PrototypeIdListSerializer<EntityPrototype>))]
public List<string> Prototypes { get; set; } = new(); public List<string> Prototypes { get; set; } = new();
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]

View File

@@ -10,8 +10,8 @@
- state: ai - state: ai
- type: TimedSpawner - type: TimedSpawner
prototypes: prototypes:
- HumanMob_Spirate - MobSpirate
- HumanMob_Civilian - MobCivilian
chance: 0.75 chance: 0.75
intervalSeconds: 60 intervalSeconds: 60
minimumEntitiesSpawned: 1 minimumEntitiesSpawned: 1