mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-12-22 11:20:05 +00:00
added mobdata to config
This commit is contained in:
parent
c8c4ec7d01
commit
df655dfe29
@ -28,6 +28,8 @@ motd=Welcome to OpenFusion!
|
||||
npcdata=data/NPCs.json
|
||||
# warp target json data
|
||||
warpdata=data/warps.json
|
||||
# mob json
|
||||
mobdata=data/mobs.json
|
||||
# is everyone a GM?
|
||||
gm=true
|
||||
|
||||
|
@ -45,7 +45,7 @@ void NPCManager::init() {
|
||||
|
||||
// load temporary mob dump
|
||||
try {
|
||||
std::ifstream inFile("data/mobs.json"); // not in settings, since it's temp
|
||||
std::ifstream inFile(settings::MOBJSON); // not in settings, since it's temp
|
||||
nlohmann::json npcData;
|
||||
|
||||
// read file into json
|
||||
|
@ -21,6 +21,7 @@ int settings::SPAWN_Z = -4210;
|
||||
std::string settings::GMPASS = "pass";
|
||||
std::string settings::NPCJSON = "data/NPCs.json";
|
||||
std::string settings::WARPJSON = "data/warps.json";
|
||||
std::string settings::MOBJSON = "data/mobs.json";
|
||||
std::string settings::MOTDSTRING = "Welcome to OpenFusion!";
|
||||
bool settings::GM = false;
|
||||
|
||||
@ -50,6 +51,7 @@ void settings::init() {
|
||||
GMPASS = reader.Get("login", "pass", GMPASS);
|
||||
NPCJSON = reader.Get("shard", "npcdata", NPCJSON);
|
||||
WARPJSON = reader.Get("shard", "warpdata", WARPJSON);
|
||||
MOBJSON = reader.Get("shard", "mobdata", MOBJSON);
|
||||
MOTDSTRING = reader.Get("shard", "motd", MOTDSTRING);
|
||||
GM = reader.GetBoolean("shard", "gm", GM);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ namespace settings {
|
||||
extern std::string MOTDSTRING;
|
||||
extern std::string NPCJSON;
|
||||
extern std::string WARPJSON;
|
||||
extern std::string MOBJSON;
|
||||
extern std::string GMPASS;
|
||||
extern bool GM;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user