ConfigFile

data class ConfigFile(name: String = "", version: String = "", description: String = "", author: String = "", overrides: MutableList<String> = mutableListOf(), serverOverrides: MutableList<String> = mutableListOf(), clientOverrides: MutableList<String> = mutableListOf(), val paths: MutableMap<String, String> = mutableMapOf(), val projects: MutableMap<String, ConfigFile.ProjectConfig> = mutableMapOf())

A config file (pakku.json) is a file used by the user to configure properties needed for modpack export.

Constructors

Link copied to clipboard
constructor(name: String = "", version: String = "", description: String = "", author: String = "", overrides: MutableList<String> = mutableListOf(), serverOverrides: MutableList<String> = mutableListOf(), clientOverrides: MutableList<String> = mutableListOf(), paths: MutableMap<String, String> = mutableMapOf(), projects: MutableMap<String, ConfigFile.ProjectConfig> = mutableMapOf())

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class ProjectConfig(var type: ProjectType? = null, var side: ProjectSide? = null, var updateStrategy: UpdateStrategy? = null, var redistributable: Boolean? = null, var subpath: String? = null, var aliases: MutableSet<String>? = null, var export: Boolean? = null)

Properties

Link copied to clipboard

A map of project types to their respective paths.

Link copied to clipboard

A mutable map of project slugs, names, IDs or filenames to project configs.

Functions

Link copied to clipboard
fun addOverride(override: String)
Link copied to clipboard
fun addOverrides(vararg overrides: String)
fun addOverrides(overrides: Collection<String>)
Link copied to clipboard
fun <T> findProjectConfig(projectIn: Project, lockFile: LockFile, builder: (ConfigFile.ProjectConfig) -> T): <Error class: unknown class><T, ActionError>
Link copied to clipboard
suspend fun getAllClientOverrides(): List<<Error class: unknown class><String, ActionError>>
Link copied to clipboard
suspend fun getAllClientOverridesFrom(path: <Error class: unknown class>): List<<Error class: unknown class><String, ActionError>>
Link copied to clipboard
suspend fun getAllOverrides(): List<<Error class: unknown class><String, ActionError>>
Link copied to clipboard
suspend fun getAllOverridesFrom(path: <Error class: unknown class>): List<<Error class: unknown class><String, ActionError>>
Link copied to clipboard
suspend fun getAllServerOverrides(): List<<Error class: unknown class><String, ActionError>>
Link copied to clipboard
suspend fun getAllServerOverridesFrom(path: <Error class: unknown class>): List<<Error class: unknown class><String, ActionError>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun removeOverride(override: String)
Link copied to clipboard
fun setAuthor(author: String)
Link copied to clipboard
fun setDescription(description: String)
Link copied to clipboard
fun setName(name: String)
Link copied to clipboard
fun setProjectConfig(projectInput: String, lockFile: LockFile, builder: ConfigFile.ProjectConfig.(slug: String) -> Unit): ActionError?
fun setProjectConfig(projectIn: Project, lockFile: LockFile, builder: ConfigFile.ProjectConfig.(slug: String) -> Unit): ActionError?
Link copied to clipboard
fun setVersion(version: String)
Link copied to clipboard
suspend fun write(): ActionError?