Skip to content

Commit 5d8e7d0

Browse files
committed
feat(gantz): register await and sleep in the app node set
Adds both types to the app codec, the builtin name-set gate, the node-set wire cases (bare await, bare sleep and a custom duration) and two deliberate new content-address pins.
1 parent 1b76629 commit 5d8e7d0

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

crates/gantz/src/node.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ pub fn codec() -> gantz_egui::node::NodeCodec {
3939
gantz_egui::node::Comment,
4040
bevy_gantz_egui::node::UpdateBang,
4141
bevy_gantz_egui::node::TickBang,
42+
bevy_gantz_egui::node::Await,
43+
bevy_gantz_egui::node::Sleep,
4244
gantz_egui::node::Inspect,
4345
gantz_egui::node::Plot,
4446
gantz_plyphon::UnitNode,
@@ -184,6 +186,7 @@ mod tests {
184186
fn builtins_match_expected_name_set() {
185187
let mut expected = vec![
186188
"apply",
189+
"await",
187190
"bang",
188191
"branch",
189192
"comment",
@@ -197,6 +200,7 @@ mod tests {
197200
"number",
198201
"outlet",
199202
"plot",
203+
"sleep",
200204
"tick!",
201205
"update!",
202206
"~bus",
@@ -257,6 +261,9 @@ mod tests {
257261
node_datum("Bang", vec![]),
258262
node_datum("Inspect", vec![]),
259263
node_datum("UpdateBang", vec![]),
264+
node_datum("Await", vec![]),
265+
node_datum("Sleep", vec![]),
266+
node_datum("Sleep", vec![("duration", Datum::F64(0.25))]),
260267
node_datum(
261268
"TickBang",
262269
vec![(
@@ -511,6 +518,10 @@ mod tests {
511518
"Apply",
512519
"7efc434b814bf22f86e51c95a525c335b050cefe38a37598dd45bce0f1ebfde4",
513520
),
521+
(
522+
"Await",
523+
"ae7e6f2aa5a151e730875311da2eaddb271ccf2b21b8043e5a2dc2a36b036e08",
524+
),
514525
(
515526
"Bang",
516527
"ac2f4e3d47c7b69a188da461568e9c9c013d1458f68a259ad3c64c3e4055c825",
@@ -587,6 +598,10 @@ mod tests {
587598
"ScopeOut",
588599
"f52e55d37ad94f3c6bd37c78f55282f8b8e934c8f26e075cd1afb32a5eee133c",
589600
),
601+
(
602+
"Sleep",
603+
"c2b64d4e118478d3be0f7c5eca933105fafbd788e8ca05e0736e28d9d4e317eb",
604+
),
590605
(
591606
"Sum",
592607
"80658975450345544a9d54870972ef3ffe60d100778adbee6113455963254389",

0 commit comments

Comments
 (0)