summaryrefslogtreecommitdiffstats
path: root/data/scripts/libtmw.lua
diff options
context:
space:
mode:
Diffstat (limited to 'data/scripts/libtmw.lua')
-rw-r--r--data/scripts/libtmw.lua10
1 files changed, 10 insertions, 0 deletions
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