Fix and improve bluespace lockers (#13139)
* add invulnerable plastitanium wall prototype * fix command ClearBluespaceLockerLinks.cs * fix and improve BluespaceLockerSystem.cs * fix normal plastitanium wall suffix * fix capitalization * fix capability to create one way lockers
This commit is contained in:
@@ -27,7 +27,7 @@ public sealed class ClearBluespaceLockerLinks : IConsoleCommand
|
||||
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
if (entityManager.TryGetComponent<EntityStorageComponent>(entityUid, out var originComponent))
|
||||
if (entityManager.TryGetComponent<BluespaceLockerComponent>(entityUid, out var originComponent))
|
||||
entityManager.RemoveComponent(entityUid, originComponent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,10 +53,16 @@ public sealed class LinkBluespaceLocker : IConsoleCommand
|
||||
|
||||
entityManager.EnsureComponent<BluespaceLockerComponent>(originUid, out var originBluespaceComponent);
|
||||
originBluespaceComponent.BluespaceLinks.Add(targetComponent);
|
||||
entityManager.EnsureComponent<BluespaceLockerComponent>(targetUid, out var targetBluespaceComponent);
|
||||
if (bidirectional)
|
||||
{
|
||||
entityManager.EnsureComponent<BluespaceLockerComponent>(targetUid, out var targetBluespaceComponent);
|
||||
targetBluespaceComponent.BluespaceLinks.Add(originComponent);
|
||||
}
|
||||
else if (targetBluespaceComponent.BluespaceLinks.Count == 0)
|
||||
{
|
||||
targetBluespaceComponent.AllowSentient = false;
|
||||
targetBluespaceComponent.TransportEntities = false;
|
||||
targetBluespaceComponent.TransportGas = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user