Skip to content

Commit

Permalink
Merge branch 'master' into 12.go-action-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
mithrandi committed Nov 15, 2020
2 parents a03793c + e47ed95 commit 851f498
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 34 deletions.
80 changes: 46 additions & 34 deletions .requirements-readthedocs.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,47 @@
Axiom==0.7.5
Babel==2.2.0
Epsilon==0.7.1
Jinja2==2.8
Mantissa==0.8.3
MarkupSafe==0.23
Nevow==0.12.0
Pillow==3.1.1
Pygments==2.1
Sphinx==1.3.5
Twisted==15.5.0
alabaster==0.7.12
appdirs==1.4.4
argon2-cffi==20.1.0
attrs==20.3.0
Automat==20.2.0
axiom==0.9.0
Babel==2.8.0
bcrypt==3.1.7
certifi==2020.6.20
cffi==1.14.3
chardet==3.0.4
constantly==15.1.0
cryptography==3.2.1
cssutils==1.0.2
docutils==0.16
enum34==1.1.10
epsilon==0.8.0
hyperlink==20.0.1
idna==2.10
imagesize==1.2.0
incremental==17.5.0
ipaddress==1.0.23
Jinja2==2.11.2
Mantissa==0.9.0
MarkupSafe==1.1.1
Nevow==0.14.5
packaging==20.4
passlib==1.7.4
Pillow==6.2.2
pyasn1==0.4.8
pycparser==2.20
Pygments==2.5.2
PyHamcrest==1.10.1
pyOpenSSL==19.1.0
pyparsing==2.4.7
pytz==2020.4
requests==2.24.0
six==1.15.0
snowballstemmer==2.0.0
Sphinx==1.8.5
sphinxcontrib-websupport==1.1.2
Twisted==20.3.0
txpasslib==0.1.0
typing==3.7.4.3
urllib3==1.25.11
Vertex==0.3.1
alabaster==0.7.7
cffi==1.5.0
chardet==2.3.0
cryptography==1.2.2
cssutils==1.0.1
doc8==0.6.0
docutils==0.12
enum34==1.1.2
idna==2.0
ipaddress==1.0.16
pbr==1.8.1
pyOpenSSL==0.15.1
pyasn1==0.1.9
pycparser==2.14
pycrypto==2.6.1
pytz==2015.7
restructuredtext-lint==0.14.0
six==1.10.0
snowballstemmer==1.2.1
sphinx-rtd-theme==0.1.9
stevedore==1.10.0
wheel==0.26.0
zope.interface==4.1.3
zope.interface==5.2.0
7 changes: 7 additions & 0 deletions src/imaginary/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,13 @@ def do(self, player, line, direction):
actor=player,
actorMessage=language.ExpressString(
u"There's no room for you there.")))
except eimaginary.Closed:
raise eimaginary.ActionFailure(events.ThatDoesntWork(
actor=player,
actorMessage=language.ExpressString(
u"The way is shut.",
),
))

# This is subtly incorrect: see http://divmod.org/trac/ticket/2917
lookAroundActor = iimaginary.IActor(player)
Expand Down
15 changes: 15 additions & 0 deletions src/imaginary/test/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,21 @@ def test_directionalMovement(self):
""])


def test_goClosed(self):
"""
You cannot move through an exit to a "closed" location.
"""
unreachable = objects.Thing(store=self.store, name=u"unreachable")
objects.Container.createFor(unreachable, capacity=1000, closed=True)
objects.Exit.link(self.location, unreachable, u"west")

self._test(
"west",
["The way is shut."],
[],
)


def test_scrutinize(self):
"""
The scrutinize action takes a thing as a target and displays a lot of
Expand Down

0 comments on commit 851f498

Please sign in to comment.