This commit is contained in:
Ed
2024-07-17 23:21:00 +03:00
parent 66495b368d
commit d3955a4400
2 changed files with 1 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ namespace Content.Server._CP14.Procedural.RoomSpawner;
public sealed partial class CP14RoomSpawnerComponent : Component
{
[DataField(required: true)]
public List<ProtoId<TagPrototype>> RoomsTag = new();
public HashSet<ProtoId<TagPrototype>> RoomsTag = new();
[DataField]
public float Prob = 1f;

View File

@@ -54,10 +54,7 @@ public sealed class CP14RoomSpawnerSystem : EntitySystem
}
if (rooms.Count == 0)
{
Log.Error($"Unable to find matching rooms by tag for {ToPrettyString(spawner)}");
return;
}
var selectedRoom = _random.Pick(rooms);