public override string Print(bool link = true, DwarfObject pov = null) { string eventString = GetYearTime(); eventString += Spotter?.ToLink(true, pov) ?? "An unknown creature"; if (SiteCiv != null) { eventString += " of "; eventString += SiteCiv.ToLink(true, pov); } eventString += " spotted the forces"; if (LeaverCiv != null) { eventString += " of "; eventString += LeaverCiv.ToLink(true, pov); } eventString += " slipping out"; if (Site != null) { eventString += " of "; eventString += Site.ToLink(true, pov); } eventString += PrintParentCollection(link, pov); eventString += "."; return(eventString); }
public override string Print(bool link = true, DwarfObject pov = null) { string eventString = GetYearTime(); eventString += Spotter.ToLink(true, pov); eventString += " of "; eventString += SiteCiv.ToLink(true, pov); eventString += " spotted the forces of "; eventString += LeaverCiv?.ToLink(true, pov) ?? "an unknown civilization"; eventString += " slipping out of "; eventString += Site?.ToLink(true, pov); eventString += PrintParentCollection(link, pov); eventString += "."; return(eventString); }
public SpottedLeavingSite(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "spotter_hfid": Spotter = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "leaver_civ_id": LeaverCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_civ_id": SiteCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; } } Spotter.AddEvent(this); LeaverCiv.AddEvent(this); SiteCiv.AddEvent(this); Site.AddEvent(this); }