Split the multiplayer test harness into modules

mp_test_driver.gd was 1458 lines doing six unrelated jobs. It is now
orchestration only — the scripted sequence, the RPC plumbing between peers, and
the manual keyboard controls — with the work in modules that each have one:

  MpWorldView  finding things in the world and describing what they are doing
  MpSteps      the simulated player actions (reach, grab, carry, drop)
  MpAsserts    the per-step checks
  MpSnapshot   the cross-peer sync audit
  MpReport     the ledger, the log, the overlay, the screenshots

The scenario list and the audit logic carry over unchanged. That audit compares
what is actually RENDERED on both peers, not just the replicated values behind
it, which is the only thing that catches a plate whose contents arrived but
whose visuals were never rebuilt — so it was worth moving verbatim.

Assertions that tested the old model now test the new one: "who is holding
this" is the authority of the object's NetXform, not of the object itself.

Suite: 146/146 passing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
algodoogle
2026-07-28 23:22:58 +01:00
parent 61d92052ac
commit ee835ea295
14 changed files with 1193 additions and 1054 deletions
+24
View File
@@ -0,0 +1,24 @@
extends Node
## Throwaway probe: prints how GDScript reports typed-array properties, so
## NetReplication's filter can exclude Array[Node3D] / Array[FoodItem] without
## guessing at the hint format.
func _ready() -> void:
for path in [
"res://Containers/container.gd",
"res://Containers/plate_controller.gd",
"res://Stations/sink.gd",
"res://Stations/item_dispenser.gd",
"res://Stations/hob.gd",
]:
var script: Script = load(path)
print("=== ", path)
for prop in script.get_script_property_list():
if not (prop["usage"] & PROPERTY_USAGE_SCRIPT_VARIABLE):
continue
print(" name=%s type=%d hint=%d hint_string=%s" % [
prop["name"], prop["type"], prop["hint"], prop["hint_string"],
])
print("TYPE_ARRAY=%d TYPE_OBJECT=%d" % [TYPE_ARRAY, TYPE_OBJECT])
get_tree().quit()
+1
View File
@@ -0,0 +1 @@
uid://ctsonlf12536k
+6
View File
@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://bspike0probe0"]
[ext_resource type="Script" path="res://test/spike/probe.gd" id="1_probe"]
[node name="Probe" type="Node"]
script = ExtResource("1_probe")