Define protocol for game object interaction and add more possibilities #65
Labels
No labels
Doing
To Do
bug
clarification needed
duplicate
enhancement
help wanted
invalid
question
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nik/veripeditus-server#65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now, the protocol for game object interaction only allows doing one defined action and then get a message as reply from the game object.
This protocol should be better defined and fleshed out. For example, this would enable dialogs with NPCs by making it possible to add a set of reply buttons to messages, and so on.
The idea is the following:
When a game object method is called through the API, initialise an empty dictionary in Flask's global namespace
g. This dictionary is filled with data framework methods - e.g., thesay()method does not return, but only adds an entry to the dictionary. This dictionary is then later returned to the browser when the API call finishes.This automatically allows adding data from
may_*and others, as described in #84.Milestone changed to %9