From 45613a54e4476edaca3cca5b29976b0935b2c0fa Mon Sep 17 00:00:00 2001 From: Nathaniel Moschkin Date: Thu, 25 Jan 2024 20:36:47 -0500 Subject: [PATCH] Icon file. --- src/beholdhelper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/beholdhelper.cpp b/src/beholdhelper.cpp index 866ccf4..34d683a 100644 --- a/src/beholdhelper.cpp +++ b/src/beholdhelper.cpp @@ -310,8 +310,9 @@ bool BeholdHelper::ReInitialize(bool forceReTraining, const std::string &jsonpat for (auto &element : j2) { std::string symbol = element.at("ship")["model"].get(); - std::string image = symbol; - image = "schematics_" + image.substr(6); + std::string image = element.at("icon")["file"].get(); + int x = ((std::string)"/schematics/").length; + image = "schematics_" + image.substr(x); std::string url = asseturl + image + ".png"; std::cout << "Reading " << symbol << "..." << std::endl;