summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-06-08 18:39:56 +0200
committerBardur Arantsson <bardur@scientician.net>2012-06-08 18:39:56 +0200
commitc1e4d667aaa5b99f87a99dc32131b8e941cebd35 (patch)
tree9ac50b148092daecac200a751beaf23cd168f275
parent8a94b839d00267e7be1664f521de1c0033921b8c (diff)
Lua: Add new-style handling for HOOK_END_TURN
-rw-r--r--src/dungeon.c5
-rw-r--r--src/types.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/dungeon.c b/src/dungeon.c
index 840094c1..ff3cbdb9 100644
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -5321,6 +5321,11 @@ static void dungeon(void)
/* Process the appropriate hooks */
process_hooks(HOOK_END_TURN, "(d)", is_quest(dun_level));
+ {
+ hook_end_turn_in in = { is_quest(dun_level) };
+ process_hooks_new(HOOK_END_TURN, &in, NULL);
+ }
+
/* Make it pulsate and live !!!! */
if ((dungeon_flags1 & DF1_EVOLVE) && dun_level)
{
diff --git a/src/types.h b/src/types.h
index 3bbbb270..c9727518 100644
--- a/src/types.h
+++ b/src/types.h
@@ -2266,6 +2266,11 @@ struct hook_get_in {
int o_idx;
};
+typedef struct hook_end_turn_in hook_end_turn_in;
+struct hook_end_turn_in {
+ bool_ is_quest;
+};
+
/*
* Structure for the "quests"
*/