Rollerbed / foldable strap fixes. (#16106)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Shared.Buckle;
|
||||
using Content.Shared.Storage.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -10,6 +11,7 @@ namespace Content.Shared.Foldable;
|
||||
public abstract class SharedFoldableSystem : EntitySystem
|
||||
{
|
||||
[Dependency] protected readonly SharedAppearanceSystem Appearance = default!;
|
||||
[Dependency] private readonly SharedBuckleSystem _buckle = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -65,6 +67,7 @@ public abstract class SharedFoldableSystem : EntitySystem
|
||||
component.IsFolded = folded;
|
||||
Dirty(component);
|
||||
Appearance.SetData(uid, FoldedVisuals.State, folded);
|
||||
_buckle.StrapSetEnabled(uid, !component.IsFolded);
|
||||
}
|
||||
|
||||
private void OnInsertEvent(EntityUid uid, FoldableComponent component, ContainerGettingInsertedAttemptEvent args)
|
||||
|
||||
Reference in New Issue
Block a user