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

Feature request (Devel): Add **kwargs support to object at_* hooks #1276

Griatch opened this Issue Mar 25, 2017 · 0 comments


1 participant

Griatch commented Mar 25, 2017

Description of requested feature:

The current Object hooks at_give, at_look etc have a fixed call sign, for example at_look(self, target). This feature request aims to expand their callsign with an, by default unused, **kwargs argument, so the new signature would be at_look(self, target, **kwargs).

Reasons for adding feature:

Adding an extra **kwargs allows the developer to inject custom extra arguments into the hook. This would not be used by default Evennia but could be of interest on a per-game basis. Adding a **kwargs also has the advantage of not affecting already existing code - if not included in the call it is just ignored.

Potentially many of the default hooks could benefit from the same flexibility (some already do).

Extra information, such as Evennia revision/repo/branch, operating system and ideas for how to solve / implement:

This is an API change slated for the Devel branch, leading up to Evennia 0.7.

@Griatch Griatch added this to TODO in Evennia 0.7 Mar 25, 2017

@Griatch Griatch moved this from TODO to In progress on devel branch in Evennia 0.7 Apr 20, 2017

@Griatch Griatch moved this from In progress on devel branch to Done on devel branch in Evennia 0.7 Apr 21, 2017

@Griatch Griatch added the implemented label Jul 18, 2017

@Griatch Griatch closed this in f9e7b01 Sep 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment