private void Activate()
    {
        StarmapReconstructionData.StarInfo[] starInfos;
        Starmap answerExample;

        StarmapReconstructionData.GenerateStarmap(BombInfo, out starInfos, out answerExample);
        foreach (StarmapReconstructionData.StarInfo star in starInfos)
        {
            int expectedConnectionsCount = StarmapReconstructionData.GetAdjacentStarsCount(star.race, star.regime, BombInfo);
            Debug.LogFormat("[Starmap Reconstruction #{0}] Star #{1}: {2} {3} {4} ({5})", moduleId, star.id, star.name, star.race, star.regime, expectedConnectionsCount);
        }
        Debug.LogFormat("[Starmap Reconstruction #{0}] Answer example: {1}", moduleId, answerExample.ToShortString());
        starInfos.Shuffle();
        for (int i = 0; i < STARS_COUNT; i++)
        {
            stars[i].Name              = starInfos[i].name;
            stars[i].Race              = starInfos[i].race;
            stars[i].Regime            = starInfos[i].regime;
            stars[i].Id                = starInfos[i].id;
            stars[i].TwitchPlaysActive = TwitchPlaysActive;
        }
        Array.Sort(stars, (a, b) => a.Id - b.Id);
        ClearButton.OnInteract  += () => { OnClearButtonPressed(); return(false); };
        SubmitButton.OnInteract += () => { OnSubmitButtonPressed(); return(false); };
        activated = true;
    }
    private void OnSubmitButtonPressed()
    {
        if (solved || !activated)
        {
            return;
        }
        Unselect();
        Debug.LogFormat("[Starmap Reconstruction #{0}] Submit pressed", moduleId);
        Starmap map = new Starmap(stars.Length);

        foreach (StarComponent star in stars)
        {
            int expectedAdjacentsCount = StarmapReconstructionData.GetAdjacentStarsCount(star.Race, star.Regime, BombInfo);
            int actualAdjacentsCount   = star.connectedStars.Count;
            if (expectedAdjacentsCount != actualAdjacentsCount)
            {
                Debug.LogFormat("[Starmap Reconstruction #{0}] STRIKE: Star {1} has {2} connected stars. Expected: {3}", moduleId, star.Name, actualAdjacentsCount,
                                expectedAdjacentsCount);
                Module.HandleStrike();
                return;
            }
            foreach (StarComponent other in star.connectedStars)
            {
                map.Add(star.Id, other.Id);
            }
        }
        Debug.LogFormat("[Starmap Reconstruction #{0}] Submitted map: {1}", moduleId, map.ToShortString());
        foreach (StarComponent star in stars)
        {
            KeyValuePair <string, int>?requiredDistance = StarmapReconstructionData.GetRequiredDistanceFrom(star.Name);
            if (requiredDistance == null)
            {
                continue;
            }
            string to = requiredDistance.Value.Key;
            int    expectedDistance = requiredDistance.Value.Value;
            int    otherIndex       = stars.IndexOf(s => s.Name == to);
            if (otherIndex < 0)
            {
                continue;
            }
            StarComponent other          = stars[otherIndex];
            int           actualDistance = map.GetDistance(star.Id, other.Id);
            if (expectedDistance != actualDistance)
            {
                Debug.LogFormat("[Starmap Reconstruction #{0}] STRIKE: Distance from {1} to {2} is {3}. Expected: {4}", moduleId, star.Name, other.Name, actualDistance,
                                expectedDistance);
                Module.HandleStrike();
                return;
            }
        }
        Debug.LogFormat("[Starmap Reconstruction #{0}] Module solved", moduleId);
        solved = true;
        Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.CorrectChime, transform);
        Module.HandlePass();
    }