Skip to content

Commit

Permalink
Attempted fix for issue #239. Entering the F7 screen will change the …
Browse files Browse the repository at this point in the history
…sun light color to that of the info system, entering any other screen will reset the local sun light color.
  • Loading branch information
AnotherCommander committed Jul 9, 2017
1 parent 42fc5de commit 1c532a4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Core/Entities/PlayerEntity.m
Original file line number Diff line number Diff line change
Expand Up @@ -9878,6 +9878,18 @@ - (void) noteGUIDidChangeFrom:(OOGUIScreenID)fromScreen to:(OOGUIScreenID)toScre
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();
Expand Down

0 comments on commit 1c532a4

Please sign in to comment.