diff --git a/src/commands.rs b/src/commands.rs index 9494572..35174d9 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -44,7 +44,7 @@ struct ParserState { rotation: Quat, velocity: DVec3, angular_momentum: DVec3, - pronoun: String, + pronoun: Option, is_sphere: bool, is_player: bool, is_lifeform: bool, @@ -93,7 +93,7 @@ impl Default for ParserState { rotation: Quat::IDENTITY, velocity: DVec3::splat(0.0), angular_momentum: DVec3::new(0.03, 0.3, 0.09), - pronoun: "they/them".to_string(), + pronoun: None, is_sphere: false, is_player: false, is_lifeform: false, @@ -264,7 +264,7 @@ pub fn load_defs( } } ["pronoun", pronoun] => { - state.pronoun = pronoun.to_string(); + state.pronoun = Some(pronoun.to_string()); } ["chatid", chat] => { state.chat = chat.to_string(); @@ -602,6 +602,7 @@ fn spawn_entities( if state.is_clickable { actor.insert(hud::IsClickable { name: state.name.clone(), + pronoun: state.pronoun.clone(), ..default() }); } @@ -632,7 +633,7 @@ fn spawn_entities( actor_id: state.id.clone(), chat_name: state.chat.clone(), name: state.name.clone(), - pronoun: Some(state.pronoun.clone()), + pronoun: state.pronoun.clone(), talking_speed: 1.0, }); } diff --git a/src/hud.rs b/src/hud.rs index a80c169..1ab1cd4 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -111,10 +111,12 @@ impl Message { #[derive(Component)] pub struct IsClickable { pub name: Option, + pub pronoun: Option, pub distance: Option, } impl Default for IsClickable { fn default() -> Self { Self { name: None, + pronoun: None, distance: None, }}} diff --git a/src/world.rs b/src/world.rs index f786980..63856e3 100644 --- a/src/world.rs +++ b/src/world.rs @@ -161,6 +161,7 @@ pub fn setup( hud::IsClickable { name: Some(name), distance, + ..default() }, PbrBundle { mesh: sphere_handle.clone(),