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

[Time Saver Enhancement] Nighttime GS Always Spawn #2611

Merged

Conversation

Patrick12115
Copy link
Contributor

@Patrick12115 Patrick12115 commented Mar 11, 2023

Title pretty much explains it, but adds a checkbox in Time Savers to make the Gold Skulltulas that only spawn at night, spawn all the time. This speeds up things, since you no longer have to wait until night or rely on Suns Song to get them. Especially useful for Tokensanity.

Build Artifacts

Copy link
Contributor

@garrettjoecox garrettjoecox left a comment

Choose a reason for hiding this comment

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

Is this confirmed to be working in scenes that don’t let time pass? Eg child kak or adult zora’s domain?

(I had made the assumption early on this was going to be annoying because I figured some GS were baked into the scene commands)

@Patrick12115
Copy link
Contributor Author

You are right, it doesn't work in those areas. I didn't think about that being different

@Patrick12115 Patrick12115 marked this pull request as draft March 11, 2023 02:05
@Patrick12115 Patrick12115 marked this pull request as ready for review March 11, 2023 17:37
@Archez
Copy link
Contributor

Archez commented Mar 11, 2023

Copying my description from the merged PR:

"This PR adds a new onSceneSpawnActors hook that runs when you transition scenes/rooms, and the original actor spawn list for that room is spawned.

With this hook we can then do various things like spawning "extra" actors.

I've added an implementation of this hook for the "Night time GS always spawn" enhancement that will spawn Gold Skulltulas into the Day scene equivalent that are missing.

There where 5 unique scenes (7 instances including different ages), with 12 unique GS actors overall that need to be spawned to make this enhancement work for all GS in the game. I ripped the position/rotation/params values from the Night scene spawn actor list."

if (IS_DAY && dayTimeGS.forChild == LINK_IS_CHILD &&
dayTimeGS.scene == gPlayState->sceneNum &&
dayTimeGS.room == gPlayState->roomCtx.curRoom.num) {
for (const auto actorEntry : dayTimeGS.actorEntries) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, the important part was actually the &, not the const! Making them auto& refs instead of auto copies will potentially save performance by not copying the skulltula struct or actor list in every iteration of the for loops. I only mention it since it looks like you've got a merge conflict to take care of anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I read it too fast and missed the &, that's definitely my bad. Should be fixed now, as well as the merge conflicts

Copy link
Contributor

@briaguya-ai briaguya-ai left a comment

Choose a reason for hiding this comment

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

This looks great! Once the merge conflicts are resolved it should be good to go!

@briaguya-ai briaguya-ai added the merge conflicts PR has conflicts that need to be resolved before it can be merged label Apr 2, 2023
Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
@Patrick12115
Copy link
Contributor Author

This looks great! Once the merge conflicts are resolved it should be good to go!

Should be good now!

@Archez Archez removed the merge conflicts PR has conflicts that need to be resolved before it can be merged label Apr 3, 2023
@briaguya-ai briaguya-ai merged commit 2af952b into HarbourMasters:develop Apr 3, 2023
@Patrick12115 Patrick12115 deleted the Night-Time-GS-Always-Spawn branch May 20, 2023 01:23
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.

None yet

5 participants