summaryrefslogtreecommitdiffhomepage
path: root/DumpSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'DumpSource.cpp')
-rw-r--r--DumpSource.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/DumpSource.cpp b/DumpSource.cpp
index 9c913d0..56b3336 100644
--- a/DumpSource.cpp
+++ b/DumpSource.cpp
@@ -1,8 +1,9 @@
#include "DumpSource.h"
#include <cmath>
-#include <vector>
+#include <string>
#include <utility>
+#include <vector>
#include <nlohmann/json.hpp>
#include <raylib.h>
@@ -36,6 +37,11 @@ DumpSource::DumpSource(const char* filename) :
info["victim"]["position"]["y"].get<long double>(),
info["victim"]["position"]["z"].get<long double>(),
};
+ auto id = info["solar_system_id"].get<long int>();
+ auto location = dump["locations"][std::to_string(id)];
+ km.location.system = location["name"].get<std::string>().data();
+ km.location.constellation = location["constellation"].get<std::string>().data();
+ km.location.region = location["region"].get<std::string>().data();
auto& grid = find_grid_for(m_grids, km.original);
grid.killmails.push_back(std::move(km));
}