summaryrefslogtreecommitdiff
path: root/lib/scpt
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-03-31 20:30:09 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-02 21:50:04 +0200
commite3ada797f1a576dce1f9289f76e35be98f1deeee (patch)
treef1f96b023a60445155de954b6bf50c744c18e80c /lib/scpt
parent39af619fc0ffd2804a009cd70cc7cfd7ad352ff4 (diff)
Refactor: Eliminate duplicate Lua code from print_{book,spell}
Diffstat (limited to 'lib/scpt')
-rw-r--r--lib/scpt/library.lua11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/scpt/library.lua b/lib/scpt/library.lua
index 99c2c0f4..9939b3eb 100644
--- a/lib/scpt/library.lua
+++ b/lib/scpt/library.lua
@@ -184,16 +184,7 @@ function library_quest.print_spell(color, y, spl)
local lvl, na = get_level_school(s, 50, -50)
local xx, sch_str
- xx = nil
- sch_str = ""
- for index, sch in __spell_school[s] do
- if xx then
- sch_str = sch_str.."/"..school(sch).name
- else
- xx = 1
- sch_str = sch_str..school(sch).name
- end
- end
+ sch_str = spell_school_name(s)
if s == spl then
if na then