Decal system cleanup (#13493)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -15,11 +15,20 @@ namespace Content.Shared.Decals
|
||||
[DataField("chunkCollection", serverOnly: true)]
|
||||
public DecalGridChunkCollection ChunkCollection = new(new ());
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary mapping decals to their corresponding grid chunks.
|
||||
/// </summary>
|
||||
public readonly Dictionary<uint, Vector2i> DecalIndex = new();
|
||||
|
||||
/// <summary>
|
||||
/// Tick at which PVS was last toggled. Ensures that all players receive a full update when toggling PVS.
|
||||
/// </summary>
|
||||
public GameTick ForceTick { get; set; }
|
||||
|
||||
// client-side data. I CBF creating a separate client-side comp for this. The server can survive with some empty dictionaries.
|
||||
public readonly Dictionary<uint, int> DecalZIndexIndex = new();
|
||||
public readonly SortedDictionary<int, SortedDictionary<uint, Decal>> DecalRenderIndex = new();
|
||||
|
||||
[DataDefinition]
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class DecalChunk
|
||||
@@ -51,7 +60,7 @@ namespace Content.Shared.Decals
|
||||
[DataRecord, Serializable, NetSerializable]
|
||||
public record DecalGridChunkCollection(Dictionary<Vector2i, DecalChunk> ChunkCollection)
|
||||
{
|
||||
public uint NextUid;
|
||||
public uint NextDecalId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user