diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-08 19:01:19 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-08 19:01:19 +0200 |
commit | e88d49b8c45f429589018b84b219b80caa66d44b (patch) | |
tree | 81015fecd3e4be62a0cbaa868ace763344d74d3b | |
parent | 5867e77c9fd84033ec54c565e0d0759860c2a2c1 (diff) |
Lua: Move "game start" help to C
-rw-r--r-- | lib/mods/theme/scpt/help.lua | 22 | ||||
-rw-r--r-- | lib/scpt/help.lua | 22 | ||||
-rw-r--r-- | src/help.c | 52 |
3 files changed, 50 insertions, 46 deletions
diff --git a/lib/mods/theme/scpt/help.lua b/lib/mods/theme/scpt/help.lua index ffe7bc06..0773e879 100644 --- a/lib/mods/theme/scpt/help.lua +++ b/lib/mods/theme/scpt/help.lua @@ -30,28 +30,6 @@ ingame_help ingame_help { - ["hook"] = HOOK_END_TURN, - ["event"] = function(y, x) return TRUE end, - ["desc"] = - { - "Welcome to Theme! I am the spirit of knowledge and my task is to help you", - "to get used to how to play. I have prepared a #vparchment#y for you to #vread#y.", - "Press r, then space then select it. You can also check the documentation", - "by pressing ? at (nearly) any time.", - "The first place you can explore is Barrow-downs. Go to the west of town", - "and you should see a #v>#y there.", - "If you miss any of this you can press ctrl+p to see your message log.", - "Now I must reveal your task here. You are on a quest to investigate", - "the dreadful tower of Dol Guldur in the Mirkwood forest to see what evil", - "lurks there, but beware, you are not yet ready.", - "If you do not want me to bother you any more with tips, press = then go", - "into the ToME options and deactivate the ingame_help option.", - "You can see your quest log by pressing ctrl+q. Now go to your destiny!", - } -} - -ingame_help -{ ["no_test"] = TRUE, ["callback"] = "select_context", ["fct"] = function(typ, name) diff --git a/lib/scpt/help.lua b/lib/scpt/help.lua index 87121baf..e6bb6a34 100644 --- a/lib/scpt/help.lua +++ b/lib/scpt/help.lua @@ -30,28 +30,6 @@ ingame_help ingame_help { - ["hook"] = HOOK_END_TURN, - ["event"] = function(y, x) return TRUE end, - ["desc"] = - { - "Welcome to ToME! I am the spirit of knowledge and my task is to help you", - "to get used to how to play. I have prepared a #vparchment#y for you to #vread#y.", - "Press r, then space then select it. You can also check the documentation", - "by pressing ? at (nearly) any time.", - "The first place you can explore is Barrow-downs. Go to the west of town", - "and you should see a #v>#y there.", - "If you miss any of this you can press ctrl+p to see your message log.", - "Now I must reveal your task here. You are on a quest to investigate", - "the dreadful tower of Dol Guldur in the Mirkwood forest to see what evil", - "lurks there, but beware, you are not yet ready.", - "If you do not want me to bother you any more with tips, press = then go", - "into the ToME options and deactivate the ingame_help option.", - "You can see your quest log by pressing ctrl+q. Now go to your destiny!", - } -} - -ingame_help -{ ["no_test"] = TRUE, ["callback"] = "select_context", ["fct"] = function(typ, name) @@ -13,8 +13,8 @@ #include "angband.h" -#define DESC_MAX 10 -#define TRIGGERED_HELP_MAX 12 +#define DESC_MAX 14 +#define TRIGGERED_HELP_MAX 14 #define HELP_VOID_JUMPGATE 0 #define HELP_FOUNTAIN 1 @@ -28,6 +28,8 @@ #define HELP_GET_TRAP_KIT 9 #define HELP_GET_DEVICE 10 #define HELP_WILDERNESS 11 +#define HELP_GAME_TOME 12 +#define HELP_GAME_THEME 13 /** * Struct for help triggered by a boolean condition @@ -112,6 +114,14 @@ static bool_ trigger_end_turn_wilderness(void *in, void *out) { (!p_ptr->astral)); } +static bool_ trigger_game_theme(void *in, void *out) { + return (game_module_idx == MODULE_THEME); +} + +static bool_ trigger_game_tome(void *in, void *out) { + return (game_module_idx == MODULE_TOME); +} + /** * Trigger-based help items */ @@ -220,6 +230,44 @@ static triggered_help_type triggered_help[TRIGGERED_HELP_MAX] = "To enter the overview mode, press < while in the wilderness.", NULL } + }, + { HELP_GAME_TOME, + HOOK_END_TURN, + trigger_game_tome, + { "Welcome to ToME! I am the spirit of knowledge and my task is to help you", + "to get used to how to play. I have prepared a #vparchment#y for you to #vread#y.", + "Press r, then space then select it. You can also check the documentation", + "by pressing ? at (nearly) any time.", + "The first place you can explore is Barrow-downs. Go to the west of town", + "and you should see a #v>#y there.", + "If you miss any of this you can press ctrl+p to see your message log.", + "Now I must reveal your task here. You are on a quest to investigate", + "the dreadful tower of Dol Guldur in the Mirkwood forest to see what evil", + "lurks there, but beware, you are not yet ready.", + "If you do not want me to bother you any more with tips, press = then go", + "into the ToME options and deactivate the ingame_help option.", + "You can see your quest log by pressing ctrl+q. Now go to your destiny!", + NULL + } + }, + { HELP_GAME_THEME, + HOOK_END_TURN, + trigger_game_theme, + { "Welcome to Theme! I am the spirit of knowledge and my task is to help you", + "to get used to how to play. I have prepared a #vparchment#y for you to #vread#y.", + "Press r, then space then select it. You can also check the documentation", + "by pressing ? at (nearly) any time.", + "The first place you can explore is Barrow-downs. Go to the west of town", + "and you should see a #v>#y there.", + "If you miss any of this you can press ctrl+p to see your message log.", + "Now I must reveal your task here. You are on a quest to investigate", + "the dreadful tower of Dol Guldur in the Mirkwood forest to see what evil", + "lurks there, but beware, you are not yet ready.", + "If you do not want me to bother you any more with tips, press = then go", + "into the ToME options and deactivate the ingame_help option.", + "You can see your quest log by pressing ctrl+q. Now go to your destiny!", + NULL + } } }; |