aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfz72 <fz72@gmx.de>2015-03-15 14:52:10 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-18 09:53:24 +0100
commit8ca08a850ff2494652aa0ac2daa3d00f03aa4e7a (patch)
tree3625c1d51e16963a242c05ea1288ad70f90a5c9a /src
parent2f0107f4a7e82019a68ae3c0572886622d9d49bf (diff)
downloadminetest-8ca08a850ff2494652aa0ac2daa3d00f03aa4e7a.tar.gz
minetest-8ca08a850ff2494652aa0ac2daa3d00f03aa4e7a.tar.bz2
minetest-8ca08a850ff2494652aa0ac2daa3d00f03aa4e7a.zip
Save creative_mode and enable_damage setting for each world in world.mt
Create Parameters on world initialisation and set settings of old worlds
Diffstat (limited to 'src')
-rw-r--r--src/subgame.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/subgame.cpp b/src/subgame.cpp
index 4e8777d13..a3edcda2e 100644
--- a/src/subgame.cpp
+++ b/src/subgame.cpp
@@ -283,7 +283,9 @@ bool initializeWorld(const std::string &path, const std::string &gameid)
std::string worldmt_path = path + DIR_DELIM "world.mt";
if (!fs::PathExists(worldmt_path)) {
std::ostringstream ss(std::ios_base::binary);
- ss << "gameid = " << gameid << "\nbackend = sqlite3\n";
+ ss << "gameid = " << gameid << "\nbackend = sqlite3\n"
+ << "creative_mode = " << g_settings->get("creative_mode")
+ << "\nenable_damage = " << g_settings->get("enable_damage") << "\n";
if (!fs::safeWriteToFile(worldmt_path, ss.str()))
return false;