Beispiel #1
0
 def collapseToText(self, state, obj):
     da = capitalise(self.actor.sdesc)
     dt = capitalise(self.actor.sdesc)
     if not self.text:
         state.sendEventLine("%s turns to %s and opens their mouth, but "
                             "says nothing, as if to catch a fly. Realising"
                             " how silly they look, they promptly clamp "
                             "their jaw shut after a few seconds."
                             % (da, dt))
     else:
         state.sendEventLine('%s says to %s, "%s"' % (da, dt, self.text))
Beispiel #2
0
 def collapseToText(self, state, obj):
     da = capitalise(self.actor.sdesc)
     dt = capitalise(self.actor.sdesc)
     if not self.text:
         state.sendEventLine("%s turns to %s and opens their mouth, but "
                             "says nothing, as if to catch a fly. Realising"
                             " how silly they look, they promptly clamp "
                             "their jaw shut after a few seconds." %
                             (da, dt))
     else:
         state.sendEventLine('%s says to %s, "%s"' % (da, dt, self.text))
Beispiel #3
0
 def collapseToText(self, state, obj):
     state.sendEventLine(self.room.title)
     state.setColourName("room desc")
     state.sendEventLine(self.room.desc)
     state.setColourName("people list")
     peopleList = ["%s is here." % capitalise(obj.sdesc) for obj in self.room.contents]
     state.sendEventLine(" ".join(peopleList))
Beispiel #4
0
 def collapseToText(self, state, obj):
     d = capitalise(self.actor.sdesc)
     if not self.text:
         state.sendEventLine("%s opens their mouth, as if to say something,"
                             " but rescinds after a few seconds of silly "
                             "gaping." % d)
     else:
         state.sendEventLine('%s says, "%s"' % (d, self.text))
Beispiel #5
0
 def collapseToText(self, state, obj):
     d = capitalise(self.actor.sdesc)
     if not self.text:
         state.sendEventLine("%s opens their mouth, as if to say something,"
                             " but rescinds after a few seconds of silly "
                             "gaping." % d)
     else:
         state.sendEventLine('%s says, "%s"' % (d, self.text))
Beispiel #6
0
 def collapseToText(self, state, obj):
     state.sendEventLine(self.room.title)
     state.setColourName("room desc")
     state.sendEventLine(self.room.desc)
     state.setColourName("people list")
     peopleList = [
         "%s is here." % capitalise(obj.sdesc) for obj in self.room.contents
     ]
     state.sendEventLine(" ".join(peopleList))
Beispiel #7
0
 def collapseToText(self, state, obj):
     state.sendEventLine(capitalise(self.target.ldesc))
Beispiel #8
0
 def collapseToText(self, state, obj):
     state.sendEventLine("%s's form appears, and they crackle into life." %
                         capitalise(self.actor.sdesc))
Beispiel #9
0
 def collapseToText(self, state, obj):
     state.sendEventLine("%s's form appears, and they crackle into life." %
                         capitalise(self.actor.sdesc))
Beispiel #10
0
 def collapseToText(self, state, obj):
     state.sendEventLine(capitalise(self.target.ldesc))
Beispiel #11
0
 def collapseToText(self, state, obj):
     state.sendEventLine("%s has left the game." %
                         capitalise(self.actor.sdesc))
Beispiel #12
0
def test_capitalise_no_blow_up_on_length_1():
    assert capitalise('f') == 'F'
Beispiel #13
0
def test_capitalise_no_blow_up_on_length_0():
    assert capitalise('') == ''
Beispiel #14
0
def test_capitalise_no_clobbering_other_case():
    assert capitalise('fOO') == 'FOO'
Beispiel #15
0
def test_capitalise_upper_first_letter():
    assert capitalise('foo') == 'Foo'