Conversation
|
Test fail isn't my fault, it's because pyyaml made a breaking change in a patch version... It's fixed upstream space-wizards/RobustToolbox@c8db7f9...784a02c ...actually the failing integration tests are my fault, gonna have to figure out what to do about those. |
Fix an issue where if a client disconnects right after connecting, before UserDbDataManager has had time to load the user data, it would throw an exception.
Add a manager that is responsible for making the player join the game after connecting. It checks if there are any "prejoin actions" that need to be performed first, such as presenting the player with a rules popup or age gate.
Add an age gate popup that requires the player to enter their date of birth, checking that they are 18+ before letting them in. This adds a boolean to the Player DB model, so running the EF Core migrations script is required after applying the patch.
moonheart08
left a comment
There was a problem hiding this comment.
All of these new files need to go into _Citadel folders (with explicit MIT header) or your own folder (without it, if you want) if possible please.
Content.Client/Info/AgeGate.xaml.cs
Outdated
| AcceptButton.OnPressed += OnAcceptButtonPressed; | ||
| QuitButton.OnPressed += OnQuitButtonPressed; | ||
|
|
||
| DobMonthOptionButton.AddItem(Loc.GetString("datepicker-month"), 0); |
There was a problem hiding this comment.
this entire DoB selector needs to be leapyear aware (yeaaaa i knowwwww.... time is a pain.)
There was a problem hiding this comment.
What's the issue with leapyears? I'm using DateTime which should be leapyear aware.
Yeah I think its own folder would be best. If every server that uses the age gate puts it in their specific folder it would make it difficult to share patches. |
Because someone could enter, say, "09" if they were born in the year 2009, which would actually be interpreted as the year 9.
I skipped the DatePicker since that should be upstreamed, but everything else has been moved to a |
- Now uses `DateOnly` (currently fails sandbox, but PJB has promised to add it in engine) - Add MinDate and MaxDate fields - Use constructor instead of parsing date string
TODO
DateOnly)About the PR
Adds an age gate, requiring players to enter their date of birth before being let into the server.
Why / Balance
To deter minors from playing on 18+ server. It won't stop all minors, but I think if it stops even a single one, it will be worth the slight inconvenience of people having to enter their DoB once before joining.
Technical details
PreJoinManagerthat performs actions before a player has joined the game. It's similar to what's described in Login flow (+ Agegate) #390, but no prototypes and instead a cvar list of actions to perform in order (right now justRulesandAgeGate).RulesManagerto make use of thePreJoinManager. It's no longer technically possible to join the game without having accepted the rules.PlayerDB model to add a boolean if the player has passed the age gate.Media
Requirements