~divmod-dev/divmod.org/service-515

« back to all changes in this revision

Viewing changes to Imaginary/imaginary/language.py

  • Committer: exarkun
  • Date: 2006-04-19 23:48:41 UTC
  • Revision ID: svn-v4:866e43f7-fbfc-0310-8f2a-ec88d1da2979:trunk:6233
Merge equipment-894

Author: exarkun, radix
Reviewer: glyph
Fixes #894

This hooks the garment system up to the game with three new actions:

  * wear
  * remove/take off
  * equipment

It also fixes some slightly buggy tests which were missing important 
trailing content and which the test suite was allowing to pass anyway.
Action resolution order is also made deterministic and the TakeFrom
hack is removed.  The tests now use the actual ImaginaryRealm to create
players as well, instead of a lame test helper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
 
147
147
        descriptionComponents = []
148
148
        for pup in self.thing.powerupsFor(iimaginary.IDescriptionContributor):
149
 
            descriptionComponents.append(pup.conceptualize().vt102(observer))
 
149
            s = pup.conceptualize().vt102(observer)
 
150
            if s:
 
151
                descriptionComponents.extend([s, u'\n'])
 
152
        if descriptionComponents:
 
153
            descriptionComponents.pop()
150
154
 
151
155
        return [
152
156
            [T.bold, T.fg.green, u'[ ', [T.fg.normal, self.thing.name], u' ]\n'],