mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-16 19:20:05 +00:00
215da0130d
Was getting frustrated by the inconsistency in our include statements, which were causing me problems. As a result, I went through and manually re-organized every include statement in non-core files. I'm just gonna copy my rant from Discord: FOR HEADER FILES (.hpp): - everything you use IN THE HEADER must be EXPLICITLY INCLUDED with the exception of things that fall under Core.hpp - you may NOT include ANYTHING ELSE FOR SOURCE FILES (.cpp): - you can #include whatever you want as long as the partner header is included first - anything that gets included by another include is fair game - redundant includes are ok because they'll be harmless AS LONG AS our header files stay lean. the point of this is NOT to optimize the number of includes used all around or make things more efficient necessarily. it's to improve readability & coherence and make it easier to avoid cyclical issues
33 lines
1017 B
C++
33 lines
1017 B
C++
#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
|
|
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;
|
|
extern std::map<int32_t, int> RunningNPCRotations;
|
|
extern std::map<int32_t, int> RunningNPCMapNumbers;
|
|
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;
|
|
extern std::map<int32_t, BaseNPC*> RunningEggs;
|
|
|
|
void init();
|
|
void flush();
|
|
}
|