Merge pull request #3204 from InspectorCaracal/patch-7
Fix bug in the container contrib "look"
This commit is contained in:
commit
7b309b6f24
2 changed files with 13 additions and 9 deletions
|
|
@ -131,7 +131,8 @@ class CmdContainerLook(CmdLook):
|
||||||
if not target:
|
if not target:
|
||||||
self.msg("You have no location to look at!")
|
self.msg("You have no location to look at!")
|
||||||
return
|
return
|
||||||
elif self.rhs:
|
else:
|
||||||
|
if self.rhs:
|
||||||
# we are looking in something, find that first
|
# we are looking in something, find that first
|
||||||
container = caller.search(self.rhs)
|
container = caller.search(self.rhs)
|
||||||
if not container:
|
if not container:
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,9 @@ class TestContainerCmds(BaseEvenniaCommandTest):
|
||||||
# move it into a non-container object and look at it there too
|
# move it into a non-container object and look at it there too
|
||||||
self.obj1.location = self.obj2
|
self.obj1.location = self.obj2
|
||||||
self.call(CmdContainerLook(), "obj in obj2", "Obj")
|
self.call(CmdContainerLook(), "obj in obj2", "Obj")
|
||||||
|
# make sure normal looking works too
|
||||||
|
self.call(CmdContainerLook(), "obj2", "Obj2")
|
||||||
|
self.call(CmdContainerLook(), "", "Room")
|
||||||
|
|
||||||
def test_get_and_put(self):
|
def test_get_and_put(self):
|
||||||
# get normally
|
# get normally
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue