chore(bridge): format gen_fixtures.rs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,10 @@ fn generate_msgpack_fixtures() {
|
||||
kind: EntityKind::Npc,
|
||||
}],
|
||||
};
|
||||
write_fixture("snapshot_one_npc", &rmp_serde::to_vec_named(&snapshot).unwrap());
|
||||
write_fixture(
|
||||
"snapshot_one_npc",
|
||||
&rmp_serde::to_vec_named(&snapshot).unwrap(),
|
||||
);
|
||||
|
||||
// Empty snapshot
|
||||
let empty = ObserverSnapshot {
|
||||
@@ -42,23 +45,50 @@ fn generate_msgpack_fixtures() {
|
||||
tick: 100,
|
||||
action: PlayerAction::MoveNorth,
|
||||
};
|
||||
write_fixture("input_move_north", &rmp_serde::to_vec_named(&input_north).unwrap());
|
||||
write_fixture(
|
||||
"input_move_north",
|
||||
&rmp_serde::to_vec_named(&input_north).unwrap(),
|
||||
);
|
||||
|
||||
// PlayerInput: UsePerceptionMode
|
||||
let input_perception = PlayerInput {
|
||||
tick: 200,
|
||||
action: PlayerAction::UsePerceptionMode("thermal".to_string()),
|
||||
};
|
||||
write_fixture("input_perception_mode", &rmp_serde::to_vec_named(&input_perception).unwrap());
|
||||
write_fixture(
|
||||
"input_perception_mode",
|
||||
&rmp_serde::to_vec_named(&input_perception).unwrap(),
|
||||
);
|
||||
|
||||
// Snapshot with multiple entities and all EntityKind variants
|
||||
let snapshot_multi = ObserverSnapshot {
|
||||
tick: 999,
|
||||
entities: vec![
|
||||
VisibleEntity { entity_id: 1, x: 5.0, y: 10.0, z: 0, kind: EntityKind::Npc },
|
||||
VisibleEntity { entity_id: 2, x: 15.5, y: 3.0, z: 1, kind: EntityKind::Object },
|
||||
VisibleEntity { entity_id: 3, x: 0.0, y: 0.0, z: -1, kind: EntityKind::Terrain },
|
||||
VisibleEntity {
|
||||
entity_id: 1,
|
||||
x: 5.0,
|
||||
y: 10.0,
|
||||
z: 0,
|
||||
kind: EntityKind::Npc,
|
||||
},
|
||||
VisibleEntity {
|
||||
entity_id: 2,
|
||||
x: 15.5,
|
||||
y: 3.0,
|
||||
z: 1,
|
||||
kind: EntityKind::Object,
|
||||
},
|
||||
VisibleEntity {
|
||||
entity_id: 3,
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: -1,
|
||||
kind: EntityKind::Terrain,
|
||||
},
|
||||
],
|
||||
};
|
||||
write_fixture("snapshot_multi_entity", &rmp_serde::to_vec_named(&snapshot_multi).unwrap());
|
||||
write_fixture(
|
||||
"snapshot_multi_entity",
|
||||
&rmp_serde::to_vec_named(&snapshot_multi).unwrap(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user