Exemplo n.º 1
0
        public HfPreach(List <Property> properties, World world) : base(properties, world)
        {
            foreach (Property property in properties)
            {
                switch (property.Name)
                {
                case "speaker_hfid": SpeakerHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break;

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

                case "topic":
                    switch (property.Value)
                    {
                    case "entity 1 should love entity 2":
                        Topic = PreachTopic.Entity1ShouldLoveEntity2;
                        break;

                    case "set entity 1 against entity 2":
                        Topic = PreachTopic.SetEntity1AgainstEntity2;
                        break;

                    default:
                        property.Known = false;
                        break;
                    }
                    break;

                case "entity_1": Entity1 = world.GetEntity(Convert.ToInt32(property.Value)); break;

                case "entity_2": Entity2 = world.GetEntity(Convert.ToInt32(property.Value)); break;
                }
            }

            SpeakerHf.AddEvent(this);
            Site.AddEvent(this);
            Entity1.AddEvent(this);
            Entity2.AddEvent(this);
        }
Exemplo n.º 2
0
        public SiteDispute(List <Property> properties, World world) : base(properties, world)
        {
            foreach (Property property in properties)
            {
                switch (property.Name)
                {
                case "dispute":
                    switch (property.Value)
                    {
                    case "fishing rights":
                        Dispute = Dispute.FishingRights;
                        break;

                    case "grazing rights":
                        Dispute = Dispute.GrazingRights;
                        break;

                    case "livestock ownership":
                        Dispute = Dispute.LivestockOwnership;
                        break;

                    case "territory":
                        Dispute = Dispute.Territory;
                        break;

                    case "water rights":
                        Dispute = Dispute.WaterRights;
                        break;

                    case "rights-of-way":
                        Dispute = Dispute.RightsOfWay;
                        break;

                    default:
                        Dispute         = Dispute.Unknown;
                        _unknownDispute = property.Value;
                        world.ParsingErrors.Report("Unknown Site Dispute: " + _unknownDispute);
                        break;
                    }
                    break;

                case "entity_id_1":
                    Entity1 = world.GetEntity(Convert.ToInt32(property.Value));
                    break;

                case "entity_id_2":
                    Entity2 = world.GetEntity(Convert.ToInt32(property.Value));
                    break;

                case "site_id_1":
                    Site1 = world.GetSite(Convert.ToInt32(property.Value));
                    break;

                case "site_id_2":
                    Site2 = world.GetSite(Convert.ToInt32(property.Value));
                    break;
                }
            }

            Entity1.AddEvent(this);
            Entity2.AddEvent(this);
            Site1.AddEvent(this);
            Site2.AddEvent(this);
        }