| 340 | } |
| 341 | |
| 342 | void 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 | |
| 366 | void InstanceImportTask::processModrinth() |
| 367 | { |
nothing calls this directly
no test coverage detected