From 2e131bd3cbb2acb6ef52e7ad85f354ede543a392 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 20 Aug 2007 10:48:20 +0000 Subject: Defined two helper functions to abstract away money being available under inventory index 0. --- data/scripts/libtmw.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'data/scripts/libtmw.lua') diff --git a/data/scripts/libtmw.lua b/data/scripts/libtmw.lua index 158befe..5fc894e 100644 --- a/data/scripts/libtmw.lua +++ b/data/scripts/libtmw.lua @@ -160,3 +160,13 @@ function initialize() end init_fun = nil end + +-- Below are some convenience methods added to the engine API + +tmw.chr_money_change = function(ch, amount) + return tmw.chr_inv_change(ch, 0, amount) +end + +tmw.chr_money = function(ch) + return tmw.chr_inv_count(ch, 0) +end -- cgit