diff --git a/Content.Server/_CP14/Demiplane/Jobs/CP14SpawnRandomDemiplaneJob.cs b/Content.Server/_CP14/Demiplane/Jobs/CP14SpawnRandomDemiplaneJob.cs index a8438d2c23..46d910bfde 100644 --- a/Content.Server/_CP14/Demiplane/Jobs/CP14SpawnRandomDemiplaneJob.cs +++ b/Content.Server/_CP14/Demiplane/Jobs/CP14SpawnRandomDemiplaneJob.cs @@ -71,6 +71,7 @@ public sealed class CP14SpawnRandomDemiplaneJob : Job var grid = _mapManager.CreateGridEntity(DemiplaneMapUid); MetaDataComponent? metadata = null; + DungeonConfigPrototype dungeonConfig = new(); _metaData.SetEntityName(DemiplaneMapUid, "TODO: MAP Expedition name generation"); _metaData.SetEntityName(grid, "TODO: GRID Expedition name generation"); @@ -79,27 +80,32 @@ public sealed class CP14SpawnRandomDemiplaneJob : Job var expeditionConfig = _prototypeManager.Index(_config); var indexedLocation = _prototypeManager.Index(expeditionConfig.LocationConfig); + dungeonConfig.Data = indexedLocation.Data; + dungeonConfig.Layers.AddRange(indexedLocation.Layers); + dungeonConfig.ReserveTiles = indexedLocation.ReserveTiles; + //Add map components _entManager.AddComponents(DemiplaneMapUid, expeditionConfig.Components); + //Apply modifiers foreach (var modifier in _modifiers) { if (!_prototypeManager.TryIndex(modifier, out var indexedModifier)) continue; - indexedLocation.Layers.AddRange(indexedModifier.Layers); + dungeonConfig.Layers.AddRange(indexedModifier.Layers); _entManager.AddComponents(DemiplaneMapUid, indexedModifier.Components); } //Enter and exits if (_prototypeManager.TryIndex("DemiplaneConnections", out var indexedConnections)) { - indexedLocation.Layers.AddRange(indexedConnections.Layers); + dungeonConfig.Layers.AddRange(indexedConnections.Layers); } //Spawn modified config - _dungeon.GenerateDungeon(indexedLocation, + _dungeon.GenerateDungeon(dungeonConfig, grid, grid, Vector2i.Zero, diff --git a/Resources/Prototypes/_CP14/Entities/subdimensionGenTEST.yml b/Resources/Prototypes/_CP14/Entities/subdimensionGenTEST.yml index 11089a9a26..b2aacf45cb 100644 --- a/Resources/Prototypes/_CP14/Entities/subdimensionGenTEST.yml +++ b/Resources/Prototypes/_CP14/Entities/subdimensionGenTEST.yml @@ -11,20 +11,41 @@ layers: - state: core shader: unshaded - -- type: entity - id: CP14DemiplanKey - parent: CP14BaseSubdimensionalKey - components: - - type: CP14DemiplaneGeneratorData - rewardLimit: 1.25 - difficultyLimit: 0.75 - - type: CP14DemiplaneRift - type: GuideHelp guides: - CP14_RU_Demiplanes - CP14_EN_Demiplanes +- type: entity + id: CP14DemiplanKey + parent: CP14BaseSubdimensionalKey + name: demiplan key + components: + - type: CP14DemiplaneGeneratorData + rewardLimit: 1.25 + difficultyLimit: 0.75 + maxModifiers: 6 + +- type: entity + id: CP14DemiplanKeyHard + parent: CP14BaseSubdimensionalKey + name: hard demiplan key - hard + components: + - type: CP14DemiplaneGeneratorData + rewardLimit: 2.25 + difficultyLimit: 1.75 + maxModifiers: 10 + +- type: entity + id: CP14DemiplanKeyHardcore + parent: CP14BaseSubdimensionalKey + name: demiplan key - HARDCORE + components: + - type: CP14DemiplaneGeneratorData + rewardLimit: 4.25 + difficultyLimit: 2.75 + maxModifiers: 15 + - type: entity id: CP14DemiplanRiftCore categories: [ ForkFiltered ]