diff --git a/Content.IntegrationTests/Tests/Access/AccessReaderTest.cs b/Content.IntegrationTests/Tests/Access/AccessReaderTest.cs
index 4ca960c7dd..deb4528983 100644
--- a/Content.IntegrationTests/Tests/Access/AccessReaderTest.cs
+++ b/Content.IntegrationTests/Tests/Access/AccessReaderTest.cs
@@ -5,7 +5,6 @@ using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
-using Serilog;
namespace Content.IntegrationTests.Tests.Access
{
diff --git a/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs b/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs
index dafb33fce1..319bf5cd53 100644
--- a/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs
+++ b/Content.Shared/Containers/ItemSlot/ItemSlotsComponent.cs
@@ -77,13 +77,6 @@ namespace Content.Shared.Containers.ItemSlots
[DataField("ejectSound")]
public SoundSpecifier EjectSound = new SoundPathSpecifier("/Audio/Weapons/Guns/MagOut/revolver_magout.ogg");
- ///
- /// Options used for playing the insert/eject sounds.
- ///
- [DataField("soundOptions")]
- [Obsolete("Use the sound specifer parameters instead")]
- public AudioParams SoundOptions = AudioParams.Default;
-
///
/// The name of this item slot. This will be shown to the user in the verb menu.
///
@@ -228,7 +221,6 @@ namespace Content.Shared.Containers.ItemSlots
InsertSound = other.InsertSound;
EjectSound = other.EjectSound;
- SoundOptions = other.SoundOptions;
Name = other.Name;
Locked = other.Locked;
InsertOnInteract = other.InsertOnInteract;
diff --git a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
index 48c5e9c331..42df026159 100644
--- a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
+++ b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
@@ -65,7 +65,7 @@ namespace Content.Shared.Containers.ItemSlots
if (slot.HasItem || string.IsNullOrEmpty(slot.StartingItem))
continue;
- var item = EntityManager.SpawnEntity(slot.StartingItem, EntityManager.GetComponent(itemSlots.Owner).Coordinates);
+ var item = EntityManager.SpawnEntity(slot.StartingItem, EntityManager.GetComponent(uid).Coordinates);
slot.ContainerSlot?.Insert(item);
}
}
@@ -77,7 +77,7 @@ namespace Content.Shared.Containers.ItemSlots
{
foreach (var (id, slot) in itemSlots.Slots)
{
- slot.ContainerSlot = _containers.EnsureContainer(itemSlots.Owner, id);
+ slot.ContainerSlot = _containers.EnsureContainer(uid, id);
}
}
@@ -93,13 +93,13 @@ namespace Content.Shared.Containers.ItemSlots
if (itemSlots.Slots.TryGetValue(id, out var existing))
{
if (existing.Local)
- Logger.Error($"Duplicate item slot key. Entity: {EntityManager.GetComponent(itemSlots.Owner).EntityName} ({uid}), key: {id}");
+ Log.Error($"Duplicate item slot key. Entity: {EntityManager.GetComponent(uid).EntityName} ({uid}), key: {id}");
else
// server state takes priority
slot.CopyFrom(existing);
}
- slot.ContainerSlot = _containers.EnsureContainer(itemSlots.Owner, id);
+ slot.ContainerSlot = _containers.EnsureContainer(uid, id);
itemSlots.Slots[id] = slot;
Dirty(itemSlots);
}
@@ -340,7 +340,7 @@ namespace Content.Shared.Containers.ItemSlots
if (ejected != null && ejected.Value && user != null)
_adminLogger.Add(LogType.Action, LogImpact.Low, $"{ToPrettyString(user.Value)} ejected {ToPrettyString(item)} from {slot.ContainerSlot?.ID + " slot of "}{ToPrettyString(uid)}");
- _audioSystem.PlayPredicted(slot.EjectSound, uid, excludeUserAudio ? user : null, slot.SoundOptions);
+ _audioSystem.PlayPredicted(slot.EjectSound, uid, excludeUserAudio ? user : null);
}
///
@@ -477,9 +477,11 @@ namespace Content.Shared.Containers.ItemSlots
? Loc.GetString(slot.Name)
: EntityManager.GetComponent(slot.Item.Value).EntityName ?? string.Empty;
- AlternativeVerb verb = new();
- verb.IconEntity = slot.Item;
- verb.Act = () => TryEjectToHands(uid, slot, args.User, excludeUserAudio: true);
+ AlternativeVerb verb = new()
+ {
+ IconEntity = slot.Item,
+ Act = () => TryEjectToHands(uid, slot, args.User, excludeUserAudio: true)
+ };
if (slot.EjectVerbText == null)
{
@@ -538,18 +540,20 @@ namespace Content.Shared.Containers.ItemSlots
var verbSubject = slot.Name != string.Empty
? Loc.GetString(slot.Name)
- : Name(args.Using.Value) ?? string.Empty;
+ : Name(args.Using.Value);
- InteractionVerb insertVerb = new();
- insertVerb.IconEntity = args.Using;
- insertVerb.Act = () => Insert(uid, slot, args.Using.Value, args.User, excludeUserAudio: true);
+ InteractionVerb insertVerb = new()
+ {
+ IconEntity = args.Using,
+ Act = () => Insert(uid, slot, args.Using.Value, args.User, excludeUserAudio: true)
+ };
if (slot.InsertVerbText != null)
{
insertVerb.Text = Loc.GetString(slot.InsertVerbText);
insertVerb.Icon =
new SpriteSpecifier.Texture(
- new("/Textures/Interface/VerbIcons/insert.svg.192dpi.png"));
+ new ResPath("/Textures/Interface/VerbIcons/insert.svg.192dpi.png"));
}
else if(slot.EjectOnInteract)
{
@@ -558,7 +562,7 @@ namespace Content.Shared.Containers.ItemSlots
insertVerb.Text = Loc.GetString("place-item-verb-text", ("subject", verbSubject));
insertVerb.Icon =
new SpriteSpecifier.Texture(
- new("/Textures/Interface/VerbIcons/drop.svg.192dpi.png"));
+ new ResPath("/Textures/Interface/VerbIcons/drop.svg.192dpi.png"));
}
else
{
@@ -635,7 +639,7 @@ namespace Content.Shared.Containers.ItemSlots
return;
slot.Locked = locked;
- itemSlots.Dirty();
+ Dirty(uid, itemSlots);
}
///