Skip to content

Conversation

@nicopop
Copy link
Contributor

@nicopop nicopop commented Apr 21, 2025

Last december qwint shared a better way to do item values here
this is the implementation of it.

I also replaced all the wrong any to Any in helpers.py while I was there

This works by making it that every item when collected, add their values to the state that acts like regular items that can be found with state.has/count no more silly cache.

Since this uses regular AP logic, it become more open to outside modifications.
I added Hooks so devs can do something whenever collect/remove is called.
It could let devs change the value of items or even create progressive items

@nicopop nicopop self-assigned this Apr 21, 2025
@nicopop
Copy link
Contributor Author

nicopop commented Apr 22, 2025

1am idea from my bed, I need to note somewhere:

  • Do the same for categories (add them in collect/remove)
  • convert the get key helper func to input category of key (category instead of just VALUE)

@nicopop
Copy link
Contributor Author

nicopop commented Apr 22, 2025

last night me, you have good idea but probably not for this PR, ill add some hooks for create/remove and this pr should be done, more can be done later

@nicopop
Copy link
Contributor Author

nicopop commented May 1, 2025

this PR is done for now, more can be added in later PRs

FuzzyGamesOn
FuzzyGamesOn previously approved these changes May 5, 2025
@silasary silasary merged commit f01154c into main May 12, 2025
@nicopop nicopop deleted the ItemValue_redone branch June 12, 2025 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants