Fix: Holosigns can be stored again (#25249)

* Holosigns can be stored again

* TryComp to HasComp

---------

Co-authored-by: Plykiya <plykiya@protonmail.com>
This commit is contained in:
Plykiya
2024-02-14 17:06:11 -08:00
committed by GitHub
parent ce4bd8568c
commit d6139429ad

View File

@@ -3,6 +3,7 @@ using Content.Shared.Coordinates.Helpers;
using Content.Server.Power.Components;
using Content.Server.PowerCell;
using Content.Shared.Interaction;
using Content.Shared.Storage;
namespace Content.Server.Holosign;
@@ -43,6 +44,7 @@ public sealed class HolosignSystem : EntitySystem
if (args.Handled
|| !args.CanReach // prevent placing out of range
|| HasComp<StorageComponent>(args.Target) // if it's a storage component like a bag, we ignore usage so it can be stored
|| !_powerCell.TryUseCharge(uid, component.ChargeUse) // if no battery or no charge, doesn't work
)
return;