mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Add comp to loaded maps (#3994)
Easiest way to tell how MapLoader loaded a map (i.e. did it use the existing map or did it overwrite it).
This commit is contained in:
@@ -629,6 +629,7 @@ public sealed class MapLoaderSystem : EntitySystem
|
||||
}
|
||||
|
||||
_mapManager.SetMapEntity(data.TargetMap, rootNode);
|
||||
EnsureComp<LoadedMapComponent>(rootNode);
|
||||
}
|
||||
// Otherwise just ignore the map in the file.
|
||||
else
|
||||
@@ -665,6 +666,7 @@ public sealed class MapLoaderSystem : EntitySystem
|
||||
}
|
||||
|
||||
_mapManager.SetMapEntity(data.TargetMap, rootNode);
|
||||
EnsureComp<LoadedMapComponent>(rootNode);
|
||||
|
||||
// Nothing should have invalid uid except for the root node.
|
||||
}
|
||||
|
||||
12
Robust.Server/Maps/LoadedMapComponent.cs
Normal file
12
Robust.Server/Maps/LoadedMapComponent.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Robust.Server.Maps;
|
||||
|
||||
/// <summary>
|
||||
/// Added to Maps that were loaded by MapLoaderSystem. If not present then this map was created externally.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class LoadedMapComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user