]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Dungeon fixes (#14563)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Fri, 10 Mar 2023 10:19:27 +0000 (21:19 +1100)
committerGitHub <noreply@github.com>
Fri, 10 Mar 2023 10:19:27 +0000 (21:19 +1100)
Content.Server/Procedural/DungeonJob.PostGen.cs
Content.Shared/Procedural/PostGeneration/EntrancePostGen.cs
Resources/Prototypes/biomes.yml

index bf56873544749c94610963d9d85d6422ad6c8052..9ee326ffb9b439f2137102d52c32c94115ce6a92 100644 (file)
@@ -157,7 +157,12 @@ public sealed partial class DungeonJob
                 ClearDoor(dungeon, grid, entrancePos);
                 var gridCoords = grid.GridTileToLocal(entrancePos);
                 // Need to offset the spawn to avoid spawning in the room.
-                _entManager.SpawnEntity(gen.Door, gridCoords);
+
+                foreach (var ent in gen.Entities)
+                {
+                    _entManager.SpawnEntity(ent, gridCoords);
+                }
+
                 count--;
 
                 // Clear out any biome tiles nearby to avoid blocking it
index 9d3595e49f7b81786003b7151761cc21436fef14..8e5f5f54180cc0b2b2289a2a3eeba623c060cd9b 100644 (file)
@@ -1,6 +1,7 @@
 using Content.Shared.Maps;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
+using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
 
 namespace Content.Shared.Procedural.PostGeneration;
 
@@ -15,8 +16,11 @@ public sealed class EntrancePostGen : IPostDunGen
     [DataField("count")]
     public int Count = 1;
 
-    [DataField("door", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
-    public string Door = "AirlockGlass";
+    [DataField("entities", customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))]
+    public List<string> Entities = new()
+    {
+        "AirlockGlass"
+    };
 
     [DataField("tile", customTypeSerializer:typeof(PrototypeIdSerializer<ContentTileDefinition>))]
     public string Tile = "FloorSteel";
index 1bf9379e9cfdb034a65b13ccc05866d72e51bfd3..625cad2d95ba33fb07830bea017b648907d65aac 100644 (file)
         frequency: 1
       decals:
         - grasssnowa1
-        - grassnowa2
-        - grassnowa3
+        - grasssnowa2
+        - grasssnowa3
         - grasssnowb1
         - grasssnowb2
         - grasssnowb3