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

Spawn Handler Clean-up #7

Merged
merged 2 commits into from
Jul 4, 2023
Merged

Conversation

UndeadZeratul
Copy link
Member

  • Use case-insensitive 'names' instead of "strings", don't lowercase them when stored and instead use case-insensitive ~== operator when comparing them. Remove redundant first item in logging message.
  • Yes this will cause an unnecessary ", " to be first, oh well. Because entries are no longer being altered when stored, simply copy them into their data class arrays.
  • Added debug logging to handleAmmoUses to finally figure out that
  • Call append() rather than copy() for ADDING to itemsThatUseThis array, rather than REPLACING them.

I feel silly that I didn't notice the bug prior, sorry! Basically what happens is if you run with multiple addons that add two separate things that use the same thing (two weapons using the same ammo), then the addon loaded second will replace the list of things that use the shared item, rather than appending to that list. I kept dumping .50 OMG from the Wyvern but not the .50 OMG Boss Rifle because I loaded Hexadoken's Legacy Continued second... That last bullet point is what fixes it, the rest was all cleanup on my troubleshooting journey.

UndeadZeratul and others added 2 commits July 4, 2023 07:27
Use case-insensitive 'names' instead of "strings", don't lowercase them when stored and instead use case-insensitive ~== operator when comparing them.
Remove redundant first item in logging message.  Yes this will cause an unnecessary ", " to be first, oh well.
Because entries are no longer being altered when stored, simply copy them into their data class arrays.
Added debug logging to handleAmmoUses to finally figure out that
Call append() rather than copy() for ADDING to itemsThatUseThis array, rather than REPLACING them.
@UndeadZeratul UndeadZeratul merged commit 8d0f884 into HDest-Community:main Jul 4, 2023
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.

1 participant