mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 06:50:04 +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
|
npcdata=data/NPCs.json
|
||||||
# warp target json data
|
# warp target json data
|
||||||
warpdata=data/warps.json
|
warpdata=data/warps.json
|
||||||
|
# mob json
|
||||||
|
mobdata=data/mobs.json
|
||||||
# is everyone a GM?
|
# is everyone a GM?
|
||||||
gm=true
|
gm=true
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ void NPCManager::init() {
|
|||||||
|
|
||||||
// load temporary mob dump
|
// load temporary mob dump
|
||||||
try {
|
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;
|
nlohmann::json npcData;
|
||||||
|
|
||||||
// read file into json
|
// read file into json
|
||||||
|
@ -21,6 +21,7 @@ int settings::SPAWN_Z = -4210;
|
|||||||
std::string settings::GMPASS = "pass";
|
std::string settings::GMPASS = "pass";
|
||||||
std::string settings::NPCJSON = "data/NPCs.json";
|
std::string settings::NPCJSON = "data/NPCs.json";
|
||||||
std::string settings::WARPJSON = "data/warps.json";
|
std::string settings::WARPJSON = "data/warps.json";
|
||||||
|
std::string settings::MOBJSON = "data/mobs.json";
|
||||||
std::string settings::MOTDSTRING = "Welcome to OpenFusion!";
|
std::string settings::MOTDSTRING = "Welcome to OpenFusion!";
|
||||||
bool settings::GM = false;
|
bool settings::GM = false;
|
||||||
|
|
||||||
@ -50,6 +51,7 @@ void settings::init() {
|
|||||||
GMPASS = reader.Get("login", "pass", GMPASS);
|
GMPASS = reader.Get("login", "pass", GMPASS);
|
||||||
NPCJSON = reader.Get("shard", "npcdata", NPCJSON);
|
NPCJSON = reader.Get("shard", "npcdata", NPCJSON);
|
||||||
WARPJSON = reader.Get("shard", "warpdata", WARPJSON);
|
WARPJSON = reader.Get("shard", "warpdata", WARPJSON);
|
||||||
|
MOBJSON = reader.Get("shard", "mobdata", MOBJSON);
|
||||||
MOTDSTRING = reader.Get("shard", "motd", MOTDSTRING);
|
MOTDSTRING = reader.Get("shard", "motd", MOTDSTRING);
|
||||||
GM = reader.GetBoolean("shard", "gm", GM);
|
GM = reader.GetBoolean("shard", "gm", GM);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ namespace settings {
|
|||||||
extern std::string MOTDSTRING;
|
extern std::string MOTDSTRING;
|
||||||
extern std::string NPCJSON;
|
extern std::string NPCJSON;
|
||||||
extern std::string WARPJSON;
|
extern std::string WARPJSON;
|
||||||
|
extern std::string MOBJSON;
|
||||||
extern std::string GMPASS;
|
extern std::string GMPASS;
|
||||||
extern bool GM;
|
extern bool GM;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user