mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-04 22:58:29 +08:00
Removed some unused code, fixed some style issues.
This commit is contained in:
parent
7a9af529e0
commit
295dd6a253
@ -3,7 +3,7 @@ package world.phantasmal
|
||||
// This task generates a Karma configuration in karma.config.d that ensures Karma serves files from
|
||||
// the resources directories.
|
||||
// This is a workaround for https://youtrack.jetbrains.com/issue/KT-42923.
|
||||
val karmaResourcesTask = tasks.register("karmaResources") {
|
||||
val karmaResourcesTask: TaskProvider<Task> = tasks.register("karmaResources") {
|
||||
doLast {
|
||||
val karmaConfigDir = file("karma.config.d")
|
||||
karmaConfigDir.mkdir()
|
||||
|
@ -105,7 +105,7 @@ fun parseQst(cursor: Cursor): PwResult<QstContent> {
|
||||
val parseFilesResult: PwResult<List<QstContainedFile>> = parseFiles(
|
||||
cursor,
|
||||
version,
|
||||
headers.map { it.filename to it }.toMap()
|
||||
headers.associateBy { it.filename },
|
||||
)
|
||||
result.addResult(parseFilesResult)
|
||||
|
||||
@ -113,11 +113,13 @@ fun parseQst(cursor: Cursor): PwResult<QstContent> {
|
||||
return result.failure()
|
||||
}
|
||||
|
||||
return result.success(QstContent(
|
||||
return result.success(
|
||||
QstContent(
|
||||
version,
|
||||
online,
|
||||
parseFilesResult.value
|
||||
))
|
||||
parseFilesResult.value,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private class QstHeader(
|
||||
@ -238,14 +240,16 @@ private fun parseHeaders(cursor: Cursor): List<QstHeader> {
|
||||
prevQuestId = questId
|
||||
prevFilename = filename
|
||||
|
||||
headers.add(QstHeader(
|
||||
headers.add(
|
||||
QstHeader(
|
||||
version,
|
||||
online,
|
||||
questId,
|
||||
name,
|
||||
filename,
|
||||
size,
|
||||
))
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
return headers
|
||||
|
@ -30,9 +30,6 @@ operator fun Vector3.timesAssign(scalar: Double) {
|
||||
infix fun Vector3.dot(other: Vector3): Double =
|
||||
dot(other)
|
||||
|
||||
infix fun Vector3.cross(other: Vector3): Vector3 =
|
||||
cross(other)
|
||||
|
||||
operator fun Quaternion.timesAssign(other: Quaternion) {
|
||||
multiply(other)
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package world.phantasmal.web.huntOptimizer.models
|
||||
|
||||
import world.phantasmal.lib.Episode
|
||||
import world.phantasmal.web.shared.dto.Difficulty
|
||||
import world.phantasmal.web.shared.dto.ItemType
|
||||
import world.phantasmal.web.shared.dto.SectionId
|
||||
import kotlin.time.Duration
|
||||
|
||||
|
@ -5,7 +5,7 @@ import world.phantasmal.webui.dom.div
|
||||
import world.phantasmal.webui.dom.p
|
||||
import world.phantasmal.webui.widgets.Widget
|
||||
|
||||
class HelpWidget() : Widget() {
|
||||
class HelpWidget : Widget() {
|
||||
override fun Node.createElement() =
|
||||
div {
|
||||
className = "pw-hunt-optimizer-help"
|
||||
@ -31,7 +31,8 @@ class HelpWidget() : Widget() {
|
||||
init {
|
||||
@Suppress("CssUnusedSymbol")
|
||||
// language=css
|
||||
style("""
|
||||
style(
|
||||
"""
|
||||
.pw-hunt-optimizer-help {
|
||||
cursor: initial;
|
||||
user-select: text;
|
||||
@ -41,7 +42,8 @@ class HelpWidget() : Widget() {
|
||||
margin: 1em;
|
||||
max-width: 600px;
|
||||
}
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user