fix tape stuck (#527)

This commit is contained in:
ThereDrD0
2024-08-01 07:08:29 +03:00
committed by GitHub
parent c3d2129ffd
commit 80c353066e

View File

@@ -158,6 +158,21 @@ public sealed class TapeCreatorSystem : EntitySystem
DirtyEntity(GetEntity(ev.TapeCreatorUid));
Dirty(insertedTape, tapeComponent);
_popup.PopupEntity("Запись мозговой активности завершена", tapeCreator);
Record(tapeCreator, tapeCreatorComponent, _popup, _container);
}
private void Record(
EntityUid uid,
TapeCreatorComponent component,
SharedPopupSystem popupSystem,
SharedContainerSystem containerSystem)
{
containerSystem.EmptyContainer(component.TapeContainer, force: true);
component.Recording = false;
component.InsertedTape = null;
popupSystem.PopupEntity("Запись мозговой активности завершена", uid);
Dirty(uid, component);
}
}