Skip to content

Commit

Permalink
Mineshaft (space-wizards#25733)
Browse files Browse the repository at this point in the history
* content

* catwalks

* fix fucking icons

* finish PR

* +1 room

* fix
  • Loading branch information
TheShuEd authored Mar 4, 2024
1 parent ce9e13d commit ace8285
Show file tree
Hide file tree
Showing 13 changed files with 6,817 additions and 45 deletions.
6 changes: 3 additions & 3 deletions Content.Server/Procedural/DungeonJob.PostGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private async Task PostGen(AutoCablingPostGen gen, Dungeon dungeon, EntityUid gr
if (found)
continue;

_entManager.SpawnEntity("CableApcExtension", _grid.GridTileToLocal(tile));
_entManager.SpawnEntity(gen.Entity, _grid.GridTileToLocal(tile));
}
}

Expand Down Expand Up @@ -854,11 +854,11 @@ private async Task PostGen(CorridorPostGen gen, Dungeon dungeon, EntityUid gridU
}

var setTiles = new List<(Vector2i, Tile)>();
var tileDef = _tileDefManager["FloorSteel"];
var tileDef = _prototype.Index(gen.Tile);

foreach (var tile in corridorTiles)
{
setTiles.Add((tile, _tile.GetVariantTile((ContentTileDefinition) tileDef, random)));
setTiles.Add((tile, _tile.GetVariantTile(tileDef, random)));
}

grid.SetTiles(setTiles);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using Robust.Shared.Prototypes;

namespace Content.Shared.Procedural.PostGeneration;

/// <summary>
/// Runs cables throughout the dungeon.
/// </summary>
public sealed partial class AutoCablingPostGen : IPostDunGen
{

[DataField]
public EntProtoId Entity = "CableApcExtension";
}
6 changes: 6 additions & 0 deletions Content.Shared/Procedural/PostGeneration/CorridorPostGen.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using Content.Shared.Maps;
using Robust.Shared.Prototypes;

namespace Content.Shared.Procedural.PostGeneration;

/// <summary>
Expand All @@ -17,6 +20,9 @@ public sealed partial class CorridorPostGen : IPostDunGen
[DataField("method")]
public CorridorPostGenMethod Method = CorridorPostGenMethod.MinimumSpanningTree;

[DataField]
public ProtoId<ContentTileDefinition> Tile = "FloorSteel";

/// <summary>
/// How wide to make the corridor.
/// </summary>
Expand Down
6,310 changes: 6,310 additions & 0 deletions Resources/Maps/Dungeon/mineshaft.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
- type: entity
id: RandomWoodenSupport
name: wooden support spawner
parent: MarkerBase
components:
- type: Sprite
layers:
- state: red
- sprite: Objects/Decoration/mines.rsi
state: support
- type: RandomSpawner
prototypes:
- WoodenSupport
- WoodenSupportBeam
- WoodenSupportBeam
- WoodenSupportBeam
chance: 0.9

- type: entity
id: RandomWoodenWall
name: wooden wall spawner
parent: MarkerBase
components:
- type: Sprite
layers:
- state: red
- sprite: Objects/Decoration/mines.rsi
state: support_wall
- type: RandomSpawner
prototypes:
- WoodenSupportWall
- WoodenSupportWallBroken
chance: 0.9

- type: entity
id: RandomStalagmiteOrCrystal
name: stalagmite or crystal spawner
parent: MarkerBase
components:
- type: Sprite
layers:
- state: red
- sprite: Objects/Decoration/Flora/flora_stalagmite.rsi
state: stalagmite2
- type: RandomSpawner
offset: 0.3
prototypes:
- RandomBrownStalagmite
- RandomGreyStalagmite
- CrystalSpawner
chance: 0.9

- type: entity
id: RandomBrownStalagmite
name: brown stalagmite spawner
parent: MarkerBase
components:
- type: Sprite
layers:
- state: red
- sprite: Objects/Decoration/Flora/flora_stalagmite.rsi
state: stalagmite2
- type: RandomSpawner
offset: 0.3
prototypes:
- FloraStalagmite1
- FloraStalagmite2
- FloraStalagmite3
- FloraStalagmite4
- FloraStalagmite5
- FloraStalagmite6
chance: 0.9

- type: entity
id: RandomGreyStalagmite
name: grey stalagmite spawner
parent: MarkerBase
components:
- type: Sprite
layers:
- state: red
- sprite: Objects/Decoration/Flora/flora_stalagmite.rsi
state: grey_stalagmite3
- type: RandomSpawner
offset: 0.3
prototypes:
- FloraGreyStalagmite1
- FloraGreyStalagmite2
- FloraGreyStalagmite3
- FloraGreyStalagmite4
- FloraGreyStalagmite5
- FloraGreyStalagmite6
chance: 0.9
21 changes: 17 additions & 4 deletions Resources/Prototypes/Entities/Objects/Decoration/mining.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
thresholds:
- trigger:
!type:DamageTrigger
damage: 50
damage: 10
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
Expand All @@ -56,7 +56,13 @@
placement:
mode: SnapgridCenter
components:
- type: PlacementReplacement
key: walls
- type: Tag
tags:
- Wooden
- type: Sprite
noRot: true
sprite: Objects/Decoration/mines.rsi
state: support
- type: Damageable
Expand Down Expand Up @@ -85,7 +91,7 @@
thresholds:
- trigger:
!type:DamageTrigger
damage: 150
damage: 50
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
Expand Down Expand Up @@ -124,7 +130,14 @@
placement:
mode: SnapgridCenter
components:
- type: PlacementReplacement
key: walls
- type: Tag
tags:
- Wall
- Wooden
- type: Sprite
noRot: true
sprite: Objects/Decoration/mines.rsi
state: support_wall
- type: Damageable
Expand All @@ -147,7 +160,7 @@
thresholds:
- trigger:
!type:DamageTrigger
damage: 250
damage: 75
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
Expand All @@ -168,7 +181,7 @@
thresholds:
- trigger:
!type:DamageTrigger
damage: 150
damage: 50
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
description: What can be better then late evening under the sky with guitar and friends.
components:
- type: Sprite
noRot: true
sprite: Structures/Decoration/bonfire.rsi
layers:
- state: bonfire
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
description: Finally, some decent reception around here...
components:
- type: Sprite
noRot: true
drawdepth: SmallObjects
layers:
- map: ["computerLayerBody"]
Expand Down
63 changes: 27 additions & 36 deletions Resources/Prototypes/Entities/Structures/Walls/asteroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
#Asteroid rock
- type: entity
id: AsteroidRock
parent: BaseStructure
parent: BaseWall
name: asteroid rock
description: A rocky asteroid.
components:
- type: PlacementReplacement
key: walls
- type: Transform
noRot: true
- type: IconSmooth
key: walls
mode: NoSprite
- type: SmoothEdge
- type: Icon
sprite: Structures/Walls/rock.rsi
state: rock_asteroid
- type: Sprite
sprite: Structures/Walls/rock.rsi
layers:
Expand Down Expand Up @@ -42,21 +45,6 @@
path: /Audio/Effects/break_stone.ogg
params:
volume: -6
- type: Occluder
- type: Airtight
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.5,0.5,0.5"
density: 100
mask:
- FullTileMask
layer:
- WallLayer
- type: RadiationBlocker
resistance: 2

# Ore veins
- type: entity
Expand Down Expand Up @@ -379,12 +367,12 @@
# Rocks and ore veins
- type: entity
id: WallRock
parent: BaseStructure
parent: BaseWall
name: rock
suffix: planetmap
components:
- type: PlacementReplacement
key: walls
- type: Transform
noRot: true
- type: SoundOnGather
- type: Gatherable
whitelist:
Expand All @@ -401,22 +389,12 @@
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Occluder
- type: Airtight
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.5,0.5,0.5"
density: 100
mask:
- FullTileMask
layer:
- WallLayer
- type: IconSmooth
key: walls
mode: NoSprite
- type: Icon
sprite: Structures/Walls/rock.rsi
state: rock
- type: SmoothEdge
- type: Sprite
sprite: Structures/Walls/rock.rsi
Expand All @@ -430,8 +408,6 @@
state: rock_north
- map: [ "enum.EdgeLayer.West" ]
state: rock_west
- type: RadiationBlocker
resistance: 2

# Ore veins
- type: entity
Expand Down Expand Up @@ -662,6 +638,9 @@
name: basalt
parent: WallRock
components:
- type: Icon
sprite: Structures/Walls/rock.rsi
state: rock_wall
- type: Sprite
sprite: Structures/Walls/rock.rsi
layers:
Expand Down Expand Up @@ -902,6 +881,9 @@
name: snowdrift
parent: WallRock
components:
- type: Icon
sprite: Structures/Walls/rock.rsi
state: rock_snow
- type: Sprite
sprite: Structures/Walls/rock.rsi
layers:
Expand Down Expand Up @@ -1142,6 +1124,9 @@
name: sandstone
parent: WallRock
components:
- type: Icon
sprite: Structures/Walls/rock.rsi
state: rock_sand
- type: Sprite
sprite: Structures/Walls/rock.rsi
layers:
Expand Down Expand Up @@ -1382,6 +1367,9 @@
name: chromite
parent: WallRock
components:
- type: Icon
sprite: Structures/Walls/rock.rsi
state: rock_chromite
- type: Sprite
sprite: Structures/Walls/rock.rsi
layers:
Expand Down Expand Up @@ -1622,6 +1610,9 @@
name: andesite
parent: WallRock
components:
- type: Icon
sprite: Structures/Walls/rock.rsi
state: rock_andesite
- type: Sprite
sprite: Structures/Walls/rock.rsi
layers:
Expand Down
Loading

0 comments on commit ace8285

Please sign in to comment.