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

[Feature Request] Centralize searching for N number of identical objects #3468

Open
Griatch opened this issue Apr 1, 2024 · 0 comments
Open
Labels
feature-request A suggestion for new functionality.

Comments

@Griatch
Copy link
Member

Griatch commented Apr 1, 2024

Is your feature request related to a problem? Please describe.

In PR #3433, there, @InspectorCaracal creates a helper class for allowing get/drop/give default commands to manipulate stacks, such as give 3 apples. This kind of thing seems like something we should investigate more fundamental support for.

Describe the solution you'd like

Add DefaultObject.search support for input on the form 3 apples, and make it clear that this should return 3 instances of objects identified by apples. We have support for disambiguation syntax, like apple-3, so it ought to be possible to do something similar for fetching stacks of identical items as well. The evennia.utils.utils.group_objects_by_key_and_desc could be looked at for detecting stacks.

Alternatives

If adding search-support is deemed too compex or heavy, one could also picture adding/extracting helper tools dealing with stack handling into one central place so devs don't need to implement or find it spread out across different default commands.

Additional context

@Griatch Griatch added feature-request A suggestion for new functionality. needs-triage Yet to be looked at and verified as an a real issue/feature that could be worked on and removed needs-triage Yet to be looked at and verified as an a real issue/feature that could be worked on labels Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A suggestion for new functionality.
Projects
None yet
Development

No branches or pull requests

1 participant