private void OnShutdown(EntityUid uid, VocalComponent component, ComponentShutdown args) { if (component.ScreamAction != null) { _actions.RemoveAction(uid, component.ScreamAction); } }
private void OnActionPerform(EntityUid uid, VocalComponent component, ScreamActionEvent args) { if (args.Handled) { return; } args.Handled = TryScream(uid, component); }
private void OnStartup(EntityUid uid, VocalComponent component, ComponentStartup args) { if (component.ScreamAction == null && _proto.TryIndex(component.ActionId, out InstantActionPrototype? act)) { component.ScreamAction = new(act); } if (component.ScreamAction != null) { _actions.AddAction(uid, component.ScreamAction, null); } }
private void OnShutdown(EntityUid uid, VocalComponent component, ComponentShutdown args) { _actions.RemoveAction(uid, component.Action); }
private void OnStartup(EntityUid uid, VocalComponent component, ComponentStartup args) { _actions.AddAction(uid, component.Action, null); }