Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }