From 3b35e0017a86ff51ac235ff2b9c76c4ab5cdc8b3 Mon Sep 17 00:00:00 2001 From: dongresource Date: Fri, 28 Aug 2020 18:31:53 +0200 Subject: [PATCH] Moved all JSON files into a dedicated data directory. --- config.ini | 4 ++-- NPCs.json => data/NPCs.json | 0 mobs.json => data/mobs.json | 0 warps.json => data/warps.json | 0 src/NPCManager.cpp | 2 +- src/settings.cpp | 4 ++-- 6 files changed, 5 insertions(+), 5 deletions(-) rename NPCs.json => data/NPCs.json (100%) rename mobs.json => data/mobs.json (100%) rename warps.json => data/warps.json (100%) diff --git a/config.ini b/config.ini index cdb6bcf..56e7550 100644 --- a/config.ini +++ b/config.ini @@ -23,9 +23,9 @@ npcdistance=16000 # little message players see when they enter the game motd=Welcome to OpenFusion! # NPC json data -npcdata=NPCs.json +npcdata=data/NPCs.json # warp target json data -warpdata=warps.json +warpdata=data/warps.json # is everyone a GM? gm=true diff --git a/NPCs.json b/data/NPCs.json similarity index 100% rename from NPCs.json rename to data/NPCs.json diff --git a/mobs.json b/data/mobs.json similarity index 100% rename from mobs.json rename to data/mobs.json diff --git a/warps.json b/data/warps.json similarity index 100% rename from warps.json rename to data/warps.json diff --git a/src/NPCManager.cpp b/src/NPCManager.cpp index 9988f1d..1e34704 100644 --- a/src/NPCManager.cpp +++ b/src/NPCManager.cpp @@ -37,7 +37,7 @@ void NPCManager::init() { // load temporary mob dump 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; // read file into json diff --git a/src/settings.cpp b/src/settings.cpp index 976836e..07d0bc4 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -18,8 +18,8 @@ int settings::SPAWN_X = 179213; int settings::SPAWN_Y = 268451; int settings::SPAWN_Z = -4210; std::string settings::GMPASS = "pass"; -std::string settings::NPCJSON = "NPCs.json"; -std::string settings::WARPJSON = "warps.json"; +std::string settings::NPCJSON = "data/NPCs.json"; +std::string settings::WARPJSON = "data/warps.json"; std::string settings::MOTDSTRING = "Welcome to OpenFusion!"; bool settings::GM = false;