/// <summary>Get the data to display for this subject.</summary>
        public override IEnumerable <ICustomField> GetData()
        {
            MovieConcession item = this.Target;

            // date's taste
            NPC date = Game1.player.team.movieInvitations.FirstOrDefault(p => p.farmer == Game1.player)?.invitedNPC;

            if (date != null)
            {
                string taste = MovieTheater.GetConcessionTasteForCharacter(date, item);
                yield return(new GenericField(this.GameHelper, L10n.MovieSnack.Preference(), L10n.MovieSnack.ForTaste(taste, date.Name)));
            }
        }
Beispiel #2
0
        protected void _ParseCharacterResponse(StringBuilder sb, Character responding_character, bool ignoreScript = false)
        {
            string response = MovieTheater.GetResponseForMovie(responding_character as NPC);

            if (_whiteListDependencyLookup.ContainsKey(responding_character))
            {
                response = MovieTheater.GetResponseForMovie(_whiteListDependencyLookup[responding_character] as NPC);
            }
            if (!(response == "love"))
            {
                if (!(response == "like"))
                {
                    if (response == "dislike")
                    {
                        sb.Append("/friendship " + responding_character.Name + " " + 0);
                        if (!ignoreScript)
                        {
                            sb.Append("/playSound newArtifact/emote " + (string)responding_character.name + " " + 24 + "/message \"" + Game1.content.LoadString("Strings\\Characters:MovieTheater_DislikeMovie", responding_character.displayName) + "\"");
                        }
                    }
                }
                else
                {
                    sb.Append("/friendship " + responding_character.Name + " " + 100);
                    if (!ignoreScript)
                    {
                        sb.Append("/playSound give_gift/emote " + (string)responding_character.name + " " + 56 + "/message \"" + Game1.content.LoadString("Strings\\Characters:MovieTheater_LikeMovie", responding_character.displayName) + "\"");
                    }
                }
            }
            else
            {
                sb.Append("/friendship " + responding_character.Name + " " + 200);
                if (!ignoreScript)
                {
                    sb.Append("/playSound reward/emote " + (string)responding_character.name + " " + 20 + "/message \"" + Game1.content.LoadString("Strings\\Characters:MovieTheater_LoveMovie", responding_character.displayName) + "\"");
                }
            }
            if (_concessionsData != null && _concessionsData.ContainsKey(responding_character))
            {
                MovieConcession             concession          = _concessionsData[responding_character];
                string                      concession_response = MovieTheater.GetConcessionTasteForCharacter(responding_character, concession);
                string                      gender_tag          = "";
                Dictionary <string, string> NPCDispositions     = Game1.content.Load <Dictionary <string, string> >("Data\\NPCDispositions");
                if (NPCDispositions.ContainsKey(responding_character.name))
                {
                    string[] disposition = NPCDispositions[responding_character.name].Split('/');
                    if (disposition[4] == "female")
                    {
                        gender_tag = "_Female";
                    }
                    else if (disposition[4] == "male")
                    {
                        gender_tag = "_Male";
                    }
                }
                string sound = "eat";
                if (concession.tags != null && concession.tags.Contains("Drink"))
                {
                    sound = "gulp";
                }
                if (!(concession_response == "love"))
                {
                    if (!(concession_response == "like"))
                    {
                        if (concession_response == "dislike")
                        {
                            sb.Append("/friendship " + responding_character.Name + " " + 0);
                            sb.Append("/playSound croak/pause 1000");
                            sb.Append("/playSound newArtifact/emote " + (string)responding_character.name + " " + 40 + "/message \"" + Game1.content.LoadString("Strings\\Characters:MovieTheater_DislikeConcession" + gender_tag, responding_character.displayName, concession.DisplayName) + "\"");
                        }
                    }
                    else
                    {
                        sb.Append("/friendship " + responding_character.Name + " " + 25);
                        sb.Append("/tossConcession " + responding_character.Name + " " + concession.id + "/pause 1000");
                        sb.Append("/playSound " + sound + "/shake " + responding_character.Name + " 500/pause 1000");
                        sb.Append("/playSound give_gift/emote " + (string)responding_character.name + " " + 56 + "/message \"" + Game1.content.LoadString("Strings\\Characters:MovieTheater_LikeConcession" + gender_tag, responding_character.displayName, concession.DisplayName) + "\"");
                    }
                }
                else
                {
                    sb.Append("/friendship " + responding_character.Name + " " + 50);
                    sb.Append("/tossConcession " + responding_character.Name + " " + concession.id + "/pause 1000");
                    sb.Append("/playSound " + sound + "/shake " + responding_character.Name + " 500/pause 1000");
                    sb.Append("/playSound reward/emote " + (string)responding_character.name + " " + 20 + "/message \"" + Game1.content.LoadString("Strings\\Characters:MovieTheater_LoveConcession" + gender_tag, responding_character.displayName, concession.DisplayName) + "\"");
                }
            }
            _characterResponses[responding_character] = response;
        }