feat(simulation): bookmark definition system with bridge protocol (#614)

BookmarkPlugin, BookmarkRegistry, SelectedBookmark resources. Tycoon bookmark
defined; PROTOCOL_VERSION bumped to 22. RequestBookmarkCatalog + ConfirmBookmark
actions wired into process_player_input via BookmarkInputParams SystemParam bundle
(resolves Bevy's 16-system-param limit). build_catalog() accepts optional
CultureResolver for D-128 location-culture mapping. Snapshot delivery at tick-0
via SnapshotBuffer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 13:12:43 +02:00
co-authored by Claude Sonnet 4.6
parent 1282454b8d
commit c19d84f2e3
14 changed files with 797 additions and 2 deletions
+2
View File
@@ -78,6 +78,8 @@ fn snapshot_roundtrip_over_unix_socket() {
sim_errors: vec![],
current_ticker: None,
settings_response: None,
economy_snapshot: None,
bookmark_catalog: None,
};
bridge
+2
View File
@@ -64,6 +64,8 @@ fn snapshot_roundtrip_over_tcp() {
sim_errors: vec![],
current_ticker: None,
settings_response: None,
economy_snapshot: None,
bookmark_catalog: None,
};
bridge
+2
View File
@@ -307,6 +307,8 @@ fn snapshot_with_sim_errors_roundtrips() {
}],
current_ticker: None,
settings_response: None,
economy_snapshot: None,
bookmark_catalog: None,
};
let bytes = rmp_serde::to_vec_named(&snapshot).expect("serialize");
+6
View File
@@ -54,6 +54,8 @@ fn fixture_snapshot(tick: u64, entities: Vec<VisibleEntity>) -> ObserverSnapshot
sim_errors: vec![],
current_ticker: None,
settings_response: None,
economy_snapshot: None,
bookmark_catalog: None,
}
}
@@ -251,6 +253,8 @@ fn generate_msgpack_fixtures() {
sim_errors: vec![],
current_ticker: None,
settings_response: None,
economy_snapshot: None,
bookmark_catalog: None,
};
write_fixture(
"snapshot_v2_full",
@@ -418,6 +422,8 @@ fn generate_msgpack_fixtures() {
sim_errors: vec![],
current_ticker: None,
settings_response: None,
economy_snapshot: None,
bookmark_catalog: None,
};
write_fixture(
"snapshot_full",
+6
View File
@@ -42,6 +42,8 @@ fn test_snapshot(tick: u64, entities: Vec<VisibleEntity>) -> ObserverSnapshot {
sim_errors: vec![],
current_ticker: None,
settings_response: None,
economy_snapshot: None,
bookmark_catalog: None,
}
}
@@ -306,6 +308,8 @@ fn snapshot_v2_fields_roundtrip() {
sim_errors: vec![],
current_ticker: None,
settings_response: None,
economy_snapshot: None,
bookmark_catalog: None,
};
let bytes = rmp_serde::to_vec_named(&snapshot).expect("serialize");
@@ -416,6 +420,8 @@ fn all_facing_direction_variants_roundtrip() {
sim_errors: vec![],
current_ticker: None,
settings_response: None,
economy_snapshot: None,
bookmark_catalog: None,
};
let bytes = rmp_serde::to_vec_named(&snapshot).expect("serialize");
let decoded: ObserverSnapshot = rmp_serde::from_slice(&bytes).expect("deserialize");