fix microwave construction (#30232)

* fix microwave construction

* retry
This commit is contained in:
slarticodefast
2024-07-21 18:20:09 +02:00
committed by GitHub
parent 3e3cfdb948
commit d5bdada430
2 changed files with 7 additions and 1 deletions

View File

@@ -252,7 +252,7 @@ namespace Content.Server.Kitchen.EntitySystems
private void OnInit(Entity<MicrowaveComponent> ent, ref ComponentInit args)
{
// this really does have to be in ComponentInit
ent.Comp.Storage = _container.EnsureContainer<Container>(ent, "microwave_entity_container");
ent.Comp.Storage = _container.EnsureContainer<Container>(ent, ent.Comp.ContainerId);
}
private void OnMapInit(Entity<MicrowaveComponent> ent, ref MapInitEvent args)
@@ -312,6 +312,9 @@ namespace Content.Server.Kitchen.EntitySystems
private void OnInsertAttempt(Entity<MicrowaveComponent> ent, ref ContainerIsInsertingAttemptEvent args)
{
if (args.Container.ID != ent.Comp.ContainerId)
return;
if (ent.Comp.Broken)
{
args.Cancel();