From 1c532a480531d8e35584ccaa6654fda1a701ce83 Mon Sep 17 00:00:00 2001 From: AnotherCommander Date: Sun, 9 Jul 2017 16:45:11 +0200 Subject: [PATCH] Attempted fix for issue #239. Entering the F7 screen will change the sun light color to that of the info system, entering any other screen will reset the local sun light color. --- src/Core/Entities/PlayerEntity.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Core/Entities/PlayerEntity.m b/src/Core/Entities/PlayerEntity.m index d7317f8d..c5e142bc 100644 --- a/src/Core/Entities/PlayerEntity.m +++ b/src/Core/Entities/PlayerEntity.m @@ -9878,6 +9878,18 @@ static NSString *last_outfitting_key=nil; break; } + + if (toScreen == GUI_SCREEN_SYSTEM_DATA) + { + // system data screen: ensure correct sun light color is used on miniature planet + [[UNIVERSE sun] setSunColor:[OOColor colorWithDescription:[[UNIVERSE systemManager] getProperty:@"sun_color" forSystem:info_system_id inGalaxy:[self galaxyNumber]]]]; + } + else + { + // any other screen: reset local sun light color + [[UNIVERSE sun] setSunColor:[OOColor colorWithDescription:[[UNIVERSE systemManager] getProperty:@"sun_color" forSystem:system_id inGalaxy:[self galaxyNumber]]]]; + } + if (![[UNIVERSE gameController] isGamePaused]) { JSContext *context = OOJSAcquireContext();