Limo
A simple mod manager
Loading...
Searching...
No Matches
importmodinfo.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <chrono>
9#include <filesystem>
10#include <string>
11
12
17{
19 enum Type
20 {
21 download = 0,
22 extract = 1
23 };
24
25 int app_id;
29 std::filesystem::path local_source;
34 std::string remote_source = "";
36 std::filesystem::path target_path;
39 int nexus_file_id = -1;
41 int mod_id = -1;
43 std::chrono::time_point<std::chrono::high_resolution_clock> queue_time =
44 std::chrono::high_resolution_clock::now();
46 std::string version_overwrite = "";
48 std::string name_overwrite = "";
49
55 bool operator<(const ImportModInfo& other) const
56 {
57 if(type == other.type)
58 return queue_time > other.queue_time;
59 return type < other.type;
60 }
61};
Stores data needed to download or extract a mod.
Definition importmodinfo.h:17
std::filesystem::path target_path
This is where the mod should be stored after extraction/ download.
Definition importmodinfo.h:36
int mod_id
If !=-1: The mod should be added to this mods group after installation.
Definition importmodinfo.h:41
bool operator<(const ImportModInfo &other) const
Compares with another ImportModInfo object by their type.
Definition importmodinfo.h:55
std::chrono::time_point< std::chrono::high_resolution_clock > queue_time
Time at which this object was added to the queue. Used for sorting.
Definition importmodinfo.h:43
int app_id
Target ModdedApplication.
Definition importmodinfo.h:25
int nexus_file_id
If remote_source is a NexusMods mod page: The id of the file to be downloaded, else: Not set.
Definition importmodinfo.h:39
Type
Describes what import action should be taken.
Definition importmodinfo.h:20
std::filesystem::path local_source
Path to the local file used for extraction or empty if type == download.
Definition importmodinfo.h:29
std::string name_overwrite
If this is not empty: Use this as mod name.
Definition importmodinfo.h:48
Type type
Type of action to be performed.
Definition importmodinfo.h:27
std::string version_overwrite
If this is not empty: Use this as mod version.
Definition importmodinfo.h:46
std::string remote_source
URL used to download the mod. Can be either a URL pointing to the mod itself or a NexusMods nxm URL.
Definition importmodinfo.h:34