<commit_before>#include <kotaka/paths.h>
#include <game/paths.h>

inherit LIB_BIN;

void main(string args)
{
	query_ustate()->push_state(clone_object("~/obj/ustate/help"));
}<commit_msg>Add help command and make it work at a low level by default until the proper searching cna be provided<commit_after>#include <kotaka/paths.h>
#include <game/paths.h>

inherit LIB_BIN;

void main(string args)
{
	string topic;
	object pager;
	mixed *info;

	if (args == "") {
		switch(query_user()->query_class()) {
		case 3:
			topic = "admin/index";
			break;
		case 2:
			topic = "wizard/index";
			break;
		case 1:
			topic = "player/index";
			break;
		case 0:
			topic = "guest/index";
			break;
		}
	} else {
		topic = args;
	}

	info = file_info("~Game/data/help/" + topic + ".hlp");

	if (!info) {
		send_out(topic + ": No such help topic.\n");
		return;
	}

	if (info[0] < 0) {
		send_out(topic + ": Is a category.\n");
		return;
	}

	pager = clone_object("~Kotaka/obj/ustate/page");
	pager->set_text(read_file("~Game/data/help/" + topic + ".hlp"));
	query_ustate()->push_state(pager);
}
{'fraction_non_alphanumeric': 0.17298797409805736, 'fraction_numerical': 0.005550416281221091, 'mean_word_length': 3.683982683982684, 'pattern_counts': {'":': 2, '<': 8, '<?xml version=': 0, '>': 11, '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': '2348348', 'n_tokens_mistral': 458, 'n_tokens_neox': 413, 'n_words': 96}