Pārlūkot izejas kodu

Removed no longer used code

Ivan Savenko 1 gadu atpakaļ
vecāks
revīzija
ef5686634d

+ 1 - 1
client/CMT.cpp

@@ -205,7 +205,7 @@ int main(int argc, char * argv[])
 	logGlobal->info("The log file will be saved to %s", logPath);
 
 	// Init filesystem and settings
-	preinitDLL(::console);
+	preinitDLL(::console, false);
 
 	Settings session = settings.write["session"];
 	auto setSettingBool = [](std::string key, std::string arg) {

+ 4 - 4
lib/VCMI_Lib.cpp

@@ -47,14 +47,14 @@ VCMI_LIB_NAMESPACE_BEGIN
 
 LibClasses * VLC = nullptr;
 
-DLL_LINKAGE void preinitDLL(CConsoleHandler * Console, bool onlyEssential, bool extractArchives)
+DLL_LINKAGE void preinitDLL(CConsoleHandler * Console, bool extractArchives)
 {
 	console = Console;
 	VLC = new LibClasses();
 	VLC->loadFilesystem(extractArchives);
 	settings.init("config/settings.json", "vcmi:settings");
 	persistentStorage.init("config/persistentStorage.json", "");
-	VLC->loadModFilesystem(onlyEssential);
+	VLC->loadModFilesystem();
 
 }
 
@@ -182,12 +182,12 @@ void LibClasses::loadFilesystem(bool extractArchives)
 	logGlobal->info("\tData loading: %d ms", loadTime.getDiff());
 }
 
-void LibClasses::loadModFilesystem(bool onlyEssential)
+void LibClasses::loadModFilesystem()
 {
 	CStopWatch loadTime;
 	modh = new CModHandler();
 	identifiersHandler = new CIdentifierStorage();
-	modh->loadMods(onlyEssential);
+	modh->loadMods();
 	logGlobal->info("\tMod handler: %d ms", loadTime.getDiff());
 
 	modh->loadModFilesystems();

+ 2 - 2
lib/VCMI_Lib.h

@@ -115,7 +115,7 @@ public:
 
 	// basic initialization. should be called before init(). Can also extract original H3 archives
 	void loadFilesystem(bool extractArchives);
-	void loadModFilesystem(bool onlyEssential);
+	void loadModFilesystem();
 
 #if SCRIPTING_ENABLED
 	void scriptsLoaded();
@@ -124,7 +124,7 @@ public:
 
 extern DLL_LINKAGE LibClasses * VLC;
 
-DLL_LINKAGE void preinitDLL(CConsoleHandler * Console, bool onlyEssential = false, bool extractArchives = false);
+DLL_LINKAGE void preinitDLL(CConsoleHandler * Console, bool extractArchives);
 DLL_LINKAGE void loadDLLClasses(bool onlyEssential = false);
 
 

+ 3 - 10
lib/modding/CModHandler.cpp

@@ -237,19 +237,12 @@ void CModHandler::loadOneMod(std::string modName, const std::string & parent, co
 	}
 }
 
-void CModHandler::loadMods(bool onlyEssential)
+void CModHandler::loadMods()
 {
 	JsonNode modConfig;
 
-	if(onlyEssential)
-	{
-		loadOneMod("vcmi", "", modConfig, true);//only vcmi and submods
-	}
-	else
-	{
-		modConfig = loadModSettings(JsonPath::builtin("config/modSettings.json"));
-		loadMods("", "", modConfig["activeMods"], true);
-	}
+	modConfig = loadModSettings(JsonPath::builtin("config/modSettings.json"));
+	loadMods("", "", modConfig["activeMods"], true);
 
 	coreMod = std::make_unique<CModInfo>(ModScope::scopeBuiltin(), modConfig[ModScope::scopeBuiltin()], JsonNode(JsonPath::builtin("config/gameConfig.json")));
 }

+ 1 - 1
lib/modding/CModHandler.h

@@ -58,7 +58,7 @@ public:
 
 	/// receives list of available mods and trying to load mod.json from all of them
 	void initializeConfig();
-	void loadMods(bool onlyEssential = false);
+	void loadMods();
 	void loadModFilesystems();
 
 	/// returns ID of mod that provides selected file resource

+ 1 - 1
mapeditor/mainwindow.cpp

@@ -177,7 +177,7 @@ MainWindow::MainWindow(QWidget* parent) :
 	logGlobal->info("The log file will be saved to %s", logPath);
 
 	//init
-	preinitDLL(::console, false, extractionOptions.extractArchives);
+	preinitDLL(::console, extractionOptions.extractArchives);
 
 	// Initialize logging based on settings
 	logConfig->configure();

+ 1 - 1
server/CVCMIServer.cpp

@@ -1172,7 +1172,7 @@ int main(int argc, const char * argv[])
 
 	boost::program_options::variables_map opts;
 	handleCommandOptions(argc, argv, opts);
-	preinitDLL(console);
+	preinitDLL(console, false);
 	logConfig.configure();
 
 	loadDLLClasses();