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:
metalgearsloth
2023-05-02 09:32:23 +10:00
committed by GitHub
parent 1ce5be2774
commit b24e6d0673
2 changed files with 14 additions and 0 deletions

View File

@@ -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.
}

View 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
{
}