From: David ‘Bombe’ Roden Date: Sat, 10 Feb 2024 08:16:32 +0000 (+0100) Subject: 🐛 Set output of last-state merger to triggered X-Git-Tag: v2~36 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7a3f188160f404826e3698f2132855c6fd41d8da;p=rhynodge.git 🐛 Set output of last-state merger to triggered --- diff --git a/src/main/kotlin/net/pterodactylus/rhynodge/mergers/LastStateMerger.kt b/src/main/kotlin/net/pterodactylus/rhynodge/mergers/LastStateMerger.kt index 95f6e6b..eb851a2 100644 --- a/src/main/kotlin/net/pterodactylus/rhynodge/mergers/LastStateMerger.kt +++ b/src/main/kotlin/net/pterodactylus/rhynodge/mergers/LastStateMerger.kt @@ -8,10 +8,6 @@ import net.pterodactylus.rhynodge.State */ class LastStateMerger : Merger { - override fun mergeStates(previousState: State, currentState: State) = AlwaysTriggeringState(currentState) - - class AlwaysTriggeringState(state: State) : State by state { - override fun triggered() = true - } + override fun mergeStates(previousState: State, currentState: State) = currentState.apply { trigger() } }