private void OnSpikingFail(EntityUid uid, KitchenSpikeComponent component, SpikingFailEvent args) { component.InUse = false; if (EntityManager.TryGetComponent <SharedButcherableComponent>(args.VictimUid, out var butcherable)) { butcherable.BeingButchered = false; } }
private void OnInteractUsing(EntityUid uid, KitchenSpikeComponent component, InteractUsingEvent args) { if (args.Handled) { return; } if (TryGetPiece(uid, args.User, args.Used)) { args.Handled = true; } }
private void OnInteractHand(EntityUid uid, KitchenSpikeComponent component, InteractHandEvent args) { if (args.Handled) { return; } if (component.MeatParts > 0) { _popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-knife-needed"), uid, Filter.Entities(args.User)); args.Handled = true; } }
private void OnSpikingFinished(EntityUid uid, KitchenSpikeComponent component, SpikingFinishedEvent args) { component.InUse = false; if (EntityManager.TryGetComponent <SharedButcherableComponent>(args.VictimUid, out var butcherable)) { butcherable.BeingButchered = false; } if (Spikeable(uid, args.UserUid, args.VictimUid, component, butcherable)) { Spike(uid, args.UserUid, args.VictimUid, component); } }
private void OnDragDrop(EntityUid uid, KitchenSpikeComponent component, DragDropEvent args) { if (args.Handled) { return; } args.Handled = true; if (Spikeable(uid, args.User, args.Dragged, component)) { TrySpike(uid, args.User, args.Dragged, component); } }
private void OnSuicide(EntityUid uid, KitchenSpikeComponent component, SuicideEvent args) { if (args.Handled) { return; } args.SetHandled(SuicideKind.Piercing); var victim = args.Victim; var othersMessage = Loc.GetString("comp-kitchen-spike-suicide-other", ("victim", victim)); victim.PopupMessageOtherClients(othersMessage); var selfMessage = Loc.GetString("comp-kitchen-spike-suicide-self"); victim.PopupMessage(selfMessage); }