Moved all JSON files into a dedicated data directory.

This commit is contained in:
dongresource 2020-08-28 18:31:53 +02:00
parent 4df812f996
commit 3b35e0017a
6 changed files with 5 additions and 5 deletions

View File

@ -23,9 +23,9 @@ npcdistance=16000
# little message players see when they enter the game # little message players see when they enter the game
motd=Welcome to OpenFusion! motd=Welcome to OpenFusion!
# NPC json data # NPC json data
npcdata=NPCs.json npcdata=data/NPCs.json
# warp target json data # warp target json data
warpdata=warps.json warpdata=data/warps.json
# is everyone a GM? # is everyone a GM?
gm=true gm=true

View File

@ -37,7 +37,7 @@ void NPCManager::init() {
// load temporary mob dump // load temporary mob dump
try { try {
std::ifstream inFile("mobs.json"); // not in settings, since it's temp std::ifstream inFile("data/mobs.json"); // not in settings, since it's temp
nlohmann::json npcData; nlohmann::json npcData;
// read file into json // read file into json

View File

@ -18,8 +18,8 @@ int settings::SPAWN_X = 179213;
int settings::SPAWN_Y = 268451; int settings::SPAWN_Y = 268451;
int settings::SPAWN_Z = -4210; int settings::SPAWN_Z = -4210;
std::string settings::GMPASS = "pass"; std::string settings::GMPASS = "pass";
std::string settings::NPCJSON = "NPCs.json"; std::string settings::NPCJSON = "data/NPCs.json";
std::string settings::WARPJSON = "warps.json"; std::string settings::WARPJSON = "data/warps.json";
std::string settings::MOTDSTRING = "Welcome to OpenFusion!"; std::string settings::MOTDSTRING = "Welcome to OpenFusion!";
bool settings::GM = false; bool settings::GM = false;