summaryrefslogtreecommitdiff
path: root/lib/mods/theme/scpt
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-08 18:06:02 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-08 18:19:36 +0200
commit00205df89e9c1bc2560d907c7fe6f9530a493d3b (patch)
tree5717c258a66d4f6120239210c57e385b2aef56a3 /lib/mods/theme/scpt
parent1a33c8c5f7eb8d36642c59c37284cc8f06c3e102 (diff)
Lua: Library quest: Move HOOK_STAIR code to C
Diffstat (limited to 'lib/mods/theme/scpt')
-rw-r--r--lib/mods/theme/scpt/library.lua25
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/mods/theme/scpt/library.lua b/lib/mods/theme/scpt/library.lua
index fca935fb..1f7e7d49 100644
--- a/lib/mods/theme/scpt/library.lua
+++ b/lib/mods/theme/scpt/library.lua
@@ -101,30 +101,7 @@ add_quest
return quest_library_gen_hook()
end,
[HOOK_STAIR] = function()
- local ret
-
- -- only ask this if player about to go up stairs of quest and hasn't won yet
- if (player.inside_quest ~= LIBRARY_QUEST) or (quest(LIBRARY_QUEST).status == QUEST_STATUS_COMPLETED) then
- return FALSE
- end
-
- if cave(player.py, player.px).feat ~= FEAT_LESS then return end
-
- -- flush all pending input
- flush()
-
- -- confirm
- ret = get_check("Really abandon the quest?")
-
- -- if yes, then
- if ret == TRUE then
- -- fail the quest
- quest(LIBRARY_QUEST).status = QUEST_STATUS_FAILED
- return FALSE
- else
- -- if no, they stay in the quest
- return TRUE
- end
+ return quest_library_stair_hook()
end,
[HOOK_MONSTER_DEATH] = function()
-- if they're in the quest and haven't won, continue