12struct glz::meta<
VoltMod::GameDataRecord::Location>
15 static constexpr auto value = glz::object(
"module", &T::Module,
"rva", &T::Rva);
19struct glz::meta<
VoltMod::GameDataRecord::Slot>
22 static constexpr auto value =
23 glz::object(
"module", &T::Module,
"table", &T::Table,
"index", &T::Index,
"code", &T::Code);
30 static constexpr auto value = glz::object(
"build", &T::Build,
"functions", &T::Functions,
"globals", &T::Globals,
31 "vtables", &T::VTables,
"offsets", &T::Offsets);
39 constexpr std::string_view path =
"addons/voltmod/gamedata/dumps/resolved.json";
50 Log::Warn(
"GameData: no record written to {}: {}", path,
written.error().Detail);
54 Log::Info(
"GameData: recorded what resolved on server {} in {}.", build, path);
static std::string WritePretty(const T &value)
Serialize value as prettified JSON.
static Result< T > ReadFile(std::string_view path)
Parse path (resolved via ResolvePath) into T.
void Info(std::format_string< Args... > fmt, Args &&... args)
void Warn(std::format_string< Args... > fmt, Args &&... args)
void WriteGameDataRecord(const GameDataRecord &resolved)
static std::string ReadFile(const std::filesystem::path &path)
std::string_view GameBuild()
std::expected< void, Error > Status
Status WriteAllText(std::string_view path, std::string_view text)
Write text to path (resolved via ResolvePath), creating its directory.