summaryrefslogtreecommitdiff
path: root/lib/core
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-06-02 21:46:20 +0200
committerBardur Arantsson <bardur@scientician.net>2012-06-02 22:19:03 +0200
commit3756182bf99335d02f7872c105b5ae5f9b5c4e57 (patch)
treeeb96de37a1c0994406ef2e50f8d44fe17ee817fb /lib/core
parent53bf1478ad25f03d6df584371b0653f83ead1b6d (diff)
Lua: Move store handling to C
Diffstat (limited to 'lib/core')
-rw-r--r--lib/core/init.lua3
-rw-r--r--lib/core/stores.lua32
2 files changed, 0 insertions, 35 deletions
diff --git a/lib/core/init.lua b/lib/core/init.lua
index 23c76461..c87f9a20 100644
--- a/lib/core/init.lua
+++ b/lib/core/init.lua
@@ -20,9 +20,6 @@ tome_dofile_anywhere(ANGBAND_DIR_CORE, "dungeon.lua")
-- Load the ingame contextual help
tome_dofile_anywhere(ANGBAND_DIR_CORE, "help.lua")
--- let the store specific stuff happen!
-tome_dofile_anywhere(ANGBAND_DIR_CORE, "stores.lua")
-
--------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
diff --git a/lib/core/stores.lua b/lib/core/stores.lua
deleted file mode 100644
index d4a63168..00000000
--- a/lib/core/stores.lua
+++ /dev/null
@@ -1,32 +0,0 @@
--- Take care of all concerning stores
-function store_buy_list(t)
- assert(type(t) == "table", "store_buy_list got no table")
- add_hooks
- {
- [HOOK_STORE_BUY] = function (index, name, obj)
- local tbl = %t
- local elt = tbl[index]
- if not elt then
- elt = tbl[name]
- end
- if elt then
- if elt then
- if type(elt) == "function" then
- return TRUE, elt(obj)
- elseif type(elt) == "table" then
- local k, e
- for k, e in elt do
- if type(e) == "number" then
- if obj.tval == e then return TRUE, TRUE end
- else
- if (obj.tval == e[1]) and (obj.sval >= e[2]) and (obj.sval <= e[3]) then return TRUE, TRUE end
- end
- end
- elseif elt == -1 then
- return TRUE, FALSE
- end
- end
- end
- end,
- }
-end