-
Notifications
You must be signed in to change notification settings - Fork 125
shows results of removing client/mob verbs on client #2484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…erb removal more correct
…lso fix listx.Remove(listx) by copying the argument list before reading
| } | ||
|
|
||
| Appearance = appearance; | ||
| appearanceSystem.RefreshVerbs(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is causing way too much overhead when connected to a real server. Will need an alternative to this....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little unsure what else could be done here. Ideally, we would only update verbs for clients which are gaining or losing executable verbs.
But I'm wondering if it's acceptable to do something simple and just have the client periodically call RefreshVerbs on a timer of some kind...
| private async Task StartVerbRefresher() { | ||
| while (true) { | ||
| await Task.Delay(TimeSpan.FromSeconds(timeToRefreshVerbs)); | ||
| _taskManager.RunOnMainThread(_verbSystem.RefreshVerbs); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works but I'm not sure if this is the best way.
|
Also I noticed that when reading/clearing |
Closes #2342.
The verb list classes didn't override
ContainsKey,ContainsValue, orRemoveValue, which led to verb removal not working as expected. I also added an explicit verb refresh step to appearance updates on the client side. to ensure that atom verb updates are kept up to date on the client.Also, while testing
listx.Remove(listx)I had an issue where the list was being modified while iterated over so now list.remove will copy lists passed as arguments before iterating over them.Testing code on top of testgame:
Results:
thing1-4remove the mob verbs,thing5-8remove the client verbs.