You can now get Luna's real, physical cat ears!! 😻
This commit is contained in:
parent
1e19ed5a60
commit
a29b7c8436
26
src/chat.rs
26
src/chat.rs
|
@ -887,10 +887,13 @@ fn handle_reply_keys(
|
|||
}
|
||||
|
||||
pub fn handle_chat_scripts(
|
||||
mut commands: Commands,
|
||||
asset_server: Res<AssetServer>,
|
||||
mut er_chatscript: EventReader<ChatScriptEvent>,
|
||||
mut q_actor: Query<(&mut actor::Actor, &mut actor::Suit), Without<actor::Player>>,
|
||||
mut q_player: Query<
|
||||
(
|
||||
Entity,
|
||||
&mut actor::Actor,
|
||||
&mut actor::Suit,
|
||||
&mut actor::ExperiencesGForce,
|
||||
|
@ -906,6 +909,7 @@ pub fn handle_chat_scripts(
|
|||
mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
|
||||
mut ew_achievement: EventWriter<game::AchievementEvent>,
|
||||
mut ew_playerdies: EventWriter<game::PlayerDiesEvent>,
|
||||
mut vars: ResMut<var::GameVars>,
|
||||
id2pos: Res<game::Id2Pos>,
|
||||
id2v: Res<game::Id2V>,
|
||||
) {
|
||||
|
@ -925,7 +929,7 @@ pub fn handle_chat_scripts(
|
|||
match name {
|
||||
"refilloxygen" => {
|
||||
if let Ok(mut amount) = param1.to_string().parse::<f32>() {
|
||||
for (_, mut suit, _) in q_player.iter_mut() {
|
||||
for (_, _, mut suit, _) in q_player.iter_mut() {
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Refill));
|
||||
if param2.is_empty() {
|
||||
suit.oxygen = (suit.oxygen + amount).clamp(0.0, suit.oxygen_max);
|
||||
|
@ -958,7 +962,7 @@ pub fn handle_chat_scripts(
|
|||
}
|
||||
"repairsuit" => {
|
||||
ew_achievement.send(game::AchievementEvent::RepairSuit);
|
||||
for (_, mut suit, _) in q_player.iter_mut() {
|
||||
for (_, _, mut suit, _) in q_player.iter_mut() {
|
||||
suit.integrity = 1.0;
|
||||
}
|
||||
}
|
||||
|
@ -1007,7 +1011,7 @@ pub fn handle_chat_scripts(
|
|||
}
|
||||
}
|
||||
}
|
||||
if let Ok((_, mut suit, mut gforce)) = q_player.get_single_mut() {
|
||||
if let Ok((_, _, mut suit, mut gforce)) = q_player.get_single_mut() {
|
||||
suit.oxygen = suit.oxygen_max;
|
||||
gforce.ignore_gforce_seconds = 1.0;
|
||||
}
|
||||
|
@ -1048,6 +1052,22 @@ pub fn handle_chat_scripts(
|
|||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Crash));
|
||||
ew_playerdies.send(game::PlayerDiesEvent(actor::DamageType::Bullet));
|
||||
}
|
||||
"addcatears" => {
|
||||
if let Ok((player_entity, _, _, _)) = q_player.get_single_mut() {
|
||||
let mut entitycmd = commands.spawn((
|
||||
hud::AugmentedRealityOverlay {
|
||||
owner: player_entity,
|
||||
scale: 1.0,
|
||||
always_visible: true,
|
||||
},
|
||||
world::DespawnOnPlayerDeath,
|
||||
SpatialBundle::default(),
|
||||
));
|
||||
load_asset("suit_ar_nekomimi", &mut entitycmd, &*asset_server);
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Crash));
|
||||
vars.set_in_scope("$", "catears", "1".to_string());
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
error!("Error, undefined chat script {name}");
|
||||
}
|
||||
|
|
|
@ -913,6 +913,16 @@
|
|||
sound: cat
|
||||
- Yes.
|
||||
- But I am NOT cute. I am serious and respectable.
|
||||
- if: "~$$catears"
|
||||
Are those cat ears real?:
|
||||
- Yes! They are!
|
||||
- Not just a virtual AR projection.
|
||||
- That's really cool!:
|
||||
- "Thanks :3!"
|
||||
- Can you attach some cat ears to my space suit too?:
|
||||
- script: addcatears
|
||||
- With pleasure!
|
||||
- Got it!: []
|
||||
- Can I ask you some general questions?:
|
||||
- ... No.
|
||||
- Bye!:
|
||||
|
|
Loading…
Reference in a new issue