move lockcomponent to shared (#13722)
* move lockcomponent to shared * ajcm review
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Server.Buckle.Systems;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Shared.Buckle.Components;
|
||||
using Content.Shared.Foldable;
|
||||
using Content.Shared.Storage.Components;
|
||||
using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -12,8 +13,8 @@ namespace Content.Server.Foldable
|
||||
[UsedImplicitly]
|
||||
public sealed class FoldableSystem : SharedFoldableSystem
|
||||
{
|
||||
[Dependency] private BuckleSystem _buckle = default!;
|
||||
[Dependency] private SharedContainerSystem _container = default!;
|
||||
[Dependency] private readonly BuckleSystem _buckle = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _container = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -25,10 +26,10 @@ namespace Content.Server.Foldable
|
||||
|
||||
}
|
||||
|
||||
private void OnFoldableOpenAttempt(EntityUid uid, FoldableComponent component, StorageOpenAttemptEvent args)
|
||||
private void OnFoldableOpenAttempt(EntityUid uid, FoldableComponent component, ref StorageOpenAttemptEvent args)
|
||||
{
|
||||
if (component.IsFolded)
|
||||
args.Cancel();
|
||||
args.Cancelled = true;
|
||||
}
|
||||
|
||||
public bool TryToggleFold(FoldableComponent comp)
|
||||
@@ -89,12 +90,12 @@ namespace Content.Server.Foldable
|
||||
_buckle.StrapSetEnabled(component.Owner, !component.IsFolded);
|
||||
}
|
||||
|
||||
public void OnStoreThisAttempt(EntityUid uid, FoldableComponent comp, StoreMobInItemContainerAttemptEvent args)
|
||||
public void OnStoreThisAttempt(EntityUid uid, FoldableComponent comp, ref StoreMobInItemContainerAttemptEvent args)
|
||||
{
|
||||
args.Handled = true;
|
||||
|
||||
if (comp.IsFolded)
|
||||
args.Cancel();
|
||||
args.Cancelled = true;
|
||||
}
|
||||
|
||||
#region Verb
|
||||
|
||||
Reference in New Issue
Block a user