Rollerbed / foldable strap fixes. (#16106)

This commit is contained in:
Leon Friedrich
2023-05-05 19:27:15 +12:00
committed by GitHub
parent 1a4f522267
commit cc4edb9f87
8 changed files with 19 additions and 24 deletions

View File

@@ -13,7 +13,6 @@ namespace Content.Server.Foldable
[UsedImplicitly]
public sealed class FoldableSystem : SharedFoldableSystem
{
[Dependency] private readonly SharedBuckleSystem _buckle = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
public override void Initialize()
@@ -65,20 +64,6 @@ namespace Content.Server.Foldable
return true;
}
/// <summary>
/// Set the folded state of the given <see cref="FoldableComponent"/>
/// </summary>
/// <param name="uid"></param>
/// <param name="component"></param>
/// <param name="folded">If true, the component will become folded, else unfolded</param>
public override void SetFolded(EntityUid uid, FoldableComponent component, bool folded)
{
base.SetFolded(uid, component, folded);
// You can't buckle an entity to a folded object
_buckle.StrapSetEnabled(uid, !component.IsFolded);
}
#region Verb
private void AddFoldVerb(EntityUid uid, FoldableComponent component, GetVerbsEvent<AlternativeVerb> args)