<commit_before>﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Yarn.Unity;

public class Dialogue : MonoBehaviour {
  public DialogueStorage storage;
  public DialogueUI ui;

  private Dictionary<string, BitmaskPuzzle> puzzles_;

  private void Awake() {
    puzzles_ = new Dictionary<string, BitmaskPuzzle>() {
      { "intro", BitmaskPuzzle.Get(BitmaskPuzzle.Difficulty.Easy, BitmaskOperation.shiftLeft) }
    };
  }
    
  [YarnCommand("enable")]
  public void Enable(string name) {
    storage.EnableOperation(name);
  }

  [YarnCommand("clearpuzzle")]
  public void ClearPuzzle() {
    ui.ClearPuzzle();
    storage.SetValue("$puzzle_target", Yarn.Value.NULL);
    storage.SetValue("$puzzle_active", Yarn.Value.NULL);
  }

  [YarnCommand("setpuzzle")]
  public void SetPuzzle(string key) {
    BitmaskPuzzle puzzle;
    if (!puzzles_.TryGetValue(key, out puzzle)) {
      Debug.LogErrorFormat("Could not find puzzle with key {0}", key);
      return;
    }
    storage.SetValue("$puzzle_target", GetPuzzleValue(puzzle.targetValue));
    storage.SetValue("$puzzle_active", GetPuzzleValue(puzzle.currentValue));
    ui.SetPuzzle(ref puzzle);
  }


    
  private string GetPuzzleValue(int value) {
    return value.ToString("X4");
  }
}<commit_msg>Remove whitespace<commit_after>﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Yarn.Unity;

public class Dialogue : MonoBehaviour {
  public DialogueStorage storage;
  public DialogueUI ui;

  private Dictionary<string, BitmaskPuzzle> puzzles_;

  private void Awake() {
    puzzles_ = new Dictionary<string, BitmaskPuzzle>() {
      { "intro", BitmaskPuzzle.Get(BitmaskPuzzle.Difficulty.Easy, BitmaskOperation.shiftLeft) }
    };
  }
    
  [YarnCommand("enable")]
  public void Enable(string name) {
    storage.EnableOperation(name);
  }

  [YarnCommand("clearpuzzle")]
  public void ClearPuzzle() {
    ui.ClearPuzzle();
    storage.SetValue("$puzzle_target", Yarn.Value.NULL);
    storage.SetValue("$puzzle_active", Yarn.Value.NULL);
  }

  [YarnCommand("setpuzzle")]
  public void SetPuzzle(string key) {
    BitmaskPuzzle puzzle;
    if (!puzzles_.TryGetValue(key, out puzzle)) {
      Debug.LogErrorFormat("Could not find puzzle with key {0}", key);
      return;
    }
    storage.SetValue("$puzzle_target", GetPuzzleValue(puzzle.targetValue));
    storage.SetValue("$puzzle_active", GetPuzzleValue(puzzle.currentValue));
    ui.SetPuzzle(ref puzzle);
  }
    
  private string GetPuzzleValue(int value) {
    return value.ToString("X4");
  }
}
{'fraction_non_alphanumeric': 0.12403100775193798, 'fraction_numerical': 0.0015503875968992248, 'mean_word_length': 4.354771784232365, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6406532', 'n_tokens_mistral': 879, 'n_tokens_neox': 819, 'n_words': 159}