Change to inventory
Inventory command now outputs a single line when inventory is completely empty rather than two empty tables.
This commit is contained in:
parent
86f42228f3
commit
d0ba768fdb
1 changed files with 6 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ A character's description may look like this:
|
||||||
Superuser(#1)
|
Superuser(#1)
|
||||||
This is User #1.
|
This is User #1.
|
||||||
|
|
||||||
Superuser is wearing one nice hat, a thin and delicate necklace,
|
Suuperuser is wearing one nice hat, a thin and delicate necklace,
|
||||||
a very pretty dress and a pair of regular ol' shoes.
|
a very pretty dress and a pair of regular ol' shoes.
|
||||||
|
|
||||||
Characters can also specify the style of wear for their clothing - I.E.
|
Characters can also specify the style of wear for their clothing - I.E.
|
||||||
|
|
@ -51,7 +51,7 @@ inherit from ClothedCharacter in your game's characters.py file:
|
||||||
|
|
||||||
class Character(ClothedCharacter):
|
class Character(ClothedCharacter):
|
||||||
|
|
||||||
And do the same with the ClothedCharacterCmdSet in your game's
|
And do the same with the ClothedCharacterCmdSet in your game'same
|
||||||
default_cmdsets.py:
|
default_cmdsets.py:
|
||||||
|
|
||||||
from evennia.contrib.clothing import ClothedCharacterCmdSet
|
from evennia.contrib.clothing import ClothedCharacterCmdSet
|
||||||
|
|
@ -655,6 +655,10 @@ class CmdInventory(MuxCommand):
|
||||||
|
|
||||||
def func(self):
|
def func(self):
|
||||||
"""check inventory"""
|
"""check inventory"""
|
||||||
|
if not self.caller.contents:
|
||||||
|
self.caller.msg("You are not carrying or wearing anything.")
|
||||||
|
return
|
||||||
|
|
||||||
items = self.caller.contents
|
items = self.caller.contents
|
||||||
|
|
||||||
carry_table = evtable.EvTable(border="header")
|
carry_table = evtable.EvTable(border="header")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue