Add basalt tiles (#13462)
12
Content.Shared/Tiles/RequiresTileComponent.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using Robust.Shared.GameStates;
|
||||||
|
|
||||||
|
namespace Content.Shared.Tiles;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deletes the entity if the tile changes from under it. Used for visual effects.
|
||||||
|
/// </summary>
|
||||||
|
[RegisterComponent, NetworkedComponent]
|
||||||
|
public sealed class RequiresTileComponent : Component
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
33
Content.Shared/Tiles/RequiresTileSystem.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using Robust.Shared.Map.Components;
|
||||||
|
using Robust.Shared.Map.Enumerators;
|
||||||
|
|
||||||
|
namespace Content.Shared.Tiles;
|
||||||
|
|
||||||
|
public sealed class RequiresTileSystem : EntitySystem
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
SubscribeLocalEvent<TileChangedEvent>(OnTileChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTileChange(ref TileChangedEvent ev)
|
||||||
|
{
|
||||||
|
if (!TryComp<MapGridComponent>(ev.Entity, out var grid))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var anchored = grid.GetAnchoredEntitiesEnumerator(ev.NewTile.GridIndices);
|
||||||
|
if (anchored.Equals(AnchoredEntitiesEnumerator.Empty))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var query = GetEntityQuery<RequiresTileComponent>();
|
||||||
|
|
||||||
|
while (anchored.MoveNext(out var ent))
|
||||||
|
{
|
||||||
|
if (!query.HasComponent(ent.Value))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
QueueDel(ent.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
62
Resources/Prototypes/Decals/rock.yml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
- type: decal
|
||||||
|
id: Basalt1
|
||||||
|
tags: ["rock"]
|
||||||
|
sprite:
|
||||||
|
sprite: Decals/basalt.rsi
|
||||||
|
state: basalt1
|
||||||
|
|
||||||
|
- type: decal
|
||||||
|
id: Basalt2
|
||||||
|
tags: ["rock"]
|
||||||
|
sprite:
|
||||||
|
sprite: Decals/basalt.rsi
|
||||||
|
state: basalt2
|
||||||
|
|
||||||
|
- type: decal
|
||||||
|
id: Basalt3
|
||||||
|
tags: ["rock"]
|
||||||
|
sprite:
|
||||||
|
sprite: Decals/basalt.rsi
|
||||||
|
state: basalt3
|
||||||
|
|
||||||
|
- type: decal
|
||||||
|
id: Basalt4
|
||||||
|
tags: ["rock"]
|
||||||
|
sprite:
|
||||||
|
sprite: Decals/basalt.rsi
|
||||||
|
state: basalt4
|
||||||
|
|
||||||
|
- type: decal
|
||||||
|
id: Basalt5
|
||||||
|
tags: ["rock"]
|
||||||
|
sprite:
|
||||||
|
sprite: Decals/basalt.rsi
|
||||||
|
state: basalt5
|
||||||
|
|
||||||
|
- type: decal
|
||||||
|
id: Basalt6
|
||||||
|
tags: ["rock"]
|
||||||
|
sprite:
|
||||||
|
sprite: Decals/basalt.rsi
|
||||||
|
state: basalt6
|
||||||
|
|
||||||
|
- type: decal
|
||||||
|
id: Basalt7
|
||||||
|
tags: ["rock"]
|
||||||
|
sprite:
|
||||||
|
sprite: Decals/basalt.rsi
|
||||||
|
state: basalt7
|
||||||
|
|
||||||
|
- type: decal
|
||||||
|
id: Basalt8
|
||||||
|
tags: ["rock"]
|
||||||
|
sprite:
|
||||||
|
sprite: Decals/basalt.rsi
|
||||||
|
state: basalt8
|
||||||
|
|
||||||
|
- type: decal
|
||||||
|
id: Basalt9
|
||||||
|
tags: ["rock"]
|
||||||
|
sprite:
|
||||||
|
sprite: Decals/basalt.rsi
|
||||||
|
state: basalt9
|
||||||
81
Resources/Prototypes/Entities/Tile/basalt.yml
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
- type: entity
|
||||||
|
id: BasaltOne
|
||||||
|
name: basalt
|
||||||
|
description: Rock
|
||||||
|
placement:
|
||||||
|
mode: SnapgridCenter
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
sprite: /Textures/Tiles/Planet/basalt.rsi
|
||||||
|
layers:
|
||||||
|
- state: basalt1
|
||||||
|
shader: unshaded
|
||||||
|
drawdepth: LowFloors
|
||||||
|
- type: RequiresTile
|
||||||
|
- type: Transform
|
||||||
|
anchored: true
|
||||||
|
- type: Tag
|
||||||
|
tags:
|
||||||
|
- HideContextMenu
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: BasaltTwo
|
||||||
|
parent: BasaltOne
|
||||||
|
placement:
|
||||||
|
mode: SnapgridCenter
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
layers:
|
||||||
|
- state: basalt2
|
||||||
|
shader: unshaded
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: BasaltThree
|
||||||
|
parent: BasaltOne
|
||||||
|
placement:
|
||||||
|
mode: SnapgridCenter
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
layers:
|
||||||
|
- state: basalt3
|
||||||
|
shader: unshaded
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: BasaltFour
|
||||||
|
parent: BasaltOne
|
||||||
|
placement:
|
||||||
|
mode: SnapgridCenter
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
layers:
|
||||||
|
- state: basalt4
|
||||||
|
shader: unshaded
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: BasaltFive
|
||||||
|
parent: BasaltOne
|
||||||
|
placement:
|
||||||
|
mode: SnapgridCenter
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
layers:
|
||||||
|
- state: basalt5
|
||||||
|
shader: unshaded
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: BasaltRandom
|
||||||
|
parent: BasaltOne
|
||||||
|
suffix: Random
|
||||||
|
components:
|
||||||
|
- type: RandomSprite
|
||||||
|
available:
|
||||||
|
- 0:
|
||||||
|
basalt1: ""
|
||||||
|
- 0:
|
||||||
|
basalt2: ""
|
||||||
|
- 0:
|
||||||
|
basalt3: ""
|
||||||
|
- 0:
|
||||||
|
basalt4: ""
|
||||||
|
- 0:
|
||||||
|
basalt5: ""
|
||||||
@@ -1092,6 +1092,18 @@
|
|||||||
heatCapacity: 10000
|
heatCapacity: 10000
|
||||||
|
|
||||||
# Terrain
|
# Terrain
|
||||||
|
- type: tile
|
||||||
|
id: FloorBasaslt
|
||||||
|
name: tiles-basalt-floor
|
||||||
|
sprite: /Textures/Tiles/Planet/basalt.png
|
||||||
|
isSubfloor: true
|
||||||
|
canCrowbar: false
|
||||||
|
footstepSounds:
|
||||||
|
collection: FootstepAsteroid
|
||||||
|
friction: 0.30
|
||||||
|
thermalConductivity: 0.04
|
||||||
|
heatCapacity: 10000
|
||||||
|
|
||||||
- type: tile
|
- type: tile
|
||||||
id: FloorSnow
|
id: FloorSnow
|
||||||
name: tiles-snow
|
name: tiles-snow
|
||||||
|
|||||||
BIN
Resources/Textures/Decals/basalt.rsi/basalt1.png
Normal file
|
After Width: | Height: | Size: 896 B |
BIN
Resources/Textures/Decals/basalt.rsi/basalt2.png
Normal file
|
After Width: | Height: | Size: 752 B |
BIN
Resources/Textures/Decals/basalt.rsi/basalt3.png
Normal file
|
After Width: | Height: | Size: 779 B |
BIN
Resources/Textures/Decals/basalt.rsi/basalt4.png
Normal file
|
After Width: | Height: | Size: 661 B |
BIN
Resources/Textures/Decals/basalt.rsi/basalt5.png
Normal file
|
After Width: | Height: | Size: 817 B |
BIN
Resources/Textures/Decals/basalt.rsi/basalt6.png
Normal file
|
After Width: | Height: | Size: 627 B |
BIN
Resources/Textures/Decals/basalt.rsi/basalt7.png
Normal file
|
After Width: | Height: | Size: 713 B |
BIN
Resources/Textures/Decals/basalt.rsi/basalt8.png
Normal file
|
After Width: | Height: | Size: 838 B |
BIN
Resources/Textures/Decals/basalt.rsi/basalt9.png
Normal file
|
After Width: | Height: | Size: 739 B |
38
Resources/Textures/Decals/basalt.rsi/meta.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"license": "CC-BY-SA-3.0",
|
||||||
|
"copyright": "https://github.com/tgstation/tgstation/tree/423404b31e36c4605faacec881b324db8997b0a6",
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "basalt1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt9"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
4
Resources/Textures/Tiles/Planet/attributions.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
- files: ["basalt.png"]
|
||||||
|
license: "CC-BY-SA-3.0"
|
||||||
|
copyright: "Taken from tgstation"
|
||||||
|
source: "https://github.com/tgstation/tgstation/tree/423404b31e36c4605faacec881b324db8997b0a6"
|
||||||
BIN
Resources/Textures/Tiles/Planet/basalt.png
Normal file
|
After Width: | Height: | Size: 763 B |
BIN
Resources/Textures/Tiles/Planet/basalt.rsi/basalt1.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Resources/Textures/Tiles/Planet/basalt.rsi/basalt2.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Resources/Textures/Tiles/Planet/basalt.rsi/basalt3.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Resources/Textures/Tiles/Planet/basalt.rsi/basalt4.png
Normal file
|
After Width: | Height: | Size: 916 B |
BIN
Resources/Textures/Tiles/Planet/basalt.rsi/basalt5.png
Normal file
|
After Width: | Height: | Size: 784 B |
66
Resources/Textures/Tiles/Planet/basalt.rsi/meta.json
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"license": "CC-BY-SA-3.0",
|
||||||
|
"copyright": "https://github.com/tgstation/tgstation/tree/423404b31e36c4605faacec881b324db8997b0a6",
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "basalt1",
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt2",
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt3",
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt4",
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "basalt5",
|
||||||
|
"delays": [
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||