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

Toggle billboard on keypress #507

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

taylorjwalker
Copy link

Match the behavior of the vanilla quest journal by toggling (not only opening) the calendar/quest board on [bound] keypress.

Match the behavior of the vanilla quest journal by toggling (not only opening) the calendar/quest board on [bound] keypress.
else if (Game1.activeClickableMenu is Billboard billboard)
{
Game1.player.FarmerSprite.SetOwner(Game1.player);
bool isDailyQuestBoard = (bool)(typeof(Billboard).GetField("dailyQuestBoard", BindingFlags.NonPublic | BindingFlags.Instance)?.GetValue(billboard) ?? false);
Copy link
Author

Choose a reason for hiding this comment

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

I assume using reflection is not optimal, but I wasn't sure how else to accomplish this. Please feel free to improve.

@taylorjwalker taylorjwalker marked this pull request as draft April 26, 2024 16:26
Also remove call to Game1.player.FarmerSprite.SetOwner. I made these changes a while ago and I'm not sure why that was there.
{
helper.Input.SuppressActiveKeybinds(_modConfig.OpenQuestBoardKeybind);
Game1.RefreshQuestOfTheDay();
Copy link
Author

Choose a reason for hiding this comment

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

I don't think this is necessary since the daily quest is refreshed every morning. Please let me know if I'm missing something.

@taylorjwalker taylorjwalker marked this pull request as ready for review April 26, 2024 17:26
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