Skip to content
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

Add API methods for setting agent variables by name #1655

Open
qiemem opened this issue Jul 18, 2018 · 1 comment
Open

Add API methods for setting agent variables by name #1655

qiemem opened this issue Jul 18, 2018 · 1 comment

Comments

@qiemem
Copy link
Member

qiemem commented Jul 18, 2018

Currently this is a quite complicated process which differs based on whether you're dealing with built-in agent variables, agents-own variables, breeds-own variables, and so forth. We've recently had several extension authors requesting instructions for how to do it. Although it encourage some less than good extension authoring practices (in terms of having extensions depend on variables of specific names and such), we should consider add a setVariable(String, AnyRef) procedure to api.Agent that will work for any variable type.

@SethTisue
Copy link
Collaborator

iirc, we historically discouraged this for performance reasons; looking up the index takes time.

regardless, providing the method but documenting any performance downsides seems like a reasonable middle path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants