Remove last component.Name calls (#13593)

This commit is contained in:
metalgearsloth
2023-01-19 13:57:18 +11:00
committed by GitHub
parent c6d3e4f3bd
commit 1b0e50ae19
11 changed files with 19 additions and 14 deletions

View File

@@ -12,6 +12,7 @@ namespace Content.Server.Cabinet
{
public sealed class ItemCabinetSystem : EntitySystem
{
[Dependency] private readonly IComponentFactory _factory = default!;
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
public override void Initialize()
@@ -33,7 +34,7 @@ namespace Content.Server.Cabinet
private void OnComponentInit(EntityUid uid, ItemCabinetComponent cabinet, ComponentInit args)
{
_itemSlotsSystem.AddItemSlot(uid, cabinet.Name, cabinet.CabinetSlot);
_itemSlotsSystem.AddItemSlot(uid, _factory.GetComponentName(cabinet.GetType()), cabinet.CabinetSlot);
}
private void OnComponentRemove(EntityUid uid, ItemCabinetComponent cabinet, ComponentRemove args)
{