diff --git a/data/core/game_balance.json b/data/core/game_balance.json index 71941491ace40..c90c6f2311de3 100644 --- a/data/core/game_balance.json +++ b/data/core/game_balance.json @@ -341,5 +341,12 @@ "info": "Determines frequency (in minutes) of displaying music description in sidebar when listening to MP3-players and the like.", "stype": "int", "value": 5 + }, + { + "type": "EXTERNAL_OPTION", + "name": "ETERNAL_WEATHER", + "info": "Sets eternal weather. Possible values are 'normal', 'clear', 'cloudy', 'light_drizzle', 'drizzle', 'rain', 'rainstorm', 'thunder', 'lightning', 'flurries', 'snowing', 'snowstorm', 'early_portal_storm', 'portal_storm'. 'normal' clears all eternal weather overrides and sets normal weather pattern. Requires restart of the game after changing value to take effect.", + "stype": "string_input", + "value": "normal" } ] diff --git a/src/do_turn.cpp b/src/do_turn.cpp index ed5b7454ce4e9..58c0cdddf03b1 100644 --- a/src/do_turn.cpp +++ b/src/do_turn.cpp @@ -599,7 +599,7 @@ bool do_turn() return turn_handler::cleanup_at_end(); } // Actual stuff - if( g-> new_game ) { + if( g->new_game ) { g->new_game = false; } else { g->gamemode->per_turn(); @@ -609,6 +609,15 @@ bool do_turn() play_music( music::get_music_id_string() ); weather_manager &weather = get_weather(); + if( get_option( "ETERNAL_WEATHER" ) != "normal" ) { + weather.weather_override = static_cast + ( get_option( "ETERNAL_WEATHER" ) ); + weather.set_nextweather( calendar::turn ); + } else { + weather.weather_override = WEATHER_NULL; + weather.set_nextweather( calendar::turn ); + } + // starting a new turn, clear out temperature cache weather.temperature_cache.clear(); diff --git a/src/main_menu.cpp b/src/main_menu.cpp index 0178e7a97e4fd..896ad922a509e 100644 --- a/src/main_menu.cpp +++ b/src/main_menu.cpp @@ -871,6 +871,13 @@ bool main_menu::opening_screen() } if( start && !load_game && get_scenario() ) { add_msg( get_scenario()->description( player_character.male ) ); + + if( get_option( "ETERNAL_WEATHER" ) != "normal" ) { + if( player_character.posz() >= 0 ) { + add_msg( _( "You feel as if this %1$s will last forever…" ), + get_options().get_option( "ETERNAL_WEATHER" ).getValueName() ); + } + } } return true; }