Fix blank animqueues, and add facing=math.auto to animate

This commit is contained in:
2024-03-12 11:46:48 -04:00
parent 044bb89edf
commit 357e3766fb
9 changed files with 147 additions and 42 deletions

View File

@@ -572,21 +572,18 @@ eng::string LuaKeywordParser::final_check() {
if (not_table_) {
return "expected a keyword table";
}
if (lua_nkeys(L_, slot_) != int(parsed_.size())) {
lua_pushnil(L_);
while (lua_next(L_, slot_) != 0) {
lua_pop(L_, 1); // Don't need the value.
if (!lua_isstring(L_, -1)) {
return "keyword table contains non-string key";
}
const char *kw = lua_tostring(L_, -1);
if (parsed_.find(kw) == parsed_.end()) {
eng::ostringstream oss;
oss << "keyword " << kw << " not known";
return oss.str();
}
lua_pushnil(L_);
while (lua_next(L_, slot_) != 0) {
lua_pop(L_, 1); // Don't need the value.
if (!lua_isstring(L_, -1)) {
return "keyword table contains non-string key";
}
const char *kw = lua_tostring(L_, -1);
if (parsed_.find(kw) == parsed_.end()) {
eng::ostringstream oss;
oss << "keyword " << kw << " not known";
return oss.str();
}
assert(false && "should never get here in check_unparsed_keywords");
}
return "";
}