summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-26 18:34:19 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-26 18:34:19 +0000
commit21cfdbc39885c510cf562bbd86f5f29cf8e38b3d (patch)
treeb91489672cc2bb9b425425f53f07d498d07cd2e5 /crawl-ref/source/tags.cc
parent851436e3e120efac69cb0cdb443a4cc3f30976d4 (diff)
downloadcrawl-ref-21cfdbc39885c510cf562bbd86f5f29cf8e38b3d.tar.gz
crawl-ref-21cfdbc39885c510cf562bbd86f5f29cf8e38b3d.zip
Attempt to place ziggurat loot vault inside the ziggurat. If the vault doesn't fit, we fall back to generating the loot in the open.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7639 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r--crawl-ref/source/tags.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 2ac7e883f3..8c8af99ade 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1039,7 +1039,8 @@ static void tag_construct_you(writer &th)
// minorVersion 7 starts here
marshallByte(th, you.friendly_pickup);
- dlua.callfn("dgn_save_data", "u", &th);
+ if (!dlua.callfn("dgn_save_data", "u", &th))
+ mprf(MSGCH_ERROR, "Failed to save Lua data: %s", dlua.error.c_str());
}
static void tag_construct_you_items(writer &th)
@@ -1445,7 +1446,11 @@ static void tag_read_you(reader &th, char minorVersion)
you.friendly_pickup = unmarshallByte(th);
if (minorVersion >= TAG_MINOR_LUADGN)
- dlua.callfn("dgn_load_data", "u", &th);
+ {
+ if (!dlua.callfn("dgn_load_data", "u", &th))
+ mprf(MSGCH_ERROR, "Failed to load Lua persist table: %s",
+ dlua.error.c_str());
+ }
}
static void tag_read_you_items(reader &th, char minorVersion)