Add bluespace lockers (#12954)

* add bluespace lockers

* add command linkbluespacelocker

* add command clearbluespacelockerlinks

* fix unwelding method

* move bluespace locker functionality to own component

* add options to disable transporting certain things

* remove unused imports

* unlock target lockers when opening + minor optimization to unwelding
This commit is contained in:
Chief-Engineer
2022-12-19 21:47:37 -06:00
committed by GitHub
parent 9a7654791a
commit 067932712a
7 changed files with 247 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
namespace Content.Server.Storage.Components;
[RegisterComponent]
public sealed class BluespaceLockerComponent : Component
{
/// <summary>
/// Determines if gas will be transported.
/// </summary>
[DataField("transportGas"), ViewVariables(VVAccess.ReadWrite)]
public bool TransportGas = true;
/// <summary>
/// Determines if entities will be transported.
/// </summary>
[DataField("transportEntities"), ViewVariables(VVAccess.ReadWrite)]
public bool TransportEntities = true;
/// <summary>
/// Determines if entities with a Mind component will be transported.
/// </summary>
[DataField("allowSentient"), ViewVariables(VVAccess.ReadWrite)]
public bool AllowSentient = true;
/// <summary>
/// If length > 0, when something is added to the storage, it will instead be teleported to a random storage
/// from the list and the other storage will be opened.
/// </summary>
[DataField("bluespaceLinks"), ViewVariables(VVAccess.ReadOnly)]
public HashSet<EntityStorageComponent> BluespaceLinks = new();
}