Can now pass tokens as values in animation steps

This commit is contained in:
2025-02-05 15:45:48 -05:00
parent 22644c64fa
commit 07dbec4bef
8 changed files with 111 additions and 103 deletions

View File

@@ -275,7 +275,7 @@ static std::vector<std::string> parse_control_lst(std::string_view ctrl) {
static std::string read_file(const std::filesystem::path &fn, std::string &err) {
std::ifstream t(fn);
if (t.fail()) {
err = std::string("Could not open ") + fn.u8string();
err = std::string("Could not open ") + fn.string();
return "";
}
t.seekg(0, std::ios::end);
@@ -284,7 +284,7 @@ static std::string read_file(const std::filesystem::path &fn, std::string &err)
t.seekg(0);
t.read(&result[0], size);
if ((t.fail()) || (size_t(t.tellg()) != size)) {
err = std::string("Could not read ") + fn.u8string();
err = std::string("Could not read ") + fn.string();
return "";
}
err = "";
@@ -347,7 +347,7 @@ std::string package_lua_source(const std::filesystem::path &base, std::ostream *
sbwrite_string(s, names[i]);
std::filesystem::path lfn = base / "lua" / names[i];
if (!sbwrite_file(s, lfn)) {
return std::string("Cannot read source file: ") + lfn.u8string();
return std::string("Cannot read source file: ") + lfn.string();
}
}
return "";