перенос общих файлов из папки White в _White

This commit is contained in:
Remuchi
2024-01-28 18:37:24 +07:00
parent 1e4ad59270
commit 3a08b81d53
370 changed files with 805 additions and 812 deletions

View File

@@ -0,0 +1,20 @@
using Content.Shared.Item.ItemToggle.Components;
using Content.Shared.Wieldable.Components;
namespace Content.Shared._White.Wield;
public sealed class ToggleableWieldedSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ToggleableWieldedComponent, ItemToggleActivateAttemptEvent>(AttemptActivate);
}
private void AttemptActivate(Entity<ToggleableWieldedComponent> ent, ref ItemToggleActivateAttemptEvent args)
{
if (TryComp(ent, out WieldableComponent? wieldable) && !wieldable.Wielded)
args.Cancelled = true;
}
}