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

During the beta, once a puzzle is solved, all other hints become free. #386

Merged
merged 2 commits into from
Apr 10, 2019

Conversation

Vroo
Copy link
Contributor

@Vroo Vroo commented Apr 9, 2019

I don't have time to finish testing this now but I have a question so I figure I'd go ahead and upload it and ask. It looks like there is no concept of beta in the app right now. I thought I could check the event name and if it has 'beta' in it, it's a beta. But Hints has no access to the event object. (I think it doesn't actually need it because all the puzzle ids and team ids are unique across all events. Is that right?)

So what I did instead was hardcode IsBeta = true and then we would need to redeploy later with that flag set false. Any better ideas?

@Vroo Vroo requested a review from morganbr April 9, 2019 04:32
Copy link
Contributor

@tabascq tabascq left a comment

Choose a reason for hiding this comment

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

I think you should use Event.Name instead of the static bool, but otherwise looks good! For one thing, we need to permit parallel events.

@@ -15,6 +15,8 @@ namespace ServerCore.Pages.Teams
[Authorize(Policy = "PlayerIsOnTeam")]
public class HintsModel : EventSpecificPageModel
{
private static bool IsBeta = true; // TODO: I don't know how to tell if this is a beta; this code seems not to have the event object available
Copy link
Contributor

Choose a reason for hiding this comment

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

EventSpecificPageModel has an Event property on it. I think you can use Event.Name.Contains("Beta") like you wanted.

@tabascq
Copy link
Contributor

tabascq commented Apr 10, 2019

Thanks! Merging now.

@tabascq tabascq merged commit df30f13 into PuzzleServer:master Apr 10, 2019
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.

3 participants