Even more engine changes
This commit is contained in:
@@ -75,7 +75,10 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
||||
var enumerator = AllEntityQuery<NetworkConfiguratorComponent>();
|
||||
while (enumerator.MoveNext(out var uid, out var conf))
|
||||
{
|
||||
if (CompOrNull<TransformComponent>(conf.ActiveDeviceList)?.MapUid != ev.Map)
|
||||
if (!TryComp(conf.ActiveDeviceList, out TransformComponent? listXform))
|
||||
continue;
|
||||
|
||||
if (!ev.MapIds.Contains(listXform.MapID))
|
||||
continue;
|
||||
|
||||
// The linked device list is (probably) being saved. Make sure that the configurator is also being saved
|
||||
@@ -83,9 +86,10 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
||||
// containing a set of all entities that are about to be saved, which would make checking this much easier.
|
||||
// This is a shitty bandaid, and will force close the UI during auto-saves.
|
||||
// TODO Map serialization refactor
|
||||
// I'm refactoring it now and I still dont know what to do
|
||||
|
||||
var xform = Transform(uid);
|
||||
if (xform.MapUid == ev.Map && IsSaveable(uid))
|
||||
if (ev.MapIds.Contains(xform.MapID) && IsSaveable(uid))
|
||||
continue;
|
||||
|
||||
_uiSystem.CloseUi(uid, NetworkConfiguratorUiKey.Configure);
|
||||
|
||||
Reference in New Issue
Block a user