mirror of
https://github.com/Anvilcraft/modpacktools
synced 2024-07-01 00:38:48 +02:00
contributors in modlists will now be colored
This commit is contained in:
parent
fb0ed7b19d
commit
c99a1f8bdb
|
@ -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>("file")
|
||||
|
||||
if(outFile.exists())
|
||||
return fail("File already exists!")
|
||||
|
||||
val all = args.get<Boolean>("all") ?: false
|
||||
val sorting: Comparator<MetaData> = when(args.get<Sorting>("sorting")!!) {
|
||||
Sorting.NAME -> comparing<MetaData, String> {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 ->
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue