You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# usage: look at sword
#=> Look at which sword: wooden sword, iron sword?
# usage: look at wooden sword
#=> This sword clearly isn't as strong as, say, an iron one.
# function definition
String.prototype.capitalize = ->
this.charAt(0).toUpperCase() + this.slice(1)
if $prepstr
switch $iobj
when $nothing
$player.tell "Look " + $prepstr + " what?"
when $ambiguity
$player.tell "Look " + $prepstr + " which " + $iobjstr + ": " + (obj.name for obj in $ambiguity.list).join(", ") + "?"
when $notFound
$player.tell $iobjstr.capitalize + " doesn't seem to exist in this room."
else
$player.tell $iobjstr.description
else
$player.tell $here.description + " Contents: " + (content.name for content in $here.contents).join(", ")
The text was updated successfully, but these errors were encountered:
For instance,
[MooObject ambiguous_match].list
would yield `[ [MooObject wooden sword], [Moo Object iron sword] ]Continuing the example from issue #1:
Example:
The text was updated successfully, but these errors were encountered: