public Occasion(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "civ_id": Civ = world.GetEntity(Convert.ToInt32(property.Value)); break; case "ordinal": Ordinal = string.Intern(property.Value); break; case "occasion_id": OccasionId = Convert.ToInt32(property.Value); break; } } if (Civ != null && Civ.Occassions.Any()) { EntityOccasion = Civ.Occassions.ElementAt(OccasionId); } Civ.AddEventCollection(this); }