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:
+57
-2
@@ -1,4 +1,7 @@
|
||||
extends Control
|
||||
|
||||
const WorldBriefingModal = preload("res://scripts/world_briefing_modal.gd")
|
||||
|
||||
## World list screen — browses public worlds via GET /api/worlds.
|
||||
##
|
||||
## Displays a scrollable list of world cards (name + description).
|
||||
@@ -131,6 +134,27 @@ func _build_create_world_modal() -> Control:
|
||||
desc_input.text = "A creative build world"
|
||||
form.add_child(desc_input)
|
||||
|
||||
var tags_lbl := Label.new()
|
||||
tags_lbl.text = "Content Tags (comma separated):"
|
||||
tags_lbl.add_theme_font_size_override("font_size", 14)
|
||||
form.add_child(tags_lbl)
|
||||
|
||||
var tags_input := LineEdit.new()
|
||||
tags_input.placeholder_text = "e.g. Building, Roleplay, Chill, Parkour"
|
||||
tags_input.text = "Building, Creative"
|
||||
form.add_child(tags_input)
|
||||
|
||||
var guide_lbl := Label.new()
|
||||
guide_lbl.text = "World Guidelines & Rules / Disclaimer:"
|
||||
guide_lbl.add_theme_font_size_override("font_size", 14)
|
||||
form.add_child(guide_lbl)
|
||||
|
||||
var guide_input := TextEdit.new()
|
||||
guide_input.custom_minimum_size = Vector2(0, 60)
|
||||
guide_input.placeholder_text = "Specify rules, content notices, or disclaimers for players..."
|
||||
guide_input.text = "Welcome! Be respectful to fellow builders and enjoy creating."
|
||||
form.add_child(guide_input)
|
||||
|
||||
var err_label := Label.new()
|
||||
err_label.add_theme_font_size_override("font_size", 13)
|
||||
err_label.add_theme_color_override("font_color", Color(1.0, 0.4, 0.4))
|
||||
@@ -168,7 +192,21 @@ func _build_create_world_modal() -> Control:
|
||||
err_label.add_theme_color_override("font_color", Color(0.8, 0.8, 0.8))
|
||||
err_label.visible = true
|
||||
|
||||
var res: Dictionary = await ApiClient.create_world(wname, desc_input.text.strip_edges())
|
||||
var raw_tags := tags_input.text.split(",")
|
||||
var clean_tags: Array = []
|
||||
for t in raw_tags:
|
||||
var st := t.strip_edges()
|
||||
if not st.is_empty():
|
||||
clean_tags.append(st)
|
||||
|
||||
var res: Dictionary = await ApiClient.create_world(
|
||||
wname,
|
||||
desc_input.text.strip_edges(),
|
||||
"public",
|
||||
"Building",
|
||||
clean_tags,
|
||||
guide_input.text.strip_edges()
|
||||
)
|
||||
if not res.get("ok", false):
|
||||
create_btn.disabled = false
|
||||
create_edit_btn.disabled = false
|
||||
@@ -193,6 +231,7 @@ func _build_create_world_modal() -> Control:
|
||||
return overlay
|
||||
|
||||
|
||||
|
||||
func _on_refresh_button_pressed() -> void:
|
||||
_refresh_worlds()
|
||||
|
||||
@@ -328,7 +367,7 @@ func _create_world_card(world_dict: Dictionary) -> Control:
|
||||
var enter_button := Button.new()
|
||||
enter_button.text = "Enter World"
|
||||
enter_button.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN
|
||||
enter_button.pressed.connect(_on_enter_world_pressed.bind(world_id, enter_button))
|
||||
enter_button.pressed.connect(func(): _show_world_briefing(world_dict, enter_button))
|
||||
|
||||
var buttons_row := HBoxContainer.new()
|
||||
buttons_row.add_child(enter_button)
|
||||
@@ -353,7 +392,23 @@ func _create_world_card(world_dict: Dictionary) -> Control:
|
||||
return panel
|
||||
|
||||
|
||||
func _show_world_briefing(world_dict: Dictionary, button: Button) -> void:
|
||||
var modal := WorldBriefingModal.new()
|
||||
var wid: int = int(world_dict.get("id", 0))
|
||||
modal.setup_world_data(
|
||||
wid,
|
||||
str(world_dict.get("name", "World")),
|
||||
str(world_dict.get("owner_username", "")),
|
||||
str(world_dict.get("content_guidelines", "")),
|
||||
world_dict.get("tags", []),
|
||||
int(world_dict.get("play_count", 0))
|
||||
)
|
||||
modal.entered_confirmed.connect(func(target_wid: int): _on_enter_world_pressed(target_wid, button))
|
||||
add_child(modal)
|
||||
|
||||
|
||||
func _on_enter_world_pressed(world_id: int, button: Button) -> void:
|
||||
|
||||
button.disabled = true
|
||||
button.text = "Joining…"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user