Repository: doukutsu-rs/doukutsu-rs (language: rust)

Issue:
Pixel Birthday Easteregg
Since most ports give you a little reminder of his birthday on April 29th, would be nice to have something of it's own built in.


Discussion / hints:

Fix patch:
diff --git a/src/engine_constants/mod.rs b/src/engine_constants/mod.rs
index 3d7af8f1..1786e672 100644
--- a/src/engine_constants/mod.rs
+++ b/src/engine_constants/mod.rs
@@ -1609,6 +1609,7 @@ impl EngineConstants {
                 "toroko".to_owned(),
                 "white".to_owned(),
                 "kaze".to_owned(),
+                "ika".to_owned(),
             ],
             organya_paths: vec![
                 "/org/".to_owned(),          // NXEngine
diff --git a/src/scene/title_scene.rs b/src/scene/title_scene.rs
index 0fd4523c..382980d2 100644
--- a/src/scene/title_scene.rs
+++ b/src/scene/title_scene.rs
@@ -13,7 +13,7 @@ use crate::menu::settings_menu::SettingsMenu;
 use crate::menu::{Menu, MenuEntry, MenuSelectionResult};
 use crate::scene::jukebox_scene::JukeboxScene;
 use crate::scene::Scene;
-use crate::shared_game_state::{GameDifficulty, MenuCharacter, ReplayState, SharedGameState, TileSize};
+use crate::shared_game_state::{GameDifficulty, MenuCharacter, ReplayState, Season, SharedGameState, TileSize};
 use crate::stage::{BackgroundType, NpcType, Stage, StageData, StageTexturePaths, Tileset};
 
 #[derive(PartialEq, Eq, Copy, Clone)]
@@ -99,7 +99,7 @@ impl TitleScene {
 
     pub fn update_menu_cursor(&self, state: &mut SharedGameState, ctx: &mut Context) -> GameResult {
         let minutes = self.nikumaru_rec.tick / (60 * state.settings.timing_mode.get_tps());
-        let song_id: usize;
+        let mut song_id: usize;
 
         if self.nikumaru_rec.shown && minutes < 3 {
             state.menu_character = MenuCharacter::Sue;
@@ -118,6 +118,10 @@ impl TitleScene {
             song_id = 24;
         }
 
+        if state.settings.soundtrack == "New" && Season::current() == Season::PixelBirthday {
+            song_id = 43;
+        }
+
         if song_id != state.sound_manager.current_song() {
             state.sound_manager.play_song(song_id, &state.constants, &state.settings, ctx)?;
         }
diff --git a/src/shared_game_state.rs b/src/shared_game_state.rs
index b39c7a77..f4bfe239 100644
--- a/src/shared_game_state.rs
+++ b/src/shared_game_state.rs
@@ -109,6 +109,7 @@ pub enum Season {
     None,
     Halloween,
     Christmas,
+    PixelBirthday,
 }
 
 impl Season {
@@ -119,6 +120,8 @@ impl Season {
             Season::Halloween
         } else if (now.month() == 12 && now.day() > 23) || (now.month() == 0 && now.day() < 7) {
             Season::Christmas
+        } else if (now.month() == 4 && now.day() == 29) {
+            Season::PixelBirthday
         } else {
             Season::None
         }


Test patch: