17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 18:09:04 +01:00

Let eu07.ini scale how much the moon lights the scenery at night (gfx.moonlight)

This commit is contained in:
2026-10-17 23:10:01 +02:00
parent 41cc966103
commit 7221c153dd
5 changed files with 9 additions and 3 deletions

View File

@@ -1710,6 +1710,7 @@ global_settings::ConfigParse_gfx_sky( cParser &Parser, std::string_view const To
else if( Token == "gfx.stars.brightness" ) { readvalue( gfx_stars_brightness, 0.f, 16.f ); }
else if( Token == "gfx.sun.disc" ) { readvalue( gfx_sun_disc, 0.f, 4.f ); }
else if( Token == "gfx.moon.disc" ) { readvalue( gfx_moon_disc, 0.f, 16.f ); }
else if( Token == "gfx.moonlight" ) { readvalue( gfx_moonlight, 0.f, 10.f ); }
else { return false; }
return true;
@@ -2017,6 +2018,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "gfx.stars.brightness", gfx_stars_brightness );
export_as_text( Output, "gfx.sun.disc", gfx_sun_disc );
export_as_text( Output, "gfx.moon.disc", gfx_moon_disc );
export_as_text( Output, "gfx.moonlight", gfx_moonlight );
export_as_text( Output, "python.enabled", python_enabled );
export_as_text( Output, "python.threadedupload", python_threadedupload );
export_as_text( Output, "python.uploadmain", python_uploadmain );

View File

@@ -404,6 +404,8 @@ struct global_settings {
// and of the moon disc
float gfx_sun_disc { 1.f };
float gfx_moon_disc { 1.f };
// how much the moon lights the scenery at night (its direct light, the night light that comes with it and the moonlit sky)
float gfx_moonlight { 1.f };
float ui_fontsize = 13.0f;
float ui_scale = 1.0f;