- std::string worldmt_path = path + DIR_DELIM + "world.mt";
- if(!fs::PathExists(worldmt_path)){
- infostream<<"Creating world.mt ("<<worldmt_path<<")"<<std::endl;
+ std::string worldmt_path = path + DIR_DELIM "world.mt";
+ if (!fs::PathExists(worldmt_path)) {
+ Settings conf;
+
+ conf.set("gameid", gamespec.id);
+ conf.set("backend", "sqlite3");
+ conf.set("player_backend", "sqlite3");
+ conf.setBool("creative_mode", g_settings->getBool("creative_mode"));
+ conf.setBool("enable_damage", g_settings->getBool("enable_damage"));
+
+ if (!conf.updateConfigFile(worldmt_path.c_str()))
+ return false;
+ }
+
+ // Create map_meta.txt if does not already exist
+ std::string map_meta_path = path + DIR_DELIM + "map_meta.txt";
+ if (!fs::PathExists(map_meta_path)){
+ verbosestream << "Creating map_meta.txt (" << map_meta_path << ")" << std::endl;