Kill NetworkedMapManager (#3516)

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
Co-authored-by: Paul <ritter.paul1@googlemail.com>
This commit is contained in:
metalgearsloth
2022-12-12 08:00:31 +11:00
committed by GitHub
parent 445a3aa8fb
commit 6b076645db
14 changed files with 147 additions and 324 deletions

View File

@@ -159,13 +159,6 @@ internal partial class MapManager
/// <inheritdoc />
public event EventHandler<TileChangedEventArgs>? TileChanged;
/// <summary>
/// Should the OnTileChanged event be suppressed? This is useful for initially loading the map
/// so that you don't spam an event for each of the million station tiles.
/// </summary>
/// <inheritdoc />
public event EventHandler<GridChangedEventArgs>? GridChanged;
/// <inheritdoc />
public bool SuppressOnTileChanged { get; set; }
@@ -208,10 +201,4 @@ internal partial class MapManager
EntityManager.StartComponents(gridEnt);
return grid;
}
protected internal static void InvokeGridChanged(MapManager mapManager, MapGridComponent mapGrid, IReadOnlyCollection<(Vector2i position, Tile tile)> changedTiles)
{
mapManager.GridChanged?.Invoke(mapManager, new GridChangedEventArgs(mapGrid, changedTiles));
mapManager.EntityManager.EventBus.RaiseLocalEvent(mapGrid.GridEntityId, new GridModifiedEvent(mapGrid, changedTiles), true);
}
}