Matt-MX / KtPaperGui

Declarative GUI focused library for PaperMC. Made for personal use but open source enjoy! :)
Apache License 2.0
25 stars 5 forks source link

Dynamic Conversations #3

Closed Matt-MX closed 7 months ago

Matt-MX commented 1 year ago

Allow for conversations to be dynamically changed while it's running. For example

conversation(stuff) {
    stringPrompt("stuff") { c, s ->
        if (s == "hello") {
            stringPrompt("name") { c1, s1 ->
                println("Hello $s1")
            }.update(player)
        }
    }
}.build(player).begin()

This would allow for more complex conversations.

This could be accomplished by keeping track of the conversation prompts, and if we need to change it then we can cancel the current conversation and rebuild the conversation only including the most recent prompt.

Matt-MX commented 7 months ago

Literally who would use this, sounds like a waste of time