mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* Item offering port (#96) * Offer item system port * More fixes * Make the formatting a bit more readable * Add a missing keybind * Add missing alert click handler and make some of the code more readable * Duplicate offer-item-system.ftl Signed-off-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> * Namespace fix and prediction fixes * Port various carrying and pseudo-item fixes from floofstation * Refactor the offer system to hopefully bring more clarity * Final fixes * Final final final fixes maybe * Sike, just do it the proper way --------- Signed-off-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> * fixes * empty commit (weird test fail?) * Moved some stuff to shared. Reorganized a bit. I could be here all day... --------- Signed-off-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> Co-authored-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> Co-authored-by: Vanessa <vanessalouwagie@gmail.com>
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using Content.Shared._Floof.OfferItem;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Client.Input;
|
|
using Robust.Client.Player;
|
|
|
|
namespace Content.Client._Floof.OfferItem;
|
|
|
|
public sealed class OfferItemSystem : SharedOfferItemSystem
|
|
{
|
|
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
|
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
|
[Dependency] private readonly IInputManager _inputManager = default!;
|
|
[Dependency] private readonly IEyeManager _eye = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
_overlayManager.AddOverlay(new OfferItemIndicatorsOverlay(
|
|
_inputManager,
|
|
EntityManager,
|
|
_eye,
|
|
this));
|
|
}
|
|
public override void Shutdown()
|
|
{
|
|
_overlayManager.RemoveOverlay<OfferItemIndicatorsOverlay>();
|
|
base.Shutdown();
|
|
}
|
|
|
|
public bool IsInOfferMode()
|
|
{
|
|
var entity = _playerManager.LocalEntity;
|
|
|
|
if (entity == null)
|
|
return false;
|
|
|
|
return IsInOfferMode(entity.Value);
|
|
}
|
|
}
|