Removed some unused code, fixed some style issues.

This commit is contained in:
Daan Vanden Bosch 2021-07-24 21:37:33 +02:00
parent 7a9af529e0
commit 295dd6a253
5 changed files with 24 additions and 22 deletions

View File

@ -3,7 +3,7 @@ package world.phantasmal
// This task generates a Karma configuration in karma.config.d that ensures Karma serves files from // This task generates a Karma configuration in karma.config.d that ensures Karma serves files from
// the resources directories. // the resources directories.
// This is a workaround for https://youtrack.jetbrains.com/issue/KT-42923. // 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 { doLast {
val karmaConfigDir = file("karma.config.d") val karmaConfigDir = file("karma.config.d")
karmaConfigDir.mkdir() karmaConfigDir.mkdir()

View File

@ -105,7 +105,7 @@ fun parseQst(cursor: Cursor): PwResult<QstContent> {
val parseFilesResult: PwResult<List<QstContainedFile>> = parseFiles( val parseFilesResult: PwResult<List<QstContainedFile>> = parseFiles(
cursor, cursor,
version, version,
headers.map { it.filename to it }.toMap() headers.associateBy { it.filename },
) )
result.addResult(parseFilesResult) result.addResult(parseFilesResult)
@ -113,11 +113,13 @@ fun parseQst(cursor: Cursor): PwResult<QstContent> {
return result.failure() return result.failure()
} }
return result.success(QstContent( return result.success(
version, QstContent(
online, version,
parseFilesResult.value online,
)) parseFilesResult.value,
)
)
} }
private class QstHeader( private class QstHeader(
@ -238,14 +240,16 @@ private fun parseHeaders(cursor: Cursor): List<QstHeader> {
prevQuestId = questId prevQuestId = questId
prevFilename = filename prevFilename = filename
headers.add(QstHeader( headers.add(
version, QstHeader(
online, version,
questId, online,
name, questId,
filename, name,
size, filename,
)) size,
)
)
} }
return headers return headers

View File

@ -30,9 +30,6 @@ operator fun Vector3.timesAssign(scalar: Double) {
infix fun Vector3.dot(other: Vector3): Double = infix fun Vector3.dot(other: Vector3): Double =
dot(other) dot(other)
infix fun Vector3.cross(other: Vector3): Vector3 =
cross(other)
operator fun Quaternion.timesAssign(other: Quaternion) { operator fun Quaternion.timesAssign(other: Quaternion) {
multiply(other) multiply(other)
} }

View File

@ -2,7 +2,6 @@ package world.phantasmal.web.huntOptimizer.models
import world.phantasmal.lib.Episode import world.phantasmal.lib.Episode
import world.phantasmal.web.shared.dto.Difficulty import world.phantasmal.web.shared.dto.Difficulty
import world.phantasmal.web.shared.dto.ItemType
import world.phantasmal.web.shared.dto.SectionId import world.phantasmal.web.shared.dto.SectionId
import kotlin.time.Duration import kotlin.time.Duration

View File

@ -5,7 +5,7 @@ import world.phantasmal.webui.dom.div
import world.phantasmal.webui.dom.p import world.phantasmal.webui.dom.p
import world.phantasmal.webui.widgets.Widget import world.phantasmal.webui.widgets.Widget
class HelpWidget() : Widget() { class HelpWidget : Widget() {
override fun Node.createElement() = override fun Node.createElement() =
div { div {
className = "pw-hunt-optimizer-help" className = "pw-hunt-optimizer-help"
@ -31,7 +31,8 @@ class HelpWidget() : Widget() {
init { init {
@Suppress("CssUnusedSymbol") @Suppress("CssUnusedSymbol")
// language=css // language=css
style(""" style(
"""
.pw-hunt-optimizer-help { .pw-hunt-optimizer-help {
cursor: initial; cursor: initial;
user-select: text; user-select: text;
@ -41,7 +42,8 @@ class HelpWidget() : Widget() {
margin: 1em; margin: 1em;
max-width: 600px; max-width: 600px;
} }
""".trimIndent()) """.trimIndent()
)
} }
} }
} }