summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/mods/theme/scpt/help.lua12
-rw-r--r--lib/scpt/help.lua8
-rw-r--r--src/birth.c5
-rw-r--r--src/externs.h1
-rw-r--r--src/help.c31
5 files changed, 36 insertions, 21 deletions
diff --git a/lib/mods/theme/scpt/help.lua b/lib/mods/theme/scpt/help.lua
index 7046e846..189cd687 100644
--- a/lib/mods/theme/scpt/help.lua
+++ b/lib/mods/theme/scpt/help.lua
@@ -24,18 +24,6 @@ ingame_help
-- list of files for classes, { filename, anchor }
local t =
{
- ["god"] =
- {
- ["Aule the Smith"] = { "g_aule.txt", 0 },
- ["Eru Iluvatar"] = { "g_eru.txt", 0 },
- ["Mandos"] = { "g_mandos.txt", 0 },
- ["Manwe Sulimo"] = { "g_manwe.txt", 0 },
- ["Melkor Bauglir"] = { "g_melkor.txt", 0 },
- ["Tulkas"] = { "g_tulkas.txt", 0 },
- ["Ulmo"] = { "g_ulmo.txt", 0 },
- ["Varda Elentari"] = { "g_varda.txt", 0 },
- ["Yavanna Kementari"] = { "g_yavann.txt", 0 },
- },
["skill"] =
{
["Air"] = { "skills.txt", 27 },
diff --git a/lib/scpt/help.lua b/lib/scpt/help.lua
index 9e94606f..189cd687 100644
--- a/lib/scpt/help.lua
+++ b/lib/scpt/help.lua
@@ -24,14 +24,6 @@ ingame_help
-- list of files for classes, { filename, anchor }
local t =
{
- ["god"] =
- {
- ["Eru Iluvatar"] = { "g_eru.txt", 0 },
- ["Manwe Sulimo"] = { "g_manwe.txt", 0 },
- ["Tulkas"] = { "g_tulkas.txt", 0 },
- ["Melkor Bauglir"] = { "g_melkor.txt", 0 },
- ["Yavanna Kementari"] = { "g_yavann.txt", 0 },
- },
["skill"] =
{
["Air"] = { "skills.txt", 27 },
diff --git a/src/birth.c b/src/birth.c
index 58debca0..14c0b44f 100644
--- a/src/birth.c
+++ b/src/birth.c
@@ -2398,7 +2398,10 @@ static bool_ player_birth_aux_ask()
k = choice[k];
break;
}
- if (c == '?') exec_lua(format("ingame_help('select_context', 'god', '%s')", deity_info[choice[sel]].name));
+ if (c == '?')
+ {
+ help_god(deity_info[choice[sel]].name);
+ }
else if (c == '=')
{
screen_save();
diff --git a/src/externs.h b/src/externs.h
index 3ea6d2d6..d2ff11c2 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -621,6 +621,7 @@ extern void init_hooks_help();
extern void help_race(cptr race);
extern void help_subrace(cptr subrace);
extern void help_class(cptr klass);
+extern void help_god(cptr god);
/* birth.c */
extern void print_desc_aux(cptr txt, int y, int x);
diff --git a/src/help.c b/src/help.c
index 4d894044..874f0f45 100644
--- a/src/help.c
+++ b/src/help.c
@@ -199,6 +199,26 @@ context_help_type class_table[] =
};
/**
+ * God help files
+ */
+context_help_type god_table[] =
+{
+ /* ToME */
+ { "Eru Iluvatar", "g_eru.txt", 0 },
+ { "Manwe Sulimo", "g_manwe.txt", 0 },
+ { "Tulkas", "g_tulkas.txt", 0 },
+ { "Melkor Bauglir", "g_melkor.txt", 0 },
+ { "Yavanna Kementari", "g_yavann.txt", 0 },
+ /* Theme */
+ { "Aule the Smith", "g_aule.txt", 0 },
+ { "Mandos", "g_mandos.txt", 0 },
+ { "Ulmo", "g_ulmo.txt", 0 },
+ { "Varda Elentari", "g_varda.txt", 0 },
+ /* End of list */
+ { NULL, NULL, 0 },
+};
+
+/**
* Trigger functions
*/
static bool_ trigger_void_jumpgate(void *in, void *out) {
@@ -608,3 +628,14 @@ void help_class(cptr klass)
{
show_context_help(find_context_help(class_table, klass));
}
+
+void help_god(cptr god)
+{
+ context_help_type *context_help =
+ find_context_help(god_table, god);
+
+ if (context_help != NULL)
+ {
+ show_context_help(context_help);
+ }
+}