Enable Creative Mode if map editing is active

master
Wuzzy 2022-01-31 00:36:22 +01:00
parent 5eda045e92
commit 3c3640a593
2 changed files with 7 additions and 2 deletions

View File

@ -12,11 +12,13 @@ The tutorial castle is saved in the game itself in schematics and other binary m
2. Trust the code. In the settings menu or `minetest.conf`, add `tutorial_mapgen` to `secure.trusted_mods`
3. In `minetest.conf`, add `tutorial_debug_map_editing = true`
4. In `minetest.conf`, add `tutorial_debug_edit_item_spawners = true`
5. Start Minetest and create a new world, enable Creative Mode and enter the world in singleplayer
5. Start Minetest and create a new world and enter the world in singleplayer (there should be a confirmation message in chat)
6. Edit the map to your likings
7. Grant yourselves the `tutorialmap` privilege
8. Use `/tsave` command to save the map
Note: `tutorial_debug_map_editing=true` will automatically enable Creative Mode.
The changes will end up in `<world directory>/mapdata`. Copy this directory to `<game directory>/mods/tutorial_mapgen`, overwriting files, if neccessary.
If you want to edit item spawn positions, see the details below.
@ -39,7 +41,7 @@ tutorial_debug_edit_item_spawners = true
This enables the `/treset` and `/tsave` commands to help editing the schematic. It also forces the Tutorial to only generate the raw castle, not the grasslands. Also, the item spawners become visible.
Create a new world in Creative Mode. Now edit the map to your likings using your instant digging power and the creative inventory. You can of course WorldEdit to speed up the process.
Create a new world with setting `tutorial_debug_map_editing` set to `true`. Now edit the map to your likings using your instant digging power and the creative inventory. You can of course WorldEdit to speed up the process.
If you're finished, grant yourself the `tutorialmap` privilege and use the `/tsave` command. This updates the map files in `<world directory>/mapdata`. Note that there are limits as for how big the tutorial castle can be.
Copy the contents of this directory to the `tutorial_mapgen` mod under `mapdata` and overwrite files as neccessary. Test your changes by creating a new world. If everything went fine, you can commit your changes now.

View File

@ -6,6 +6,9 @@ local edit_item_spawners = minetest.settings:get_bool("tutorial_debug_edit_item_
-- See tutorial_mapgen/init.lua
local map_editing = minetest.settings:get_bool("tutorial_debug_map_editing")
if map_editing then
minetest.settings:set_bool("creative_mode", true)
end
-- == END OF DEBUG SETTINGS ==