OpenFusion/src/TableData.hpp

33 lines
1017 B
C++
Raw Normal View History

#pragma once
#include "JSON.hpp"
#include "Entities.hpp"
#include "Transport.hpp"
#include <map>
#include <unordered_map>
#include <vector>
// these are added to the NPC's static key to avoid collisions
2021-05-02 00:42:34 +00:00
const int NPC_ID_OFFSET = 1;
const int MOB_ID_OFFSET = 10000;
const int MOB_GROUP_ID_OFFSET = 20000;
// typedef for JSON object because I don't want to type nlohmann::json every time
typedef nlohmann::json json;
namespace TableData {
extern std::map<int32_t, std::vector<Vec3>> RunningSkywayRoutes;
2020-10-06 21:59:12 +00:00
extern std::map<int32_t, int> RunningNPCRotations;
extern std::map<int32_t, int> RunningNPCMapNumbers;
2021-05-04 23:57:06 +00:00
extern std::unordered_map<int32_t, std::pair<BaseNPC*, std::vector<BaseNPC*>>> RunningNPCPaths; // player ID -> following NPC
extern std::vector<NPCPath> FinishedNPCPaths; // NPC ID -> path
extern std::map<int32_t, BaseNPC*> RunningMobs;
extern std::map<int32_t, BaseNPC*> RunningGroups;
2020-11-08 08:42:49 +00:00
extern std::map<int32_t, BaseNPC*> RunningEggs;
2020-10-03 02:05:20 +00:00
void init();
void flush();
}