<commit_before>var Ghouls = Ghouls || {
    pageGhouls: [],
    ghoulChatter: ["*garbled sounds*", "*unintelligible grunting*", "Nrraaagghh! I smell Elf flesh!", "*hissing*"],
    chatterInterval: {},
    ToggleChatter: function (mode, interval) {
      if(mode == "on") {
        Ghouls.chatterInterval = setInterval(function () {
          var slot = Math.floor(Math.random() * 4);
          var text = Ghouls.ghoulChatter[slot];
          sendChat("Ghoul", text);
        }, interval);
      }
      else if(mode == "off") {
        if (Ghouls.chatterInterval != undefined && Ghouls.chatterInterval != null) {
          clearInterval(Ghouls.chatterInterval);
        }
      }
    },
    LoadPageGhouls: function() {
      // Decided to do this at start-up so I have a list of ghouls on a page
      // Should consider writing to state?
        var ghouls = filterObjs(function(obj) {
            return (obj.get("_pageid") == Campaign().get("playerpageid") &&
            obj.get("_type") == "graphic" &&
            obj.get("name").toLowerCase().indexOf("ghoul") > -1);
        });
        _.each(ghouls, function(ghoul) {
          ghoul.hideMe = function() {
            this.set("layer", "gmlayer");
            this.set("status_ninja-mask");
          };
          ghoul.showMe = function() {
            this.set("layer", "objects");
            this.set("status_ninja-mask", false);
          }
        });
        Ghouls.pageGhouls = ghouls;
        debugLog("pageGhouls", Ghouls.pageGhouls);
    },
    ToggleVisibleForSelected: function(state, selected) {
      var hasSelected = (selected != undefined && selected != null && selected != "");
      if(!hasSelected) {
        return;<commit_msg>added subtype to ghoul load<commit_after>var Ghouls = Ghouls || {
    pageGhouls: [],
    ghoulChatter: ["*garbled sounds*", "*unintelligible grunting*", "Nrraaagghh! I smell Elf flesh!", "*hissing*"],
    chatterInterval: {},
    ToggleChatter: function (mode, interval) {
      if(mode == "on") {
        Ghouls.chatterInterval = setInterval(function () {
          var slot = Math.floor(Math.random() * 4);
          var text = Ghouls.ghoulChatter[slot];
          sendChat("Ghoul", text);
        }, interval);
      }
      else if(mode == "off") {
        if (Ghouls.chatterInterval != undefined && Ghouls.chatterInterval != null) {
          clearInterval(Ghouls.chatterInterval);
        }
      }
    },
    LoadPageGhouls: function() {
      // Decided to do this at start-up so I have a list of ghouls on a page
      // Should consider writing to state?
      // Also, filter already goes over the entire list one time
      // Is there a single property we can set on tokens to mark them with a tag?
      var ghouls = filterObjs(function(obj) {
            return (obj.get("_pageid") == Campaign().get("playerpageid") &&
            obj.get("_type") == "graphic" &&
            obj.get("_subtype") == "token" &&
            obj.get("name").toLowerCase().indexOf("ghoul") > -1);
        });
        _.each(ghouls, function(ghoul) {
          ghoul.hideMe = function() {
            this.set("layer", "gmlayer");
            this.set("status_ninja-mask");
          };
          ghoul.showMe = function() {
            this.set("layer", "objects");
            this.set("status_ninja-mask", false);
          }
        });
        Ghouls.pageGhouls = ghouls;
        debugLog("pageGhouls", Ghouls.pageGhouls);
    },
    ToggleVisibleForSelected: function(state, selected) {
      var hasSelected = (selected != undefined && selected != null && selected != "");
      if(!hasSelected) {
        return;
{'fraction_non_alphanumeric': 0.14987579354126415, 'fraction_numerical': 0.0011040574109853713, 'mean_word_length': 2.2766726943942133, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4453789', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1103, 'n_words': 241}