Skip to content

[Question] Lua scripting. #84

Answered by Kaioru
juliolitwin asked this question in Q&A
Discussion options

You must be logged in to vote

On top of what @Bia10 said,

The whole request/response system is called Conversations in the project. Do check out FieldUser::Converse and FieldUser::Prompt to see where the logic flow starts for script dialogs.

Essentially, there is a Channel<object> in each conversation context which is basically an async queue that handles request and responses from the client. This creates the stateless 'awaiting' mechanism that powers every dialog that requires user input.

Every time a method like Self.AskMenu(..) is called, the conversation context reads from the async queue and if its empty, it waits.. forever. And on the packet handling side, whenever a response is received by the server, the serv…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Kaioru
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #72 on October 02, 2023 07:31.