summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_you.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-29 22:27:51 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-29 22:27:51 +0100
commitecd341db79458137d3e97836d11830735c141623 (patch)
treec6473ea5460dd9b68c2652f54f001da19038b1c6 /crawl-ref/source/l_you.cc
parent49a6c400b1dd53744d817d698f9107b76c0110f5 (diff)
downloadcrawl-ref-ecd341db79458137d3e97836d11830735c141623.tar.gz
crawl-ref-ecd341db79458137d3e97836d11830735c141623.zip
Allow setting you.gold(x) in dlua.
Even if the game is not in wizmode, like vaults could want to.
Diffstat (limited to 'crawl-ref/source/l_you.cc')
-rw-r--r--crawl-ref/source/l_you.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/l_you.cc b/crawl-ref/source/l_you.cc
index 3a095cc052..bb2404a20b 100644
--- a/crawl-ref/source/l_you.cc
+++ b/crawl-ref/source/l_you.cc
@@ -313,7 +313,7 @@ static int l_you_abil_table(lua_State *ls)
static int you_gold(lua_State *ls)
{
- if (lua_gettop(ls) >= 1 && you.wizard)
+ if (lua_gettop(ls) >= 1 && !CLua::get_vm(ls).managed_vm)
{
const int new_gold = luaL_checkint(ls, 1);
const int old_gold = you.gold;