Make decal gridinit use gridentityid (#8792)
This commit is contained in:
@@ -41,13 +41,13 @@ namespace Content.Shared.Decals
|
|||||||
|
|
||||||
private void OnGridInitialize(GridInitializeEvent msg)
|
private void OnGridInitialize(GridInitializeEvent msg)
|
||||||
{
|
{
|
||||||
var comp = EntityManager.EnsureComponent<DecalGridComponent>(MapManager.GetGrid(msg.GridId).GridEntityId);
|
var comp = EntityManager.EnsureComponent<DecalGridComponent>(msg.EntityUid);
|
||||||
ChunkIndex[msg.GridId] = new();
|
ChunkIndex[msg.EntityUid] = new();
|
||||||
foreach (var (indices, decals) in comp.ChunkCollection.ChunkCollection)
|
foreach (var (indices, decals) in comp.ChunkCollection.ChunkCollection)
|
||||||
{
|
{
|
||||||
foreach (var uid in decals.Keys)
|
foreach (var uid in decals.Keys)
|
||||||
{
|
{
|
||||||
ChunkIndex[msg.GridId][uid] = indices;
|
ChunkIndex[msg.EntityUid][uid] = indices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user