예제 #1
0
        public override string Print(bool link = true, DwarfObject pov = null)
        {
            string eventString = GetYearTime();

            eventString += Civ != null?Civ.ToLink(link, pov, this) : "UNKNOWN CIV";

            eventString += " held a ";
            if (Schedule != null)
            {
                if (!string.IsNullOrWhiteSpace(Schedule.ItemType) || !string.IsNullOrWhiteSpace(Schedule.ItemSubType))
                {
                    eventString += !string.IsNullOrWhiteSpace(Schedule.ItemSubType) ? Schedule.ItemSubType : Schedule.ItemType;
                    eventString += " ";
                }
            }
            eventString += Schedule?.Type.GetDescription().ToLower() ?? OccasionType.ToString().ToLower();
            if (ReferencedArtForm != null)
            {
                eventString += " of ";
                eventString += ReferencedArtForm.ToLink(link, pov, this);
            }
            else if (Schedule != null && Schedule.Type == ScheduleType.Storytelling && Schedule.Reference != -1)
            {
                WorldEvent worldEvent = World.GetEvent(Schedule.Reference);
                if (worldEvent is IFeatured featured)
                {
                    eventString += " of ";
                    eventString += featured.PrintFeature();
                }
            }
            eventString += " in ";
            eventString += Site != null?Site.ToLink(link, pov, this) : "UNKNOWN SITE";

            eventString += " as part of ";
            eventString += EntityOccasion != null?EntityOccasion.ToLink(link, pov, this) : "UNKNOWN OCCASION";

            eventString += ".";
            if (Schedule != null)
            {
                switch (Schedule.Type)
                {
                case ScheduleType.Procession:
                    Structure startStructure = Site.Structures.FirstOrDefault(s => s.Id == Schedule.Reference);
                    Structure endStructure   = Site.Structures.FirstOrDefault(s => s.Id == Schedule.Reference2);
                    if (startStructure != null || endStructure != null)
                    {
                        eventString += " It started at ";
                        eventString += startStructure != null?startStructure.ToLink(link, pov, this) : "UNKNOWN STRUCTURE";

                        eventString += " and ended at ";
                        eventString += endStructure != null?endStructure.ToLink(link, pov, this) : "UNKNOWN STRUCTURE";

                        eventString += ".";
                    }
                    break;
                }
            }
            return(eventString);
        }
예제 #2
0
        public override string Print(bool link = true, DwarfObject pov = null)
        {
            string eventString = GetYearTime();

            eventString += Civ != null?Civ.ToLink(link, pov) : "UNKNOWN CIV";

            eventString += " held a ";
            if (Schedule != null)
            {
                if (!string.IsNullOrWhiteSpace(Schedule.ItemType) || !string.IsNullOrWhiteSpace(Schedule.ItemSubType))
                {
                    eventString += !string.IsNullOrWhiteSpace(Schedule.ItemSubType) ? Schedule.ItemSubType : Schedule.ItemType;
                    eventString += " ";
                }
            }
            eventString += Schedule != null?Schedule.Type.GetDescription().ToLower() : OccasionType.ToString().ToLower();

            if (Schedule != null)
            {
                switch (Schedule.Type)
                {
                case ScheduleType.PoetryRecital:
                    if (Schedule.Reference != -1)
                    {
                        PoeticForm form = World.GetPoeticForm(Schedule.Reference);
                        eventString += " of ";
                        eventString += form != null?form.ToLink(link, pov) : "UNKNOWN POETRICFORM";
                    }
                    break;

                case ScheduleType.MusicalPerformance:
                    if (Schedule.Reference != -1)
                    {
                        MusicalForm form = World.GetMusicalForm(Schedule.Reference);
                        eventString += " of ";
                        eventString += form != null?form.ToLink(link, pov) : "UNKNOWN MUSICALFORM";
                    }
                    break;

                case ScheduleType.DancePerformance:
                    if (Schedule.Reference != -1)
                    {
                        DanceForm form = World.GetDanceForm(Schedule.Reference);
                        eventString += " of ";
                        eventString += form != null?form.ToLink(link, pov) : "UNKNOWN DANCEFORM";
                    }
                    break;

                case ScheduleType.Storytelling:
                    if (Schedule.Reference != -1)
                    {
                        WorldEvent worldEvent = World.GetEvent(Schedule.Reference);
                        if (worldEvent is IFeatured)
                        {
                            eventString += " of ";
                            eventString += worldEvent != null ? ((IFeatured)worldEvent).PrintFeature() : "UNKNOWN EVENT";
                        }
                    }
                    break;
                }
            }
            eventString += " in ";
            eventString += Site != null?Site.ToLink(link, pov) : "UNKNOWN SITE";

            eventString += " as part of ";
            eventString += EntityOccasion != null?EntityOccasion.ToLink(link, pov) : "UNKNOWN OCCASION";

            eventString += ".";
            if (Schedule != null)
            {
                switch (Schedule.Type)
                {
                case ScheduleType.Procession:
                    Structure startStructure = Site.Structures.FirstOrDefault(s => s.Id == Schedule.Reference);
                    Structure endStructure   = Site.Structures.FirstOrDefault(s => s.Id == Schedule.Reference2);
                    if (startStructure != null || endStructure != null)
                    {
                        eventString += " It started at ";
                        eventString += startStructure != null?startStructure.ToLink(link, pov) : "UNKNOWN STRUCTURE";

                        eventString += " and ended at ";
                        eventString += endStructure != null?endStructure.ToLink(link, pov) : "UNKNOWN STRUCTURE";

                        eventString += ".";
                    }
                    break;
                }
            }
            return(eventString);
        }