dialog WIP paths consolidation and rendering

This commit is contained in:
Jonas H
2026-03-28 10:34:19 +01:00
parent 4c3ebca96e
commit 11b31169b1
70 changed files with 2658 additions and 485 deletions

View File

@@ -1,8 +1,14 @@
use std::collections::HashMap;
use crate::components::dialog::{
DialogBubbleComponent, DialogOutcomeEvent, DialogProjectileComponent, DialogSourceComponent,
};
use crate::components::dissolve::DissolveComponent;
use crate::components::follow::FollowComponent;
use crate::components::lights::spot::SpotlightComponent;
use crate::components::player_states::{
FallingState, IdleState, JumpingState, LeapingState, RollingState, WalkingState,
};
use crate::components::tree_instances::TreeInstancesComponent;
use crate::components::trigger::{TriggerComponent, TriggerEvent};
use crate::components::{
@@ -79,6 +85,12 @@ pub struct World
pub inputs: Storage<InputComponent>,
pub player_tags: Storage<()>,
pub state_machines: Storage<StateMachine>,
pub idle_states: Storage<IdleState>,
pub walking_states: Storage<WalkingState>,
pub jumping_states: Storage<JumpingState>,
pub falling_states: Storage<FallingState>,
pub leaping_states: Storage<LeapingState>,
pub rolling_states: Storage<RollingState>,
pub cameras: Storage<CameraComponent>,
pub spotlights: Storage<SpotlightComponent>,
pub tree_tags: Storage<()>,
@@ -89,6 +101,12 @@ pub struct World
pub names: Storage<String>,
pub triggers: Storage<TriggerComponent>,
pub trigger_events: Vec<TriggerEvent>,
pub dialog_sources: Storage<DialogSourceComponent>,
pub dialog_bubbles: Storage<DialogBubbleComponent>,
pub dialog_projectiles: Storage<DialogProjectileComponent>,
pub bubble_tags: Storage<()>,
pub projectile_tags: Storage<()>,
pub dialog_outcomes: Vec<DialogOutcomeEvent>,
}
impl World
@@ -105,6 +123,12 @@ impl World
inputs: Storage::new(),
player_tags: Storage::new(),
state_machines: Storage::new(),
idle_states: Storage::new(),
walking_states: Storage::new(),
jumping_states: Storage::new(),
falling_states: Storage::new(),
leaping_states: Storage::new(),
rolling_states: Storage::new(),
cameras: Storage::new(),
spotlights: Storage::new(),
tree_tags: Storage::new(),
@@ -115,6 +139,12 @@ impl World
names: Storage::new(),
triggers: Storage::new(),
trigger_events: Vec::new(),
dialog_sources: Storage::new(),
dialog_bubbles: Storage::new(),
dialog_projectiles: Storage::new(),
bubble_tags: Storage::new(),
projectile_tags: Storage::new(),
dialog_outcomes: Vec::new(),
}
}
@@ -133,6 +163,12 @@ impl World
self.inputs.remove(entity);
self.player_tags.remove(entity);
self.state_machines.remove(entity);
self.idle_states.remove(entity);
self.walking_states.remove(entity);
self.jumping_states.remove(entity);
self.falling_states.remove(entity);
self.leaping_states.remove(entity);
self.rolling_states.remove(entity);
self.cameras.remove(entity);
self.spotlights.remove(entity);
self.tree_tags.remove(entity);
@@ -142,6 +178,11 @@ impl World
self.tree_instances.remove(entity);
self.names.remove(entity);
self.triggers.remove(entity);
self.dialog_sources.remove(entity);
self.dialog_bubbles.remove(entity);
self.dialog_projectiles.remove(entity);
self.bubble_tags.remove(entity);
self.projectile_tags.remove(entity);
self.entities.despawn(entity);
}