Fix handheld instruments not working

This commit is contained in:
Vera Aguilera Puerto
2021-07-18 14:59:40 +02:00
parent 0a93e602ca
commit 8410fc239c
2 changed files with 7 additions and 1 deletions

View File

@@ -307,7 +307,9 @@ namespace Content.Server.Instruments
{
if (!user.TryGetComponent(out ActorComponent? actor)) return;
if (InstrumentPlayer != null || !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user)) return;
if ((!Handheld && InstrumentPlayer != null)
|| (Handheld && actor.PlayerSession != InstrumentPlayer)
|| !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user)) return;
InstrumentPlayer = actor.PlayerSession;
OpenUserInterface(InstrumentPlayer);

View File

@@ -0,0 +1,4 @@
author: Zumorica
changes:
- type: Fix # One of the following: Add, Remove, Tweak, Fix
message: Fixes handheld instruments not working.