From 04a37fe8ae205afcdfbf83c0452324d4c9362bf3 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 8 May 2022 23:25:52 +0200 Subject: Dump source now loads location information --- DumpSource.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -#include +#include #include +#include #include #include @@ -36,6 +37,11 @@ DumpSource::DumpSource(const char* filename) : info["victim"]["position"]["y"].get(), info["victim"]["position"]["z"].get(), }; + auto id = info["solar_system_id"].get(); + auto location = dump["locations"][std::to_string(id)]; + km.location.system = location["name"].get().data(); + km.location.constellation = location["constellation"].get().data(); + km.location.region = location["region"].get().data(); auto& grid = find_grid_for(m_grids, km.original); grid.killmails.push_back(std::move(km)); } -- cgit v1.1