Add whitelist to cryostorage (#30574)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Bed.Cryostorage;
|
||||
|
||||
/// <summary>
|
||||
/// Serves as a whitelist that allows an entity with this component to enter cryostorage.
|
||||
/// It will also require MindContainerComponent.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class CanEnterCryostorageComponent : Component { }
|
||||
@@ -89,7 +89,7 @@ public abstract class SharedCryostorageSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TryComp<MindContainerComponent>(args.EntityUid, out var mindContainer))
|
||||
if (!HasComp<CanEnterCryostorageComponent>(args.EntityUid) || !TryComp<MindContainerComponent>(args.EntityUid, out var mindContainer))
|
||||
{
|
||||
args.Cancel();
|
||||
return;
|
||||
|
||||
@@ -167,6 +167,7 @@
|
||||
- type: Dna
|
||||
- type: MindContainer
|
||||
showExamineInfo: true
|
||||
- type: CanEnterCryostorage
|
||||
- type: InteractionPopup
|
||||
successChance: 1
|
||||
interactSuccessString: hugging-success-generic
|
||||
|
||||
Reference in New Issue
Block a user