refactor: major cleanup - new display module, bug fixes, shiny detection#9
Open
SamiraUrzua wants to merge 18 commits intoyling:mainfrom
Open
refactor: major cleanup - new display module, bug fixes, shiny detection#9SamiraUrzua wants to merge 18 commits intoyling:mainfrom
SamiraUrzua wants to merge 18 commits intoyling:mainfrom
Conversation
Fix: Gen 4 enemy Pokémon only appeared if the script started during a battle Fix: Pokémon data loaded before it was ready, causing incorrect display Fix: crashes when loading a Pokémon with a nonexistent species ID Feature: shiny detection and display for Gen 3–5
…mprove readability
…issues - Move state management and key press input handling to main script - Group and localize main script variables to prevent global scope issues - Migrate all rendering code to display.lua module - Improve variable names for better code clarity - Fix Gen 1-2 screen layout to eliminate overlapping text - Restore accidentally removed contest stats labels - Fix global variable conflict causing memory read functions to access incorrect locations
…nt and aligned shiny value to the right.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor and improve codebase: modularize rendering, fix critical bugs, add shiny detection
Refactoring:
Extracted rendering logic to display.lua module for maintainability
Reorganized variable scopes and localized variables to prevent global variable conflicts
Bug Fixes:
Added Pokémon data validation to catch when trash data is loaded
Fixed Gen 4 enemy Pokémon failing to load unless script was started during battle
Fixed crash when loading Pokémon with nonexistent species ID (trash data)
Fixed global variable conflict causing memory read functions to access incorrect parts of memory
New Feature:
Added shiny detection and display for Gen 3–5
Keep rendering UI when Pokémon data unavailable
Reload data when current hp changes are detected