mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
add QueueDeleteMap to SharedMapSystem (#6116)
This commit is contained in:
@@ -39,7 +39,7 @@ END TEMPLATE-->
|
||||
|
||||
### New features
|
||||
|
||||
*None yet*
|
||||
* Added `SharedMapSystem.QueueDeleteMap`, which deletes a map with the specified MapId in the next tick.
|
||||
|
||||
### Bugfixes
|
||||
|
||||
|
||||
@@ -262,12 +262,24 @@ public abstract partial class SharedMapSystem
|
||||
return (uid, AddComp<MapComponent>(uid), meta);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a map with the specified map id.
|
||||
/// </summary>
|
||||
public void DeleteMap(MapId mapId)
|
||||
{
|
||||
if (TryGetMap(mapId, out var uid))
|
||||
Del(uid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a map with the specified map id in the next tick.
|
||||
/// </summary>
|
||||
public void QueueDeleteMap(MapId mapId)
|
||||
{
|
||||
if (TryGetMap(mapId, out var uid))
|
||||
QueueDel(uid);
|
||||
}
|
||||
|
||||
public IEnumerable<MapId> GetAllMapIds()
|
||||
{
|
||||
return Maps.Keys;
|
||||
|
||||
Reference in New Issue
Block a user