-
Notifications
You must be signed in to change notification settings - Fork 0
/
TileData.cs
23 lines (21 loc) · 1.13 KB
/
TileData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using Terraria;
namespace SpawnSheet
{
public readonly record struct TileData(TileTypeData TileTypeData, WallTypeData WallTypeData, TileWallWireStateData TileWallWireStateData, LiquidData LiquidData, TileWallBrightnessInvisibilityData TileWallBrightnessInvisibilityData)
//public record struct TileData(TileTypeData TileTypeData, WallTypeData WallTypeData, TileWallWireStateData TileWallWireStateData, LiquidData LiquidData)
{
public TileData(Tile tile) : this(tile.Get<TileTypeData>(), tile.Get<WallTypeData>(), tile.Get<TileWallWireStateData>(), tile.Get<LiquidData>(), tile.Get<TileWallBrightnessInvisibilityData>()) {
//TileTypeData = tile.Get<TileTypeData>();
//WallTypeData = tile.Get<WallTypeData>();
//TileWallWireStateData = tile.Get<TileWallWireStateData>();
//LiquidData = tile.Get<LiquidData>();
}
internal void CopyToTile(Tile tile) {
tile.Get<TileTypeData>() = TileTypeData;
tile.Get<WallTypeData>() = WallTypeData;
tile.Get<TileWallWireStateData>() = TileWallWireStateData;
tile.Get<LiquidData>() = LiquidData;
tile.Get<TileWallBrightnessInvisibilityData>() = TileWallBrightnessInvisibilityData;
}
}
}