<commit_before>'use strict';
const l10nFile  = __dirname + '/../l10n/commands/help.yml';
const l10n      = require('../src/l10n')(l10nFile);
const util      = require('util');
const HelpFiles = require('../src/help_files').HelpFiles;
const wrap      = require('wrap-ansi');
const _         = require('../src/helpers');

/*
  NEW: {
    title: 'Welcome to Ranvier',
    body: 'Important topics include:',
    related: 'levels','attributes','mutants','mental','physical','energy','combat','social',
  },
*/

exports.command = (rooms, items, players, npcs, Commands) => {
  return (args, player) => {
    const print = txt => player.say(wrap(txt, 80));

    if (!args) {
      displayHelpFile('HELP');
      return displayHelpFile('NEW');
    }

    args = args.toUpperCase().trim();
    const errMsg = "" + player.getName() +
                   " attempted to get a helpfile for "
                   + args + ".";<commit_msg>Make 'help topics' show a list of all topics.<commit_after>'use strict';
const l10nFile  = __dirname + '/../l10n/commands/help.yml';
const l10n      = require('../src/l10n')(l10nFile);
const util      = require('util');
const HelpFiles = require('../src/help_files').HelpFiles;
const wrap      = require('wrap-ansi');
const _         = require('../src/helpers');

/*
  NEW: {
    title: 'Welcome to Ranvier',
    body: 'Important topics include:',
    related: 'levels','attributes','mutants','mental','physical','energy','combat','social',
  },
*/

exports.command = (rooms, items, players, npcs, Commands) => {
  return (args, player) => {
    const print = txt => player.say(wrap(txt, 80));

    if (!args) {
      displayHelpFile('HELP');
      return displayHelpFile('NEW');
    }

    args = args.toUpperCase().trim();
    const errMsg = "" + player.getName() +
                   " attempted to get a helpfile for "
                   + args + ".";

    if (args === 'TOPICS') {
      for (topic in HelpFiles) {
        if (topic === 'NOT_FOUND' || topic === 'NO_HELP_FILE') { continue; }
        player.say(topic.toLowerCase());
      }
      return;
    }
{'fraction_non_alphanumeric': 0.18447532343076187, 'fraction_numerical': 0.011499760421657882, 'mean_word_length': 2.7689530685920576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6670338', 'n_tokens_mistral': 676, 'n_tokens_neox': 647, 'n_words': 147}