Remove deprecated sprite_number property from Sprite and Entity, closes #305

sprite_number was a legacy alias for sprite_index. All code should use
sprite_index directly. Removed from getsetters, setProperty/getProperty/
hasProperty in UISprite and UIEntity, animation property handling, and
type stubs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
John McCardle 2026-04-09 22:18:20 -04:00
commit c15d836e79
9 changed files with 20 additions and 26 deletions

View file

@ -154,13 +154,13 @@ void Animation::startEntity(std::shared_ptr<UIEntity> target) {
}
else if constexpr (std::is_same_v<T, int>) {
// For entities, we might need to handle sprite_index differently
if (targetProperty == "sprite_index" || targetProperty == "sprite_number") {
if (targetProperty == "sprite_index") {
startValue = target->sprite.getSpriteIndex();
}
}
else if constexpr (std::is_same_v<T, std::vector<int>>) {
// For sprite animation frame lists, get current sprite index
if (targetProperty == "sprite_index" || targetProperty == "sprite_number") {
if (targetProperty == "sprite_index") {
startValue = target->sprite.getSpriteIndex();
}
}