mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* MapInit v1, so people can criticize my code. * Map init v1. * Improve LocalPlayer to fix aghosting. * Fix map saving. * Map command improvements: Implement loadbp Made certain commands aware of uninitialized maps. * Adds IMapManager.GetAllGrids() * Add lsgrid and lsmap commands. * MetaData component serialization fixes. Serialize name and description default as null. Don't serialize prototype. * Explicit UID indices in map files. * Update map format doc again.
51 lines
1.3 KiB
C#
51 lines
1.3 KiB
C#
using JetBrains.Annotations;
|
|
using Robust.Server.GameObjects.Components.Markers;
|
|
using Robust.Shared.Interfaces.GameObjects;
|
|
using Robust.Shared.Interfaces.Map;
|
|
using Robust.Shared.Map;
|
|
|
|
namespace Robust.Server.Interfaces.Timing
|
|
{
|
|
public interface IPauseManager
|
|
{
|
|
void SetMapPaused(IMap map, bool paused);
|
|
void SetMapPaused(MapId mapId, bool paused);
|
|
|
|
void DoMapInitialize(MapId mapId);
|
|
void DoMapInitialize(IMap map);
|
|
|
|
void DoGridMapInitialize(GridId gridId);
|
|
void DoGridMapInitialize(IMapGrid grid);
|
|
|
|
void AddUninitializedMap(MapId mapId);
|
|
void AddUninitializedMap(IMap map);
|
|
|
|
[Pure]
|
|
bool IsMapPaused(IMap map);
|
|
|
|
[Pure]
|
|
bool IsMapPaused(MapId mapId);
|
|
|
|
[Pure]
|
|
bool IsGridPaused(IMapGrid grid);
|
|
|
|
[Pure]
|
|
bool IsGridPaused(GridId gridId);
|
|
|
|
[Pure]
|
|
bool IsMapInitialized(MapId mapId);
|
|
|
|
[Pure]
|
|
bool IsMapInitialized(IMap map);
|
|
}
|
|
|
|
public static class PauseManagerExt
|
|
{
|
|
[Pure]
|
|
public static bool IsEntityPaused(this IPauseManager manager, IEntity entity)
|
|
{
|
|
return !entity.HasComponent<IgnorePauseComponent>() && manager.IsGridPaused(entity.Transform.GridID);
|
|
}
|
|
}
|
|
}
|