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

Rando - Fix ice traps & get item logic #2210

Merged

Conversation

aMannus
Copy link
Contributor

@aMannus aMannus commented Dec 19, 2022

Fixes and cleans up the logic for grabbing custom draw functions for rando-specific items. This includes moving the check for colored keys inside its custom draw functions instead of the preceding logic grabbing said custom draw functions.

Also fixes ice traps after they showed the fake item model unintentionally after a previous PR. They now show an ice model around the "get item model" to make it clearer the player has received an ice trap instead of an actual item.

Build Artifacts

@garrettjoecox
Copy link
Contributor

Resolves #2168

@@ -12,7 +12,7 @@

extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEntry) {
s32 pad;

s8 isColoredKeysEnabled = CVar_GetS32("gRandoMatchKeyColors", 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm assuming this is because we used to always draw keysanity keys with colors, this makes it so it's a setting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously the check for using colored keys was done in the logic for deciding to use custom draw functions or not. This just moved the check inside the actual custom draw function so that logic could be cleaned up and be more flexible for colouring more items down the line.

See the changes in z_draw.c and the bottom of z_player_lib.c how it changed the logic there.

@briaguya-ai
Copy link
Contributor

overall i think this looks like it's ready to merge, could you add a summary of all the things it does to the main PR comment though?

@briaguya-ai briaguya-ai merged commit a1a6c07 into HarbourMasters:develop-bradley Dec 21, 2022
@aMannus aMannus deleted the ice-trap-improvements branch December 21, 2022 10:50
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.

None yet

3 participants