Ejemplo n.º 1
0
        public override string Print(bool link = true, DwarfObject pov = null)
        {
            string eventString = GetYearTime();

            if (Woundee != null)
            {
                eventString += Woundee.ToLink(link, pov, this);
            }
            else
            {
                eventString += "UNKNOWN HISTORICAL FIGURE";
            }

            eventString += " was wounded by ";
            if (Wounder != null)
            {
                eventString += Wounder.ToLink(link, pov, this);
            }
            else
            {
                eventString += "UNKNOWN HISTORICAL FIGURE";
            }

            if (Site != null)
            {
                eventString += " in " + Site.ToLink(link, pov, this);
            }
            else if (Region != null)
            {
                eventString += " in " + Region.ToLink(link, pov, this);
            }
            else if (UndergroundRegion != null)
            {
                eventString += " in " + UndergroundRegion.ToLink(link, pov, this);
            }

            if (WasTorture)
            {
                eventString += " as a means of torture";
            }

            eventString += PrintParentCollection(link, pov);
            eventString += ".";
            return(eventString);
        }
Ejemplo n.º 2
0
        public HfWounded(List <Property> properties, World world)
            : base(properties, world)
        {
            foreach (Property property in properties)
            {
                switch (property.Name)
                {
                case "woundee_hfid": Woundee = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break;

                case "wounder_hfid": Wounder = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break;

                case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break;

                case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break;

                case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break;

                case "woundee": if (Woundee == null)
                    {
                        Woundee = world.GetHistoricalFigure(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "wounder": if (Wounder == null)
                    {
                        Wounder = world.GetHistoricalFigure(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "site": if (Site == null)
                    {
                        Site = world.GetSite(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "woundee_race": WoundeeRace = Convert.ToInt32(property.Value); break;

                case "woundee_caste": WoundeeCaste = Convert.ToInt32(property.Value); break;

                case "body_part": BodyPart = Convert.ToInt32(property.Value); break;

                case "injury_type": InjuryType = Convert.ToInt32(property.Value); break;

                case "part_lost": PartLost = Convert.ToInt32(property.Value); break;

                case "was_torture":
                    property.Known = true;
                    WasTorture     = true;
                    break;
                }
            }

            Woundee.AddEvent(this);
            if (Woundee != Wounder)
            {
                Wounder.AddEvent(this);
            }
            Site.AddEvent(this);
            Region.AddEvent(this);
            UndergroundRegion.AddEvent(this);
        }