MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / SaveLevel

Method SaveLevel

Source/Editors/map_editor.cpp:2781–2798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2779}
2780
2781void MapEditor::SaveLevel(LevelLoader::SaveLevelType type) {
2782 if (terrain_preview_mode) {
2783 DisplayMessage("Cannot save level", "It is not possible to save while previewing terrain");
2784 return;
2785 }
2786
2787 scenegraph_->level->Message("save_selected_dialogue");
2788
2789 LevelLoader::SaveLevel(*scenegraph_, type);
2790
2791 SetLastSaveOnCurrentUndoChunk();
2792
2793 scenegraph_->level->setMetaDataClean();
2794
2795 if (scenegraph_->level_path_.isValid() && scenegraph_->level_has_been_previously_saved_) {
2796 Engine::Instance()->AddLevelPathToRecentLevels(scenegraph_->level_path_);
2797 }
2798}
2799
2800int MapEditor::CreateObject(const std::string& path) {
2801 int id = -1;

Callers

nothing calls this directly

Calls 5

DisplayMessageFunction · 0.85
setMetaDataCleanMethod · 0.80
MessageMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected