8000 Support nicknaming hatched Pokémon (through plugins) by hanzi · Pull Request #677 · 40Cakes/pokebot-gen3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support nicknaming hatched Pokémon (through plugins) #677

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

hanzi
Copy link
Collaborator
@hanzi hanzi commented May 6, 2025

Description

We already supported nicknaming Pokémon that have been caught from wild or static encounters.

This change adds that feature to egg hatching as well.

A plugin is needed to actually use this feature, same as before.

Notes

This introduces a backwards-incompatible change by changing the plugin interface's on_should_nickname_pokemon function to accept an EncounterInfo instance rather than just a Pokemon.

The EncounterInfo class has the Pokémon as a property, so it's still available and would need minimal code changes (pokemon = encounter.pokemon)

If anyone has even bothered to write a plugin for that, I'm sure they'll have the expertise to adapt it accordingly.

Checklist

  • Black Linter has been ran, using --line-length 120 argument
  • Wiki has been updated (if relevant)

We already supported nicknaming Pokémon that have been caught from wild or static encounters.

This change adds that feature to egg hatching as well.

A plugin is needed to actually use this feature, same as before.
@hanzi hanzi requested a review from Copilot May 6, 2025 19:33
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR expands Pokémon nicknaming support to include egg hatching by propagating encounter information changes to the nicknaming plugin system. Key changes include updating function signatures and documentation in plugins and plugin interfaces, integrating the new nicknaming flow into egg hatching logic in the battle and listener modules, and adding a new keyboard handler for the naming screen.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
modules/plugins.py Updated the parameter type for nickname plugins to use EncounterInfo instead of Pokémon.
modules/plugin_interface.py Refactored the on_should_nickname_pokemon signature and docstrings to match the new parameter type.
modules/modes/_listeners.py Integrated nicknaming during egg hatching by calling the new naming screen handler.
modules/map.py Added a fallback return value and a new facing_coordinates property for map objects.
modules/keyboard.py Introduced handle_naming_screen for handling in-game nickname input via the keyboard.
modules/battle_handler.py Modified nickname handling in battle to require an encounter parameter and streamlined the naming logic.

@hanzi hanzi merged commit 94ac1f9 into 40Cakes:main May 6, 2025
1 check passed
@hanzi hanzi deleted the nicknaming-eggs branch May 6, 2025 23:29
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

Successfully merging this pull request may close these issues.

2 participants
0