Make item slot containers nullable (#6198)
This commit is contained in:
@@ -43,7 +43,7 @@ namespace Content.Server.Cabinet
|
||||
private void OnComponentStartup(EntityUid uid, ItemCabinetComponent cabinet, ComponentStartup args)
|
||||
{
|
||||
UpdateAppearance(uid, cabinet);
|
||||
_itemSlotsSystem.SetLock(uid, cabinet.CabinetSlot.ID, !cabinet.Opened);
|
||||
_itemSlotsSystem.SetLock(uid, cabinet.CabinetSlot, !cabinet.Opened);
|
||||
}
|
||||
|
||||
private void UpdateAppearance(EntityUid uid,
|
||||
@@ -105,7 +105,7 @@ namespace Content.Server.Cabinet
|
||||
|
||||
cabinet.Opened = !cabinet.Opened;
|
||||
SoundSystem.Play(Filter.Pvs(uid), cabinet.DoorSound.GetSound(), uid, AudioHelpers.WithVariation(0.15f));
|
||||
_itemSlotsSystem.SetLock(uid, cabinet.CabinetSlot.ID, !cabinet.Opened);
|
||||
_itemSlotsSystem.SetLock(uid, cabinet.CabinetSlot, !cabinet.Opened);
|
||||
|
||||
UpdateAppearance(uid, cabinet);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user