Add basalt tiles (#13462)

This commit is contained in:
metalgearsloth
2023-01-18 05:28:37 +11:00
committed by GitHub
parent c8940cefb3
commit e090cd393b
23 changed files with 308 additions and 0 deletions

View 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
{
}

View 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);
}
}
}

View 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

View 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: ""

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

View 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"
}
]
}

View 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"

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

View 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
]
]
}
]
}