{
base.Initialize();
- SubscribeLocalEvent<GridModifiedEvent>(OnGridChanged);
SubscribeLocalEvent<TileChangedEvent>(OnTileChanged);
SubscribeLocalEvent<SubFloorHideComponent, ComponentStartup>(OnSubFloorStarted);
SubscribeLocalEvent<SubFloorHideComponent, ComponentShutdown>(OnSubFloorTerminating);
UpdateTile(MapManager.GetGrid(args.NewTile.GridUid), args.NewTile.GridIndices);
}
- private void OnGridChanged(GridModifiedEvent args)
- {
- foreach (var modified in args.Modified)
- {
- UpdateTile(args.Grid, modified.position);
- }
- }
-
/// <summary>
/// Update whether a given entity is currently covered by a floor tile.
/// </summary>