<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine.SceneManagement;

namespace Booma.Proxy
{
	[SceneTypeCreate(GameSceneType.PreShipSelectionScene)]
	public sealed class CharacterSelectionResultEventListenerInitializable : IGameInitializable
	{
		private IOnCharacterSelectionAcknowledgementEventSubscribable CharacterAckSubscriptionService { get; }

		/// <inheritdoc />
		public CharacterSelectionResultEventListenerInitializable([NotNull] IOnCharacterSelectionAcknowledgementEventSubscribable characterAckSubscriptionService)
		{
			CharacterAckSubscriptionService = characterAckSubscriptionService ?? throw new ArgumentNullException(nameof(characterAckSubscriptionService));
		}

		/// <inheritdoc />
		public Task OnGameInitialized()
		{
			CharacterAckSubscriptionService.OnCharacterSelectionAcknowledgementRecieved += OnCharacterSelectionAckRecieved;
			return Task.CompletedTask;
		}

		private void OnCharacterSelectionAckRecieved(object sender, [NotNull] CharacterSelectionAckEventArgs e)
		{
			if(e == null) throw new ArgumentNullException(nameof(e));

			switch(e.AckType)
			{
				case CharacterSelectionAckType.BB_CHAR_ACK_UPDATE:
					break;
				case CharacterSelectionAckType.BB_CHAR_ACK_SELECT:
					OnSelectionSuccessful();
					break;
				case CharacterSelectionAckType.BB_CHAR_ACK_NONEXISTANT:
					break;<commit_msg>Made CharacterSelectionResultEventListener to use BaseSingleEventListenerInitializable<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine.SceneManagement;

namespace Booma.Proxy
{
	[SceneTypeCreate(GameSceneType.PreShipSelectionScene)]
	public sealed class CharacterSelectionResultEventListenerInitializable : BaseSingleEventListenerInitializable<IOnCharacterSelectionAcknowledgementEventSubscribable, CharacterSelectionAckEventArgs>
	{
		/// <inheritdoc />
		public CharacterSelectionResultEventListenerInitializable([NotNull] IOnCharacterSelectionAcknowledgementEventSubscribable characterAckSubscriptionService)
			: base(characterAckSubscriptionService)
		{
		}

		/// <inheritdoc />
		protected override void OnEventFired(object source, CharacterSelectionAckEventArgs args)
		{
			if(args == null) throw new ArgumentNullException(nameof(args));

			switch(args.AckType)
			{
				case CharacterSelectionAckType.BB_CHAR_ACK_UPDATE:
					break;
				case CharacterSelectionAckType.BB_CHAR_ACK_SELECT:
					OnSelectionSuccessful();
					break;
				case CharacterSelectionAckType.BB_CHAR_ACK_NONEXISTANT:
					break;
{'fraction_non_alphanumeric': 0.0660626651566629, 'fraction_numerical': 0.0, 'mean_word_length': 6.817109144542773, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2684882', 'n_tokens_mistral': 791, 'n_tokens_neox': 696, 'n_words': 119}