-
Notifications
You must be signed in to change notification settings - Fork 0
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
No Game and Any Game use magic ids that are different for ACUS and ACNW #161
Comments
I'm considering the evil that men do, and patch up game, game_submission, game_choice, game_assignment in the ACUS database to swap 596-603 with 1-8 and 604 with 144 Or add a "type" field to game: event|none|any |
Only downside is both require a database call. |
This is a bit crazy ...
We use the procedure above to do a three-way swap: e.g. Any Game for ACUS is 604 and should be 144:
Then the No Game in Slot 1 through 8: Of course we are putting that itself in a stored procedure:
And then do the swaperoo game on the magic values:
And the no game ones
|
Testing locally |
And, wow, it turns out Postgres doesn't like returning select from stored procedures or functions, let alone multiple ones. Scrap the display. |
Here's the resulting trickery:
|
I'll do more testing, but I'm running locally with the new IDs and cleaned up code. I'll do some specific testing before calling this one good. |
Try and bring ACNW and ACUS together through: 1. Configuration values 2. Added configuration settings: Copyright holder in footer - config.copyright (string) Used to set range on min and max player in creating games - config.playerMin (positive integer) - config.playerMax (positive integer) - config.minPlayersFloor (positive integer) - config.minPlayersCeiling (positive integer) - config.maxPlayersFloor (positive integer) - config.maxPlayersCeiling (positive integer) Used by ACUS on its hotel page to allow people to book in its block of rooms: - config.hotelBookingCode (string) - config.hotelBookingUrl (string) - config.hotelBookingLastdate (date) Resolves: #155, #158, #160, #161 See also: #159
Instead of sticking configuration.abbr in local variables of acnw and acus, which are essentially inverted Boolean flags, check against its values of 'acus' or 'acnw' directly. It's simpler, clearer, and allows for adding a third (even if only synthetic) site. Resolves: #155, #158, #160, #161 See also: #159
It works, but it would be nicer to add a type field to the event: game|any game|no game but it require rejiggering of a fair bit with regards to the id checks in game dialog. |
I do think that that's a good idea, but also a lot of work. Perhaps something for the summer when we're not in a hurry. Your approach makes a lot of sense for right now. |
Yeah I looked at it and it was too ugly. Right now it has methods to check if the id is slot or any magical, and I really didn't want to touch it. That seemed asking for trouble. Playing SQL games ... eh. Not a big deal. Worst case I mess up past game choices and assignments which currently we don't use. |
I'll hack toLocal.sh to keep a local copy, just in case, but I've done it on local, tested it against several people I know take slots off. It's pretty safe. |
It doesn't seem that these should a be a config: we should find these differently.
Either by title, or a flag on the event
The text was updated successfully, but these errors were encountered: