allow multiple avatars on NPCs, give Luna skirt+nekomimi

This commit is contained in:
yuni 2024-10-10 06:56:09 +02:00
parent 192fdd0cba
commit a27036461a
2 changed files with 23 additions and 0 deletions

View file

@ -125,6 +125,7 @@ struct ParserState {
light_brightness: f32,
light_color: Option<Color>,
ar_model: Option<String>,
ar_model2: Option<String>,
show_only_in_map_at_distance: Option<(f64, String)>,
}
impl Default for ParserState {
@ -186,6 +187,7 @@ impl Default for ParserState {
light_brightness: 0.0,
light_color: None,
ar_model: None,
ar_model2: None,
show_only_in_map_at_distance: None,
}
}
@ -685,6 +687,9 @@ pub fn load_defs(mut ew_spawn: EventWriter<SpawnEvent>) {
["armodel", asset_name] => {
state.ar_model = Some(asset_name.to_string());
}
["armodel_secondary", asset_name] => {
state.ar_model2 = Some(asset_name.to_string());
}
["targeted", "yes"] => {
state.is_targeted_on_startup = true;
}
@ -1182,6 +1187,23 @@ fn spawn_entities(
load_asset(ar_asset_name, &mut entitycmd, &*asset_server);
}
if let Some(ar_asset_name) = &state.ar_model2 {
let mut entitycmd = commands.spawn((
hud::AugmentedRealityOverlay {
owner: actor_entity,
scale: 1.0,
},
world::DespawnOnPlayerDeath,
SpatialBundle {
visibility: Visibility::Hidden,
..default()
},
NotShadowCaster,
NotShadowReceiver,
));
load_asset(ar_asset_name, &mut entitycmd, &*asset_server);
}
if state.is_point_of_interest || state.is_moon || state.is_planet {
let mut entitycmd = commands.spawn((
hud::PointOfInterestMarker(actor_entity),

View file

@ -315,6 +315,7 @@ actor 700 -100 -1100 suitv2
id Luna
chatid Luna
armodel suit_ar_skirt
armodel_secondary suit_ar_nekomimi
angularmomentum 0 0 0
wants maxrotation 0
wants maxvelocity none