Time to go, gumballs and nano potions (#113)

* set up "go to the time machine" button working

* warping to the past now sets PayZoneFlag and removes all active missions

* added gumballs functionality

* added nano potions functionality

* formatting fix
This commit is contained in:
kamilprzyb
2020-09-25 07:35:27 +02:00
committed by GitHub
parent e5a24bcb70
commit d4f1515f5d
10 changed files with 158 additions and 11 deletions

View File

@@ -6,6 +6,7 @@
#include "MissionManager.hpp"
#include "MobManager.hpp"
#include "ChunkManager.hpp"
#include "NanoManager.hpp"
#include "contrib/JSON.hpp"
@@ -152,6 +153,17 @@ void TableData::init() {
}
std::cout << "[INFO] Loaded " << ItemManager::CrocPotTable.size() << " croc pot value sets" << std::endl;
//load nano info
nlohmann::json nanoInfo = xdtData["m_pNanoTable"]["m_pNanoData"];
for (nlohmann::json::iterator _nano = nanoInfo.begin(); _nano != nanoInfo.end(); _nano++) {
auto nano = _nano.value();
NanoData nanoData;
nanoData.style = nano["m_iStyle"];
NanoManager::NanoTable[nano["m_iNanoNumber"]] = nanoData;
}
std::cout << "[INFO] Loaded " << NanoManager::NanoTable.size() << " nanos" << std::endl;
}
catch (const std::exception& err) {
std::cerr << "[WARN] Malformed xdt.json file! Reason:" << err.what() << std::endl;