mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-03 01:27:26 +00:00
fix: respect AllowedSlots for gogo hat (#39189)
This commit is contained in:
committed by
BarryNorfolk
parent
ebefff61a2
commit
0ae4843e03
@@ -30,10 +30,9 @@ public sealed class StorageVoiceControlSystem : EntitySystem
|
||||
|
||||
private void VoiceTriggered(Entity<StorageVoiceControlComponent> ent, ref VoiceTriggeredEvent args)
|
||||
{
|
||||
// Check if the component has any slot restrictions via AllowedSlots
|
||||
// If it has slot restrictions, check if the item is in a slot that is allowed
|
||||
if (ent.Comp.AllowedSlots != null && _inventory.TryGetContainingSlot(ent.Owner, out var itemSlot) &&
|
||||
(itemSlot.SlotFlags & ent.Comp.AllowedSlots) == 0)
|
||||
if (ent.Comp.AllowedSlots is { } allowedSlots
|
||||
&& !_inventory.InSlotWithAnyFlags(ent.Owner, allowedSlots))
|
||||
return;
|
||||
|
||||
// Get the storage component
|
||||
|
||||
Reference in New Issue
Block a user