|
|
|
|
@ -191,7 +191,7 @@ fn start_dialog(
|
|
|
|
|
debug!("Click event detected in start dialog systme");
|
|
|
|
|
if let Ok(TreeMonologue(id)) = query.get(event.entity) {
|
|
|
|
|
debug!("Tree Monologue received, sending start dialog event");
|
|
|
|
|
dialog_events.write(DialogEvent::Start(event.entity, id.clone()));
|
|
|
|
|
dialog_events.write(DialogEvent::Start(event.entity, *id));
|
|
|
|
|
dialog_events.write(DialogEvent::NextBatch);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
@ -246,7 +246,7 @@ fn dialog_engine(
|
|
|
|
|
next_state.set(DialogState::Ongoing);
|
|
|
|
|
|
|
|
|
|
// Copy monologue asset into local
|
|
|
|
|
*asset_id = id.clone();
|
|
|
|
|
*asset_id = *id;
|
|
|
|
|
*tree_entity = Some(*e);
|
|
|
|
|
}
|
|
|
|
|
DialogEvent::NextBatch => {
|
|
|
|
|
@ -254,7 +254,7 @@ fn dialog_engine(
|
|
|
|
|
|
|
|
|
|
commands.entity(*dialog_box).with_children(|parent| {
|
|
|
|
|
// Fetch this monologue from the assets
|
|
|
|
|
if let Some(monologue) = monologues.get(asset_id.clone()) {
|
|
|
|
|
if let Some(monologue) = monologues.get(*asset_id) {
|
|
|
|
|
// Fetch this batch of options
|
|
|
|
|
if let Some(batch) = monologue.get(*idx) {
|
|
|
|
|
// Spawn the dialog options in the dialog box
|
|
|
|
|
@ -443,7 +443,7 @@ fn handle_plant_tree(
|
|
|
|
|
tree.insert((mesh, material, transform));
|
|
|
|
|
|
|
|
|
|
if let Some(id) = assignment {
|
|
|
|
|
assignments.write(AssignMonologue(id.clone()));
|
|
|
|
|
assignments.write(AssignMonologue(*id));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|