actorInventoryListerobject
Standard inventory lister for actors - this will work for the player character and NPC’s as well. This lister uses a “divided” format, which segregates the listing into items being carried and items being worn. We’ll combine the two lists into a single sentence if the overall list is short, otherwise we’ll show two separate sentences for readability.
actorInventoryLister
:
DividedInventoryLister
Superclass Tree (in declaration order)
actorInventoryLister
DividedInventoryLister
InventoryLister
Lister
` object`
Summary of Properties
Inherited from DividedInventoryLister
:
carryingLister
singleSentenceMaxNouns
wearingLister
Inherited from Lister
:
nextCustomFlag
Summary of Methods
countPhrases
showCombinedInventoryList
showInventoryCarryingOnly
showInventoryEmpty
showInventoryLongLists
showInventoryShortLists
showInventoryWearingOnly
showListContentsPrefixTall
showListEmpty
showListPrefixTall
Inherited from DividedInventoryLister
:
showList
Inherited from InventoryLister
:
isListed
showContentsList
showInlineContentsList
showListItem
showListItemCounted
Inherited from Lister
:
contentsListed
contentsListedSeparately
getArrangedListCardinality
getArrangedListNounPhraseCount
getContents
getFilteredList
getListedContents
getListGrouping
getTopLister
listCardinality
listSepEnd
listSepMiddle
listSepTwo
listWith
longListSepEnd
longListSepMiddle
longListSepTwo
showArrangedList
showListAll
showListIndent
showListPrefixWide
showListSeparator
showListSimple
showListSuffixWide
showSeparateContents
showTallListNewline
Properties
phraseSepPat
return the count
Methods
countPhrases (txt)
Count the noun phrases in a string. We’ll count the number of elements in the list as indicated by commas and semicolons. This might not be a perfect count of the actual number of noun phrases, since we could have commas setting off some other kind of clauses, but it nonetheless will give us a good estimate of the overall complexity of the text, which is what we’re really after. The point is that we want to break up the listings if they’re long, but combine them into a single sentence if they’re short.
showCombinedInventoryList (parent, carrying, wearing)
OVERRIDDEN
Show the combined inventory listing, putting together the raw lists of the items being carried and the items being worn.
showInventoryCarryingOnly (parent, carrying)
we’re carrying nothing but wearing some items
showInventoryEmpty (parent)
Once we’ve made up our mind about the format, we’ll call one of these methods to show the final sentence. These are all separate methods so that the individual formats can be easily tweaked without overriding the whole combined-inventory-listing method.
showInventoryLongLists (parent, carrying, wearing)
short lists - combine carried and worn in a single sentence
showInventoryShortLists (parent, carrying, wearing)
we have only carried items to report
showInventoryWearingOnly (parent, wearing)
empty inventory
showListContentsPrefixTall (itemCount, pov, parent)
OVERRIDDEN
no description available
showListEmpty (pov, parent)
OVERRIDDEN
no description available
showListPrefixTall (itemCount, pov, parent)
OVERRIDDEN
For ‘tall’ listings, we’ll use the standard listing style, so we need to provide the framing messages for the tall-mode listing.
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3