diff --git a/src/main/kotlin/ley/anvil/modpacktools/commands/CreateModlist.kt b/src/main/kotlin/ley/anvil/modpacktools/commands/CreateModlist.kt index 2c442c0..8d9d191 100644 --- a/src/main/kotlin/ley/anvil/modpacktools/commands/CreateModlist.kt +++ b/src/main/kotlin/ley/anvil/modpacktools/commands/CreateModlist.kt @@ -7,7 +7,6 @@ import ley.anvil.addonscript.wrapper.ArtifactDestination import ley.anvil.addonscript.wrapper.MetaData import ley.anvil.modpacktools.MPJH import ley.anvil.modpacktools.command.CommandReturn -import ley.anvil.modpacktools.command.CommandReturn.Companion.fail import ley.anvil.modpacktools.command.CommandReturn.Companion.success import ley.anvil.modpacktools.command.ICommand import ley.anvil.modpacktools.command.LoadCommand @@ -47,7 +46,7 @@ object CreateModlist : ICommand { .help("What format the mod list should be made in") parser.addArgument("file") - .type(FileArgumentType()) + .type(FileArgumentType().verifyNotExists()) .help("What file the mod list should be written to") parser @@ -56,9 +55,6 @@ object CreateModlist : ICommand { override fun execute(args: Namespace): CommandReturn { val outFile = args.get("file") - if(outFile.exists()) - return fail("File already exists!") - val all = args.get("all") ?: false val sorting: Comparator = when(args.get("sorting")!!) { Sorting.NAME -> comparing {it.name} @@ -128,6 +124,8 @@ object CreateModlist : ICommand { td(ul( each(it.contributors) {contr -> li(contr.key) + //for contributor colors + .withClass("contributor_${contr.value.getOrElse(0) {""}}") } )), td(each(it.description?.asList() ?: listOf()) {d: String -> diff --git a/src/main/resources/commands/createmodlist/style.css b/src/main/resources/commands/createmodlist/style.css index 26b0b8e..0ee3a53 100644 --- a/src/main/resources/commands/createmodlist/style.css +++ b/src/main/resources/commands/createmodlist/style.css @@ -1,21 +1,30 @@ a:link { - color: #ff5555; + color: #f55; } a:visited { - color: #cc55cc; + color: #c5c; } body { - background-color: #333333; - color: #ffffff; + background-color: #333; + color: #fff; font-family: sans-serif; } .img { width: 100px; } td { - border: #999999 3px; + border: #999 3px; border-style: solid; } .description { width: 100%; } +.contributor_owner { + color: #f55; +} +.contributor_author { + color: orange; +} +.contributor_contributor { + color: green; +}