summaryrefslogtreecommitdiff
path: root/lib/mods/theme
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-08 18:19:19 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-08 18:19:36 +0200
commit2c0ec2974884386d9b332c6004758e64ab8ce709 (patch)
treedf6865f3367344f6b6fa321c4b5cbe170dee5cc6 /lib/mods/theme
parent00205df89e9c1bc2560d907c7fe6f9530a493d3b (diff)
Lua: Library quest: Move HOOK_MONSTER_DEATH code to C
Diffstat (limited to 'lib/mods/theme')
-rw-r--r--lib/mods/theme/scpt/library.lua20
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/mods/theme/scpt/library.lua b/lib/mods/theme/scpt/library.lua
index 1f7e7d49..5ba5ed4c 100644
--- a/lib/mods/theme/scpt/library.lua
+++ b/lib/mods/theme/scpt/library.lua
@@ -104,25 +104,7 @@ add_quest
return quest_library_stair_hook()
end,
[HOOK_MONSTER_DEATH] = function()
- -- if they're in the quest and haven't won, continue
- if (player.inside_quest ~= LIBRARY_QUEST) or (quest(LIBRARY_QUEST).status == QUEST_STATUS_COMPLETED) then
- return FALSE
- end
-
- i = 1
- count = -1
- while i <= m_max do
- local monster = m_list[i]
- if (monster.r_idx > 0) and (monster.status <= MSTATUS_ENEMY) then
- count = count + 1
- end
- i = i + 1
- end
-
- if count == 0 then
- quest(LIBRARY_QUEST).status = QUEST_STATUS_COMPLETED
- msg_print(TERM_YELLOW, "The library is safe now.")
- end
+ return quest_library_monster_death_hook()
end,
},
}