MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / processMultiMC

Method processMultiMC

launcher/InstanceImportTask.cpp:342–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342void InstanceImportTask::processMultiMC()
343{
344 QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
345 auto instanceSettings = std::make_unique<INISettingsObject>(configPath);
346
347 NullInstance instance(m_globalSettings, std::move(instanceSettings), m_stagingPath);
348
349 // reset time played on import... because packs.
350 instance.resetTimePlayed();
351
352 // set a new nice name
353 instance.setName(name());
354
355 // if the icon was specified by user, use that. otherwise pull icon from the pack
356 if (m_instIcon != "default") {
357 instance.setIconKey(m_instIcon);
358 } else {
359 m_instIcon = instance.iconKey();
360
361 installIcon(instance.instanceRoot(), m_instIcon);
362 }
363 emitSucceeded();
364}
365
366void InstanceImportTask::processModrinth()
367{

Callers

nothing calls this directly

Calls 8

PathCombineFunction · 0.85
moveFunction · 0.85
installIconFunction · 0.85
resetTimePlayedMethod · 0.80
setIconKeyMethod · 0.80
instanceRootMethod · 0.80
setNameMethod · 0.45
iconKeyMethod · 0.45

Tested by

no test coverage detected