private void OnInteractUsing(EntityUid uid, MicrowaveComponent component, InteractUsingEvent args) { if (args.Handled) { return; } if (!component.Powered) { _popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-no-power"), uid, Filter.Entities(args.User)); return; } if (component.Broken) { _popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-broken"), uid, Filter.Entities(args.User)); return; } if (!HasComp <SharedItemComponent>(args.Used)) { _popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-transfer-fail"), uid, Filter.Entities(args.User)); return; } args.Handled = true; component.Storage.Insert(args.Used); component.DirtyUi(); }
private void OnSolutionChange(EntityUid uid, MicrowaveComponent component, SolutionChangedEvent args) { component.DirtyUi(); }