protected override FormattableString Display() { var formatBuilder = new FormatBuilder(); formatBuilder.AddLine(Actor.Location.DescriptionForInhabitant(Actor)); formatBuilder.AddLine($"Nearby items:"); foreach (GameObject item in Actor.Location.NearbyObjects(Actor.SightRange)) { formatBuilder.AddLine(item.ShortDescription(Actor)); } return(formatBuilder.Build()); }
protected override FormattableString Display() { var formatBuilder = new FormatBuilder(); bool anything = false; formatBuilder.AddLine($"Inventory:"); foreach (GameObject item in Actor.NearbyObjects(Actor.Reach)) { anything = true; formatBuilder.AddLine(item.ShortDescription(Actor)); } if (!anything) { formatBuilder.AddLine($"You have no possessions"); } return(formatBuilder.Build()); }