Skip to content

Commit

Permalink
Fix: Holosigns can be stored again (space-wizards#25249)
Browse files Browse the repository at this point in the history
* Holosigns can be stored again

* TryComp to HasComp

---------

Co-authored-by: Plykiya <plykiya@protonmail.com>
  • Loading branch information
2 people authored and joshepvodka committed Feb 18, 2024
1 parent 6132c1b commit a3fd914
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Content.Server/Holosign/HolosignSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Content.Server.Power.Components;
using Content.Server.PowerCell;
using Content.Shared.Interaction;
using Content.Shared.Storage;

namespace Content.Server.Holosign;

Expand Down Expand Up @@ -43,6 +44,7 @@ private void OnBeforeInteract(EntityUid uid, HolosignProjectorComponent componen

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;
Expand Down

0 comments on commit a3fd914

Please sign in to comment.