public override string Print(bool link = true, DwarfObject pov = null) { string eventString = GetYearTime(); eventString += GroupHf.ToLink(link, pov, this); eventString += " caroused"; if (Structure != null) { eventString += " in "; eventString += Structure.ToLink(link, pov, this); } if (Site != null) { eventString += " in "; eventString += Site.ToLink(link, pov, this); } else if (Region != null) { eventString += " in "; eventString += Region.ToLink(link, pov, this); } else if (UndergroundRegion != null) { eventString += " in "; eventString += UndergroundRegion.ToLink(link, pov, this); } eventString += PrintParentCollection(link, pov); eventString += "."; return(eventString); }
public HfCarouse(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "group_hfid": GroupHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "structure_id": StructureId = 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; } } if (Site != null) { Structure = Site.Structures.FirstOrDefault(structure => structure.Id == StructureId); } GroupHf.AddEvent(this); Site.AddEvent(this); Structure.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }