Mining Asteroid Treasure Vaults (#31638)
add interior rooms to the vgroid
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Numerics;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Shared.Maps;
|
||||
using Content.Shared.Procedural;
|
||||
using Content.Shared.Procedural.DungeonGenerators;
|
||||
|
||||
@@ -10,7 +11,7 @@ public sealed partial class DungeonJob
|
||||
/// <summary>
|
||||
/// <see cref="FillGridDunGen"/>
|
||||
/// </summary>
|
||||
private async Task<Dungeon> GenerateFillDunGen(DungeonData data, HashSet<Vector2i> reservedTiles)
|
||||
private async Task<Dungeon> GenerateFillDunGen(FillGridDunGen fill, DungeonData data, HashSet<Vector2i> reservedTiles)
|
||||
{
|
||||
if (!data.Entities.TryGetValue(DungeonDataKey.Fill, out var fillEnt))
|
||||
{
|
||||
@@ -28,6 +29,9 @@ public sealed partial class DungeonJob
|
||||
if (reservedTiles.Contains(tile))
|
||||
continue;
|
||||
|
||||
if (fill.AllowedTiles != null && !fill.AllowedTiles.Contains(((ContentTileDefinition) _tileDefManager[tileRef.Value.Tile.TypeId]).ID))
|
||||
continue;
|
||||
|
||||
if (!_anchorable.TileFree(_grid, tile, DungeonSystem.CollisionLayer, DungeonSystem.CollisionMask))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ public sealed partial class DungeonJob : Job<List<Dungeon>>
|
||||
dungeons.AddRange(await GenerateExteriorDungen(position, exterior, reservedTiles, random));
|
||||
break;
|
||||
case FillGridDunGen fill:
|
||||
dungeons.Add(await GenerateFillDunGen(data, reservedTiles));
|
||||
dungeons.Add(await GenerateFillDunGen(fill, data, reservedTiles));
|
||||
break;
|
||||
case JunctionDunGen junc:
|
||||
await PostGen(junc, data, dungeons[^1], reservedTiles, random);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
using Content.Shared.Maps;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Procedural.DungeonGenerators;
|
||||
|
||||
/// <summary>
|
||||
@@ -7,4 +10,11 @@ namespace Content.Shared.Procedural.DungeonGenerators;
|
||||
/// DungeonData keys are:
|
||||
/// - Fill
|
||||
/// </remarks>
|
||||
public sealed partial class FillGridDunGen : IDunGenLayer;
|
||||
public sealed partial class FillGridDunGen : IDunGenLayer
|
||||
{
|
||||
/// <summary>
|
||||
/// Tiles the fill can occur on.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public HashSet<ProtoId<ContentTileDefinition>>? AllowedTiles;
|
||||
}
|
||||
|
||||
2363
Resources/Maps/Dungeon/vgroidinterior.yml
Normal file
2363
Resources/Maps/Dungeon/vgroidinterior.yml
Normal file
File diff suppressed because it is too large
Load Diff
105
Resources/Prototypes/Procedural/Themes/vgroidinterior.yml
Normal file
105
Resources/Prototypes/Procedural/Themes/vgroidinterior.yml
Normal file
@@ -0,0 +1,105 @@
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5a
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 0,0
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5b
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 6,0
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5c
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 12,0
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5d
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 18,0
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5e
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 0,6
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5f
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 6,6
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5g
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 12,6
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5h
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 18,6
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5i
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 0,12
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5j
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 6,12
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5k
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 12,12
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: dungeonRoom
|
||||
id: VGRoidInterior5x5l
|
||||
size: 5,5
|
||||
atlas: /Maps/Dungeon/vgroidinterior.yml
|
||||
offset: 18,12
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
|
||||
- type: entity
|
||||
id: VGRoidInteriorRoomMarker
|
||||
parent: BaseRoomMarker
|
||||
name: VGRoid interior marker
|
||||
components:
|
||||
- type: RoomFill
|
||||
roomWhitelist:
|
||||
tags:
|
||||
- VGRoidInterior
|
||||
@@ -18,6 +18,11 @@
|
||||
proto: VGRoidSmaller
|
||||
- !type:PrototypeDunGen
|
||||
proto: VGRoidSmallPaths
|
||||
- !type:EntityTableDunGen
|
||||
minCount: 7
|
||||
maxCount: 12
|
||||
table:
|
||||
id: VGRoidInteriorRoomMarker
|
||||
# Fill
|
||||
- !type:PrototypeDunGen
|
||||
proto: VGRoidFill
|
||||
@@ -219,3 +224,5 @@
|
||||
Fill: IronRock
|
||||
layers:
|
||||
- !type:FillGridDunGen
|
||||
allowedTiles:
|
||||
- FloorAsteroidSand
|
||||
|
||||
@@ -1345,6 +1345,9 @@
|
||||
- type: Tag
|
||||
id: Vegetable
|
||||
|
||||
- type: Tag
|
||||
id: VGRoidInterior
|
||||
|
||||
- type: Tag
|
||||
id: VimPilot
|
||||
|
||||
|
||||
Reference in New Issue
Block a user