/// </summary>
private void EnsureTabletopMap()
{
- if (TabletopMap != MapId.Nullspace && _mapManager.MapExists(TabletopMap))
+ if (TabletopMap != MapId.Nullspace && _map.MapExists(TabletopMap))
return;
- TabletopMap = _mapManager.CreateMap();
+ var mapUid = _map.CreateMap(out var mapId);
+ TabletopMap = mapId;
_tabletops = 0;
- var mapUid = _mapManager.GetMapEntityId(TabletopMap);
var mapComp = EntityManager.GetComponent<MapComponent>(mapUid);
private void OnRoundRestart(RoundRestartCleanupEvent _)
{
- if (TabletopMap == MapId.Nullspace || !_mapManager.MapExists(TabletopMap))
+ if (TabletopMap == MapId.Nullspace || !_map.MapExists(TabletopMap))
return;
// This will usually *not* be the case, but better make sure.
- _mapManager.DeleteMap(TabletopMap);
+ _map.DeleteMap(TabletopMap);
// Reset tabletop count.
_tabletops = 0;
using Robust.Server.GameObjects;
using Robust.Shared.Configuration;
using Robust.Shared.Enums;
-using Robust.Shared.Map;
using Robust.Shared.Player;
using Robust.Shared.Utility;
[UsedImplicitly]
public sealed partial class TabletopSystem : SharedTabletopSystem
{
- [Dependency] private readonly IMapManager _mapManager = default!;
+ [Dependency] private readonly SharedMapSystem _map = default!;
[Dependency] private readonly EyeSystem _eye = default!;
[Dependency] private readonly ViewSubscriberSystem _viewSubscriberSystem = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;