Exemplo n.º 1
0
        private string BuildScript(string currentSystem, bool expeditionSystem)
        {
            string script = _scanCompletePhrases.GetRandomPhrase();

            if (!expeditionSystem)
            {
                return(script);
            }

            if (_navigator.GetSystem(currentSystem).Celestials.Any(c => c.Scanned == false))
            {
                int scansRemaining = _navigator.GetRemainingCelestials(currentSystem).Count();

                if (scansRemaining == 1)
                {
                    return(script += _oneRemainingPhrases.GetRandomPhrase());
                }

                return(script += _multipleRemainingPhrases.GetRandomPhraseWith(scansRemaining));
            }

            if (_navigator.ExpeditionComplete)
            {
                return(script += _expeditionCompletePhrases.GetRandomPhrase());
            }

            return(script += _allScansCompletePhrases.GetRandomPhrase());
        }
        private string BuildScript(string currentSystem, bool expeditionSystem)
        {
            string script = _surfaceScanCompletePhrases.GetRandomPhrase();

            if (!expeditionSystem)
            {
                return(script);
            }

            if (_navigator.GetSystem(currentSystem).Celestials.Any(c => c.SurfaceScanned == false))
            {
                int scansRemaining = _navigator.GetRemainingCelestials(currentSystem, onlySurfaceScans: true).Count();

                if (scansRemaining == 1)
                {
                    return(script += _oneSurfaceRemainingPhrases.GetRandomPhrase());
                }

                return(script += _multipleSurfacesRemainingPhrases.GetRandomPhraseWith(scansRemaining));
            }

            if (_navigator.ExpeditionComplete)
            {
                script += _expeditionCompletePhrases.GetRandomPhrase();
                script += _expeditionValuePhrases.GetRandomPhraseWith(_navigator.ValueForExpedition().ToSpeakableString());
                if (!String.IsNullOrEmpty(_playerStatus.Destination))
                {
                    script += _finalDestinationPhrases.GetRandomPhrase();
                }

                return(script);
            }

            script += _allSurfaceScansCompletePhrases.GetRandomPhrase();
            return(script += _expeditionValuePhrases.GetRandomPhraseWith(_navigator.ValueForExpedition().ToSpeakableString()));
        }
Exemplo n.º 3
0
        private string BuildScript(string currentSystem, string celestialName)
        {
            string script = _scanCompletePhrases.GetRandomPhrase();

            StarSystem system = _navigator.GetSystem(currentSystem);
            bool       exhaustedCelestialType = false;

            if (system.Celestials.Any(c => c.Scanned == false))
            {
                Celestial celestial = system.Celestials.First(c => c.Name == celestialName);
                if (celestial != null)
                {
                    // See if there are any more of the same celestial type
                    if (!system.Celestials.Any(c => c.Scanned == false && c.Classification == celestial.Classification))
                    {
                        // We've scanned all the planets of this classification

                        exhaustedCelestialType = true;
                        // "You've completed all the Terraformable water worlds."
                        script += _classificationCompletePhrases.GetRandomPhraseWith(celestial.LongClassification(_values));
                    }
                }

                List <Celestial> remainingCelestials = _navigator.GetRemainingCelestials(currentSystem);
                int scansRemaining = remainingCelestials.Count();

                if (scansRemaining == 1)
                {
                    script += _oneRemainingPhrases.GetRandomPhrase();
                    if (exhaustedCelestialType)
                    {
                        // "1 scan remains, a high metal content planet."
                        script += " a " + remainingCelestials.First().LongClassification(_values);
                    }
                }
                else
                {
                    script += _multipleRemainingPhrases.GetRandomPhraseWith(scansRemaining);
                    if (exhaustedCelestialType)
                    {
                        // "2 scans remain, 2 high metal content planets."
                        script += _navigator.SpokenCelestialList(remainingCelestials);
                    }
                }

                return(script);
            }

            if (_navigator.ExpeditionComplete)
            {
                script += _expeditionCompletePhrases.GetRandomPhrase();
                if (!String.IsNullOrEmpty(_playerStatus.Destination))
                {
                    script += _finalDestinationPhrases.GetRandomPhrase();
                }

                return(script);
            }

            script += _allScansCompletePhrases.GetRandomPhrase();
            script += _switchtoSurfacesPhrases.GetRandomPhrase();
            script += _systemValuePhrases.GetRandomPhraseWith(_navigator.ValueForSystem(currentSystem).ToSpeakableString());
            return(script);
        }