Comments (3)
this is the important part were registering an entire conversation interface for 2 speakers
this exposes the accessibility to lua to call the func with params
so the interface is loaded in the script globals and then the entire source is evaluated if it finds reference to the global it can call the C# function.
the heavy lifting is done by moonsharp, thats where the magic of converting a DynValue result which is placeholder for lua types gets auto converted to CLR type.
from edelstein.
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 server pushes into the async queue which finally unblocks the read and continues on with the conversation.
See:
- https://github.com/Kaioru/Edelstein/blob/dev/src/common/Edelstein.Common.Gameplay.Game/Conversations/ConversationContext.cs#L26
- https://learn.microsoft.com/en-us/dotnet/core/extensions/channels
from edelstein.
Closing this issue, feel free to continue the discussion under the 'Discussions' tab.
from edelstein.
Related Issues (20)
- mob kills don't count toward quest progression
- quest helper is not implemented
- quest First Mission: Infiltration (2351) doesn't auto-complete
- quest [Required] Find the Missing Kid, is not given HOT 1
- List of non-working skills HOT 1
- skill Roll of the dice doesn't apply
- summons are not implemented
- items stay indefinitely on map
- client crash on !debug QuestEX HOT 1
- experience overflow on level 200
- character quests dialog has weird formatting HOT 1
- Double look-up in dictionaries HOT 3
- What client files to connect? HOT 1
- Some setup issues HOT 1
- Setup Documentation HOT 3
- Better handling of ungraceful termination. HOT 1
- [Feature] Allow different ordering for deserialization of UserOnPacketCheckPassword HOT 1
- [Bug] Failure to convert NxNode from int64 to string. HOT 1
- [Plugin] Rue progress overview (WIP)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edelstein.