diff --git a/src/main/kotlin/de/moritzruth/dracula_musical/song/Mittsommernacht.kt b/src/main/kotlin/de/moritzruth/dracula_musical/song/Mittsommernacht.kt index e14bf4c..ecd4b58 100644 --- a/src/main/kotlin/de/moritzruth/dracula_musical/song/Mittsommernacht.kt +++ b/src/main/kotlin/de/moritzruth/dracula_musical/song/Mittsommernacht.kt @@ -14,7 +14,7 @@ fun SceneBuilderContext.songMittsommernacht() { step(StepCue.MusicStart("Mittsommernacht", 4.minutes + 30.seconds)) { actors { // TODO: Expand - +"Einwohner von Huntington / von links & durch Mitte" + +"Einwohner / von links & durch Mitte" } curtainState = CurtainState.OPEN @@ -281,7 +281,7 @@ fun SceneBuilderContext.songMittsommernacht() { step(StepCue.MusicEnd) { actors { - -"Einwohner von Huntington" + -"Einwohner" +"Mina / durch Mitte, mit Koffer & Taschentuch" +"Lucy / durch Mitte" +"Jonathan / von links" diff --git a/src/main/kotlin/de/moritzruth/theaterdsl/show/Dsl.kt b/src/main/kotlin/de/moritzruth/theaterdsl/show/Dsl.kt index 9a8eed5..bdb2f6f 100644 --- a/src/main/kotlin/de/moritzruth/theaterdsl/show/Dsl.kt +++ b/src/main/kotlin/de/moritzruth/theaterdsl/show/Dsl.kt @@ -6,6 +6,7 @@ import io.github.oshai.kotlinlogging.KotlinLogging import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableMap import kotlinx.collections.immutable.toImmutableSet +import java.util.* @DslMarker annotation class TheaterDslMarker @@ -103,8 +104,8 @@ private fun buildAct(actIndex: Int, actName: String, build: ActBuilderContext.() override fun step(cue: StepCue, build: StepDataBuilderContext.() -> Unit) { val changedProps = mutableMapOf() - val actorEntrances = mutableSetOf() - val actorExits = mutableSetOf() + val actorEntrances = TreeSet() + val actorExits = TreeSet() var runner: StepRunner? = null object : StepDataBuilderContext { @@ -168,6 +169,7 @@ private fun buildAct(actIndex: Int, actName: String, build: ActBuilderContext.() actorsOnStage.removeAll(actorExitsNames.toSet()) actorsOnStage.addAll(actorEntrancesNames) + actorsOnStage.sort() changedProps.forEach { (k, v) -> props[k] = v } diff --git a/src/main/kotlin/de/moritzruth/theaterdsl/show/StepCue.kt b/src/main/kotlin/de/moritzruth/theaterdsl/show/StepCue.kt index 2fa4ab1..2382224 100644 --- a/src/main/kotlin/de/moritzruth/theaterdsl/show/StepCue.kt +++ b/src/main/kotlin/de/moritzruth/theaterdsl/show/StepCue.kt @@ -37,24 +37,9 @@ sealed interface StepCue { override fun format() = "curtain: $state${if (whileMoving) "(while moving)" else ""}" } - @Serializable - @SerialName("LIGHT") - data class Light(val state: State, val whileFading: Boolean) : StepCue { - enum class State { - @SerialName("on") - ON, - - @SerialName("off") - OFF - } - - override fun format() = "light: $state${if (whileFading) "(while fading)" else ""}" - } - @Serializable @SerialName("CUSTOM") data class Custom(val text: String) : StepCue { override fun format() = "custom: $text" } - } \ No newline at end of file diff --git a/src/main/kotlin/de/moritzruth/theaterdsl/util/StringWithDetails.kt b/src/main/kotlin/de/moritzruth/theaterdsl/util/StringWithDetails.kt index 94ca245..56c2091 100644 --- a/src/main/kotlin/de/moritzruth/theaterdsl/util/StringWithDetails.kt +++ b/src/main/kotlin/de/moritzruth/theaterdsl/util/StringWithDetails.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.Serializable */ @JvmInline @Serializable -value class StringWithDetails(val value: String) { +value class StringWithDetails(val value: String) : Comparable { companion object { const val DELIMITER = " / " } @@ -15,4 +15,6 @@ value class StringWithDetails(val value: String) { val main get() = value.split(DELIMITER)[0] val details: String? get() = value.split(DELIMITER, limit = 2).takeIf { it.size == 2 }?.let { it[1] } val hasDetails get() = details !== null + + override fun compareTo(other: StringWithDetails): Int = value.compareTo(other.value) } \ No newline at end of file diff --git a/ui/src/App.vue b/ui/src/App.vue index fb682e1..bf683c6 100755 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -4,10 +4,10 @@
Janus, created by Moritz Ruth
-
+
{{ current.act === null ? "" : `${current.act.name} — ` }}{{ current.scene.name }}
-
+
diff --git a/ui/src/components/ActorsOnStageBox.vue b/ui/src/components/ActorsOnStageBox.vue index b4d84d9..6769607 100755 --- a/ui/src/components/ActorsOnStageBox.vue +++ b/ui/src/components/ActorsOnStageBox.vue @@ -1,16 +1,14 @@ - diff --git a/ui/src/components/MotionsList.vue b/ui/src/components/MotionsList.vue index c45652b..28ce330 100755 --- a/ui/src/components/MotionsList.vue +++ b/ui/src/components/MotionsList.vue @@ -1,6 +1,6 @@