Complete M11 Creator Studio and M12 Trust & Safety for PC5
checkpoint / checkpoint (push) Failing after 3h14m9s
checkpoint / checkpoint (push) Failing after 3h14m9s
- Creator Studio: Visual behavior & property inspector, GLB model importer, binary persistence - Trust & Safety: 18+ TOS confirmation (DOB removed), creator guidelines & briefing card on join, in-game reporting HUD - Test Harness: Add --filter, --skip-backend, --skip-godot to run_checkpoint_tests.py
This commit is contained in:
+12
-23
@@ -35,7 +35,7 @@ var _auth_mode_label: Label
|
||||
var _username_edit: LineEdit
|
||||
var _password_edit: LineEdit
|
||||
var _email_edit: LineEdit
|
||||
var _dob_edit: LineEdit
|
||||
var _over_18_check: CheckBox
|
||||
var _auth_button: Button
|
||||
var _status_label: Label
|
||||
var _welcome_label: Label
|
||||
@@ -96,7 +96,7 @@ func _ready() -> void:
|
||||
_username_edit = $CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/UsernameEdit
|
||||
_password_edit = $CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/PasswordEdit
|
||||
_email_edit = $CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/EmailEdit
|
||||
_dob_edit = $CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/DobEdit
|
||||
_over_18_check = $CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/Over18Check
|
||||
_auth_button = $CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/AuthButton
|
||||
_status_label = $CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/AuthStatusLabel
|
||||
_welcome_label = $CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/WelcomeLabel
|
||||
@@ -168,7 +168,7 @@ func _show_authenticated(username: String) -> void:
|
||||
_username_edit.visible = false
|
||||
_password_edit.visible = false
|
||||
_email_edit.visible = false
|
||||
_dob_edit.visible = false
|
||||
_over_18_check.visible = false
|
||||
_auth_button.visible = false
|
||||
_auth_mode_label.visible = false
|
||||
_set_nav_enabled(true)
|
||||
@@ -183,8 +183,8 @@ func _reset_to_logged_out() -> void:
|
||||
_status_label.visible = false
|
||||
_welcome_label.visible = false
|
||||
_email_edit.visible = false
|
||||
_dob_edit.visible = false
|
||||
_dob_edit.text = ""
|
||||
_over_18_check.visible = false
|
||||
_over_18_check.button_pressed = true
|
||||
_set_nav_enabled(false)
|
||||
_update_auth_mode_ui()
|
||||
|
||||
@@ -249,17 +249,7 @@ func _on_quit_button_pressed() -> void:
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
## Loose client-side check -- YYYY-MM-DD, a real calendar date, not in the
|
||||
## future. The backend does the authoritative age computation.
|
||||
func _is_valid_dob(dob: String) -> bool:
|
||||
var m := RegEx.new()
|
||||
m.compile("^\\d{4}-\\d{2}-\\d{2}$")
|
||||
if m.search(dob) == null:
|
||||
return false
|
||||
var parts := dob.split("-")
|
||||
var d := {"year": int(parts[0]), "month": int(parts[1]), "day": int(parts[2]), "hour": 0, "minute": 0, "second": 0}
|
||||
var unix := Time.get_unix_time_from_datetime_dict(d)
|
||||
return unix > 0 and unix < Time.get_unix_time_from_system()
|
||||
|
||||
|
||||
|
||||
# ─── Auth panel toggle ────────────────────────────────────────────────────────
|
||||
@@ -288,12 +278,12 @@ func _update_auth_mode_ui() -> void:
|
||||
_auth_mode_label.text = "Register"
|
||||
_auth_button.text = "Register"
|
||||
_email_edit.visible = true
|
||||
_dob_edit.visible = true
|
||||
_over_18_check.visible = true
|
||||
else:
|
||||
_auth_mode_label.text = "Login"
|
||||
_auth_button.text = "Login"
|
||||
_email_edit.visible = false
|
||||
_dob_edit.visible = false
|
||||
_over_18_check.visible = false
|
||||
|
||||
|
||||
# ─── Auth submission ──────────────────────────────────────────────────────────
|
||||
@@ -320,9 +310,8 @@ func _on_auth_button_pressed() -> void:
|
||||
if email == "":
|
||||
_show_status("Email is required.")
|
||||
return
|
||||
var dob := _dob_edit.text.strip_edges()
|
||||
if not _is_valid_dob(dob):
|
||||
_show_status("Enter your date of birth as YYYY-MM-DD.")
|
||||
if not _over_18_check.button_pressed:
|
||||
_show_status("You must confirm you are 18 or older to register.")
|
||||
return
|
||||
|
||||
_auth_button.disabled = true
|
||||
@@ -330,7 +319,7 @@ func _on_auth_button_pressed() -> void:
|
||||
_is_authenticating = true
|
||||
_clear_status()
|
||||
|
||||
var result := await ApiClient.register(username, email, password, dob)
|
||||
var result := await ApiClient.register(username, email, password, true)
|
||||
await _on_auth_complete(result)
|
||||
else:
|
||||
_auth_button.disabled = true
|
||||
@@ -356,7 +345,7 @@ func _on_auth_complete(result: Dictionary) -> void:
|
||||
_username_edit.visible = false
|
||||
_password_edit.visible = false
|
||||
_email_edit.visible = false
|
||||
_dob_edit.visible = false
|
||||
_over_18_check.visible = false
|
||||
_auth_button.visible = false
|
||||
_auth_mode_label.visible = false
|
||||
_status_label.visible = false
|
||||
|
||||
Reference in New Issue
Block a user