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:
@@ -3,6 +3,7 @@ using Content.Shared.Coordinates.Helpers;
|
|||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
using Content.Server.PowerCell;
|
using Content.Server.PowerCell;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
|
using Content.Shared.Storage;
|
||||||
|
|
||||||
namespace Content.Server.Holosign;
|
namespace Content.Server.Holosign;
|
||||||
|
|
||||||
@@ -43,6 +44,7 @@ public sealed class HolosignSystem : EntitySystem
|
|||||||
|
|
||||||
if (args.Handled
|
if (args.Handled
|
||||||
|| !args.CanReach // prevent placing out of range
|
|| !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
|
|| !_powerCell.TryUseCharge(uid, component.ChargeUse) // if no battery or no charge, doesn't work
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user