get shot in the head if you steal oxygen from cryopreserved drifter

This commit is contained in:
yuni 2024-11-20 02:40:29 +01:00
parent 395ffd5f58
commit 010b635784
4 changed files with 17 additions and 0 deletions

View file

@ -86,6 +86,7 @@ pub enum DamageType {
Unknown,
Mental,
Trauma,
Bullet,
GForce,
Asphyxiation,
Depressurization,

View file

@ -905,6 +905,7 @@ pub fn handle_chat_scripts(
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
mut ew_achievement: EventWriter<game::AchievementEvent>,
mut ew_playerdies: EventWriter<game::PlayerDiesEvent>,
id2pos: Res<game::Id2Pos>,
id2v: Res<game::Id2V>,
mut prefs: ResMut<Preferences>,
@ -1049,6 +1050,10 @@ pub fn handle_chat_scripts(
prefs.luna_backup = true;
prefs.save()
}
"bullet" => {
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Crash));
ew_playerdies.send(game::PlayerDiesEvent(actor::DamageType::Bullet));
}
_ => {
error!("Error, undefined chat script {name}");
}

View file

@ -14,6 +14,10 @@
- if: "$$quest_pizza_obtained"
Did you order pizza by any chance?:
- system: "[ERROR: no response]"
- "[Leave]":
- goto: EXIT
- "[Harvest some oxygen]":
- script: bullet
---

View file

@ -368,6 +368,13 @@ fn handle_player_death(
duration: 4.0,
});
}
actor::DamageType::Bullet => {
settings.death_cause = "Traumatic brain injury due to a projectile wound.".to_string();
ew_effect.send(visual::SpawnEffectEvent {
class: visual::Effects::FadeIn(css::MAROON.into()),
duration: 1.0,
});
}
actor::DamageType::Mental => {
settings.death_cause = "Brain Damage".to_string();
ew_effect.send(visual::SpawnEffectEvent {