Теперь предметы можно передавать из рук в руки (#462)

* add: Теперь предеты можно передовать из рук в руки

* Кудато не туда уехало
This commit is contained in:
Spatison
2024-07-18 01:33:28 +03:00
committed by GitHub
parent 8cfb81bbac
commit d32eb158d4
27 changed files with 579 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
using Content.Server._White.OfferItem;
using Content.Shared._White.OfferItem;
using Content.Shared.Alert;
using JetBrains.Annotations;
namespace Content.Server._White.Alert.Click;
/// <summary>
/// Accepting the offer and receive item
/// </summary>
[UsedImplicitly]
[DataDefinition]
public sealed partial class AcceptOffer : IAlertClick
{
public void AlertClicked(EntityUid player)
{
var entManager = IoCManager.Resolve<IEntityManager>();
if (entManager.TryGetComponent(player, out OfferItemComponent? offerItem))
{
entManager.System<OfferItemSystem>().Receive(player, offerItem);
}
}
}