Skip to content

Commit

Permalink
Add guitar sound effect for RockstarDev
Browse files Browse the repository at this point in the history
  • Loading branch information
necrashter committed Dec 10, 2023
1 parent 99452c1 commit 57e558c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
Binary file added assets/audio/guitar0.ogg
Binary file not shown.
Binary file added assets/audio/guitar1.ogg
Binary file not shown.
Binary file added assets/audio/guitar2.ogg
Binary file not shown.
7 changes: 7 additions & 0 deletions src/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub enum SoundEffectKind {
DefaultUpgrade,
Keyboard,
Backspace,
Guitar,
}

#[derive(AssetCollection, Resource, Reflect, Default)]
Expand All @@ -36,6 +37,11 @@ pub struct AudioAssets {
pub keyboard_sounds: Vec<Handle<AudioSource>>,
#[asset(path = "audio/backspace0.ogg")]
pub backspace_sound: Handle<AudioSource>,
#[asset(
paths("audio/guitar0.ogg", "audio/guitar1.ogg", "audio/guitar2.ogg"),
collection(typed)
)]
pub guitar_sounds: Vec<Handle<AudioSource>>,
#[asset(path = "music/ingame.ogg")]
pub music: Handle<AudioSource>,
}
Expand All @@ -52,6 +58,7 @@ impl AudioAssets {
DefaultUpgrade => select_from!(self.upgrade_sounds),
Keyboard => select_from!(self.keyboard_sounds),
Backspace => self.backspace_sound.clone(),
Guitar => select_from!(self.guitar_sounds),
}
}
}
Expand Down
10 changes: 6 additions & 4 deletions src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,16 +1173,18 @@ generate_upgrade_list!(
const NAMES: [&str; 6] = [
"Rockstar Dev",
"Superstar Dev",
"Hypergiant Dev",
"Neutron Star Dev",
"Black Hole Dev",
"Quasar Dev",
"Megastar Dev",
"Gigastar Dev",
"Terastar Dev",
// "Ultimastar Dev",
"True Rockstar Dev",
];
let mut name_idx = 0;

Upgrade {
name: NAMES[0].to_string(),
desc: "Spawns VALUE entities whenever a line of code is produced.".to_string(),
sound: Some(SoundEffectKind::Guitar),
value: 4.0,
no_count: true,
remaining: 6,
Expand Down

0 comments on commit 57e558c

Please sign in to comment.