Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 7
0
 def collapseToText(self, state, obj):
     state.sendEventLine(capitalise(self.target.ldesc))
Ejemplo n.º 8
0
 def collapseToText(self, state, obj):
     state.sendEventLine("%s's form appears, and they crackle into life." %
                         capitalise(self.actor.sdesc))
Ejemplo n.º 9
0
 def collapseToText(self, state, obj):
     state.sendEventLine("%s's form appears, and they crackle into life." %
                         capitalise(self.actor.sdesc))
Ejemplo n.º 10
0
 def collapseToText(self, state, obj):
     state.sendEventLine(capitalise(self.target.ldesc))
Ejemplo n.º 11
0
 def collapseToText(self, state, obj):
     state.sendEventLine("%s has left the game." %
                         capitalise(self.actor.sdesc))
Ejemplo n.º 12
0
def test_capitalise_no_blow_up_on_length_1():
    assert capitalise('f') == 'F'
Ejemplo n.º 13
0
def test_capitalise_no_blow_up_on_length_0():
    assert capitalise('') == ''
Ejemplo n.º 14
0
def test_capitalise_no_clobbering_other_case():
    assert capitalise('fOO') == 'FOO'
Ejemplo n.º 15
0
def test_capitalise_upper_first_letter():
    assert capitalise('foo') == 'Foo'