mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-13 02:10:03 +00:00
Update tdata to patch format, change config constants accordingly
This commit is contained in:
parent
b2a8b86e4c
commit
59303ba30d
31
config.ini
31
config.ini
@ -35,22 +35,25 @@ motd=Welcome to OpenFusion!
|
||||
# requires to run. You can override them by changing their values and
|
||||
# uncommenting them (removing the leading # character from that line).
|
||||
|
||||
# xdt json data
|
||||
#xdtdata=tdata/xdt.json
|
||||
# NPC json data
|
||||
#npcdata=tdata/NPCs.json
|
||||
# mob json
|
||||
#mobdata=tdata/mobs.json
|
||||
# path json
|
||||
#pathdata=tdata/paths.json
|
||||
# drop json
|
||||
#dropdata=tdata/drops.json
|
||||
# gruntwork output (this is what you submit)
|
||||
#gruntwork=tdata/gruntwork.json
|
||||
# location of the tabledata folder
|
||||
#tdatadir=tdata/
|
||||
# location of the patch folder
|
||||
#patchdir=tdata/patch/
|
||||
|
||||
# xdt json filename
|
||||
#xdtdata=xdt.json
|
||||
# NPC json filename
|
||||
#npcdata=NPCs.json
|
||||
# mob json filename
|
||||
#mobdata=mobs.json
|
||||
# path json filename
|
||||
#pathdata=paths.json
|
||||
# drop json filename
|
||||
#dropdata=drops.json
|
||||
# gruntwork output filename (this is what you submit)
|
||||
#gruntwork=gruntwork.json
|
||||
# location of the database
|
||||
#dbpath=database.db
|
||||
# location of the patch folder
|
||||
#patchpath=tdata/patch
|
||||
|
||||
# should tutorial flags be disabled off the bat?
|
||||
disablefirstuseflag=true
|
||||
|
@ -998,12 +998,12 @@ void TableData::init() {
|
||||
std::ifstream fstream;
|
||||
for (int i = 0; i < 7; i++) {
|
||||
std::pair<json*, std::string>& table = tables[i];
|
||||
fstream.open(table.second); // open file
|
||||
fstream.open(settings::TDATADIR + table.second); // open file
|
||||
if (!fstream.fail()) {
|
||||
fstream >> *table.first; // load file contents into table
|
||||
} else {
|
||||
if (i != 6) { // gruntwork isn't critical
|
||||
std::cerr << "[FATAL] Critical tdata file missing: " << table.second << std::endl;
|
||||
std::cerr << "[FATAL] Critical tdata file missing: " << settings::TDATADIR << table.second << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
@ -30,18 +30,24 @@ int settings::SPAWN_X = 19835;
|
||||
int settings::SPAWN_Y = 108682;
|
||||
int settings::SPAWN_Z = 8450;
|
||||
#endif
|
||||
|
||||
int settings::SPAWN_ANGLE = 130;
|
||||
std::string settings::NPCJSON = "tdata/NPCs.json";
|
||||
std::string settings::MOBJSON = "tdata/mobs.json";
|
||||
std::string settings::EGGSJSON = "tdata/eggs.json";
|
||||
std::string settings::GRUNTWORKJSON = "tdata/gruntwork.json";
|
||||
std::string settings::MOTDSTRING = "Welcome to OpenFusion!";
|
||||
|
||||
std::string settings::DBPATH = "database.db";
|
||||
std::string settings::PATCHPATH = "tdata/patch";
|
||||
std::string settings::DROPSJSON = "tdata/drops.json";
|
||||
std::string settings::XDTJSON = "tdata/xdt.json";
|
||||
std::string settings::PATHJSON = "tdata/paths.json";
|
||||
std::string settings::TDATADIR = "tdata/";
|
||||
std::string settings::PATCHDIR = "tdata/patch/";
|
||||
|
||||
std::string settings::NPCJSON = "NPCs.json";
|
||||
std::string settings::MOBJSON = "mobs.json";
|
||||
std::string settings::EGGSJSON = "eggs.json";
|
||||
std::string settings::GRUNTWORKJSON = "gruntwork.json";
|
||||
std::string settings::MOTDSTRING = "Welcome to OpenFusion!";
|
||||
std::string settings::DROPSJSON = "drops.json";
|
||||
std::string settings::PATHJSON = "paths.json";
|
||||
#ifdef ACADEMY
|
||||
std::string settings::XDTJSON = "xdt1013.json";
|
||||
#else
|
||||
std::string settings::XDTJSON = "xdt.json";
|
||||
#endif // ACADEMY
|
||||
|
||||
int settings::ACCLEVEL = 1;
|
||||
bool settings::DISABLEFIRSTUSEFLAG = true;
|
||||
@ -88,7 +94,8 @@ void settings::init() {
|
||||
GRUNTWORKJSON = reader.Get("shard", "gruntwork", GRUNTWORKJSON);
|
||||
MOTDSTRING = reader.Get("shard", "motd", MOTDSTRING);
|
||||
DBPATH = reader.Get("shard", "dbpath", DBPATH);
|
||||
PATCHPATH = reader.Get("shard", "patchpath", PATCHPATH);
|
||||
TDATADIR = reader.Get("shard", "tdatadir", TDATADIR);
|
||||
PATCHDIR = reader.Get("shard", "patchdir", PATCHDIR);
|
||||
ACCLEVEL = reader.GetInteger("shard", "accountlevel", ACCLEVEL);
|
||||
EVENTMODE = reader.GetInteger("shard", "eventmode", EVENTMODE);
|
||||
DISABLEFIRSTUSEFLAG = reader.GetBoolean("shard", "disablefirstuseflag", DISABLEFIRSTUSEFLAG);
|
||||
|
@ -24,7 +24,8 @@ namespace settings {
|
||||
extern std::string EGGSJSON;
|
||||
extern std::string GRUNTWORKJSON;
|
||||
extern std::string DBPATH;
|
||||
extern std::string PATCHPATH;
|
||||
extern std::string PATCHDIR;
|
||||
extern std::string TDATADIR;
|
||||
extern int EVENTMODE;
|
||||
extern bool MONITORENABLED;
|
||||
extern int MONITORPORT;
|
||||
|
2
tdata
2
tdata
@ -1 +1 @@
|
||||
Subproject commit 77e394c7ba8749af4907bdca222484c7595c0d8e
|
||||
Subproject commit 5b54c48bc4b873ef3ff28f0a7f383fd44e698660
|
Loading…
Reference in New Issue
Block a user