diff options
Diffstat (limited to 'launcher/minecraft/MinecraftInstance.cpp')
-rw-r--r-- | launcher/minecraft/MinecraftInstance.cpp | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index 2c624a36..76ff5723 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -1109,10 +1109,9 @@ JavaVersion MinecraftInstance::getJavaVersion() return JavaVersion(settings()->get("JavaVersion").toString()); } -std::shared_ptr<ModFolderModel> MinecraftInstance::loaderModList() +std::shared_ptr<ModFolderModel> MinecraftInstance::loaderModList() const { - if (!m_loader_mod_list) - { + if (!m_loader_mod_list) { bool is_indexed = !APPLICATION->settings()->get("ModMetadataDisabled").toBool(); m_loader_mod_list.reset(new ModFolderModel(modsRoot(), this, is_indexed)); m_loader_mod_list->disableInteraction(isRunning()); @@ -1121,10 +1120,9 @@ std::shared_ptr<ModFolderModel> MinecraftInstance::loaderModList() return m_loader_mod_list; } -std::shared_ptr<ModFolderModel> MinecraftInstance::coreModList() +std::shared_ptr<ModFolderModel> MinecraftInstance::coreModList() const { - if (!m_core_mod_list) - { + if (!m_core_mod_list) { bool is_indexed = !APPLICATION->settings()->get("ModMetadataDisabled").toBool(); m_core_mod_list.reset(new ModFolderModel(coreModsDir(), this, is_indexed)); m_core_mod_list->disableInteraction(isRunning()); @@ -1133,10 +1131,9 @@ std::shared_ptr<ModFolderModel> MinecraftInstance::coreModList() return m_core_mod_list; } -std::shared_ptr<ModFolderModel> MinecraftInstance::nilModList() +std::shared_ptr<ModFolderModel> MinecraftInstance::nilModList() const { - if (!m_nil_mod_list) - { + if (!m_nil_mod_list) { bool is_indexed = !APPLICATION->settings()->get("ModMetadataDisabled").toBool(); m_nil_mod_list.reset(new ModFolderModel(nilModsDir(), this, is_indexed, false)); m_nil_mod_list->disableInteraction(isRunning()); @@ -1145,46 +1142,41 @@ std::shared_ptr<ModFolderModel> MinecraftInstance::nilModList() return m_nil_mod_list; } -std::shared_ptr<ResourcePackFolderModel> MinecraftInstance::resourcePackList() +std::shared_ptr<ResourcePackFolderModel> MinecraftInstance::resourcePackList() const { - if (!m_resource_pack_list) - { + if (!m_resource_pack_list) { m_resource_pack_list.reset(new ResourcePackFolderModel(resourcePacksDir(), this)); } return m_resource_pack_list; } -std::shared_ptr<TexturePackFolderModel> MinecraftInstance::texturePackList() +std::shared_ptr<TexturePackFolderModel> MinecraftInstance::texturePackList() const { - if (!m_texture_pack_list) - { + if (!m_texture_pack_list) { m_texture_pack_list.reset(new TexturePackFolderModel(texturePacksDir(), this)); } return m_texture_pack_list; } -std::shared_ptr<ShaderPackFolderModel> MinecraftInstance::shaderPackList() +std::shared_ptr<ShaderPackFolderModel> MinecraftInstance::shaderPackList() const { - if (!m_shader_pack_list) - { + if (!m_shader_pack_list) { m_shader_pack_list.reset(new ShaderPackFolderModel(shaderPacksDir(), this)); } return m_shader_pack_list; } -std::shared_ptr<WorldList> MinecraftInstance::worldList() +std::shared_ptr<WorldList> MinecraftInstance::worldList() const { - if (!m_world_list) - { + if (!m_world_list) { m_world_list.reset(new WorldList(worldDir(), this)); } return m_world_list; } -std::shared_ptr<GameOptions> MinecraftInstance::gameOptionsModel() +std::shared_ptr<GameOptions> MinecraftInstance::gameOptionsModel() const { - if (!m_game_options) - { + if (!m_game_options) { m_game_options.reset(new GameOptions(FS::PathCombine(gameRoot(), "options.txt"))); } return m_game_options; |