Update Changelog
This commit is contained in:
parent
4cf7d8c5f5
commit
798d5b3059
2 changed files with 11 additions and 9 deletions
|
|
@ -20,6 +20,8 @@
|
||||||
- [Feature][pull3466]: Add optional `no_article` kwarg to
|
- [Feature][pull3466]: Add optional `no_article` kwarg to
|
||||||
`DefaultObject.get_numbered_name` for the system to skip adding automatic
|
`DefaultObject.get_numbered_name` for the system to skip adding automatic
|
||||||
articles. (chiizujin)
|
articles. (chiizujin)
|
||||||
|
- [Feature][pull3433]: Add ability to default get/drop to affect stacks of
|
||||||
|
items, such as `get/drop 3 rock` by a custom class parent (InspectorCaracal)
|
||||||
- Feature: Clean up the default Command variable list shown when a command has
|
- Feature: Clean up the default Command variable list shown when a command has
|
||||||
no `func()` defined (Griatch)
|
no `func()` defined (Griatch)
|
||||||
- [Feature][issue3461]: Add `DefaultObject.filter_display_visible` helper method
|
- [Feature][issue3461]: Add `DefaultObject.filter_display_visible` helper method
|
||||||
|
|
@ -61,6 +63,7 @@
|
||||||
[pull3464]: https://github.com/evennia/evennia/pull/3464
|
[pull3464]: https://github.com/evennia/evennia/pull/3464
|
||||||
[pull3466]: https://github.com/evennia/evennia/pull/3466
|
[pull3466]: https://github.com/evennia/evennia/pull/3466
|
||||||
[pull3467]: https://github.com/evennia/evennia/pull/3467
|
[pull3467]: https://github.com/evennia/evennia/pull/3467
|
||||||
|
[pull3433]: https://github.com/evennia/evennia/pull/3433
|
||||||
[issue3450]: https://github.com/evennia/evennia/issues/3450
|
[issue3450]: https://github.com/evennia/evennia/issues/3450
|
||||||
[issue3462]: https://github.com/evennia/evennia/issues/3462
|
[issue3462]: https://github.com/evennia/evennia/issues/3462
|
||||||
[issue3460]: https://github.com/evennia/evennia/issues/3460
|
[issue3460]: https://github.com/evennia/evennia/issues/3460
|
||||||
|
|
|
||||||
|
|
@ -379,6 +379,7 @@ class CmdInventory(COMMAND_DEFAULT_CLASS):
|
||||||
string = f"|wYou are carrying:\n{table}"
|
string = f"|wYou are carrying:\n{table}"
|
||||||
self.msg(text=(string, {"type": "inventory"}))
|
self.msg(text=(string, {"type": "inventory"}))
|
||||||
|
|
||||||
|
|
||||||
class NumberedTargetCommand(COMMAND_DEFAULT_CLASS):
|
class NumberedTargetCommand(COMMAND_DEFAULT_CLASS):
|
||||||
"""
|
"""
|
||||||
A class that parses out an optional number component from the input string. This
|
A class that parses out an optional number component from the input string. This
|
||||||
|
|
@ -388,6 +389,7 @@ class NumberedTargetCommand(COMMAND_DEFAULT_CLASS):
|
||||||
Note that the class's __doc__ string (this text) is used by Evennia to create the
|
Note that the class's __doc__ string (this text) is used by Evennia to create the
|
||||||
automatic help entry for the command, so make sure to document consistently here.
|
automatic help entry for the command, so make sure to document consistently here.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def parse(self):
|
def parse(self):
|
||||||
"""
|
"""
|
||||||
This method is called by the cmdhandler once the command name
|
This method is called by the cmdhandler once the command name
|
||||||
|
|
@ -423,7 +425,7 @@ class NumberedTargetCommand(COMMAND_DEFAULT_CLASS):
|
||||||
"""
|
"""
|
||||||
super().parse()
|
super().parse()
|
||||||
self.number = 0
|
self.number = 0
|
||||||
if hasattr(self, 'lhs'):
|
if hasattr(self, "lhs"):
|
||||||
# handle self.lhs but don't require it
|
# handle self.lhs but don't require it
|
||||||
count, *args = self.lhs.split(maxsplit=1)
|
count, *args = self.lhs.split(maxsplit=1)
|
||||||
# we only use the first word as a count if it's a number and
|
# we only use the first word as a count if it's a number and
|
||||||
|
|
@ -458,7 +460,6 @@ class CmdGet(NumberedTargetCommand):
|
||||||
locks = "cmd:all()"
|
locks = "cmd:all()"
|
||||||
arg_regex = r"\s|$"
|
arg_regex = r"\s|$"
|
||||||
|
|
||||||
|
|
||||||
def func(self):
|
def func(self):
|
||||||
"""implements the command."""
|
"""implements the command."""
|
||||||
|
|
||||||
|
|
@ -583,7 +584,6 @@ class CmdGive(NumberedTargetCommand):
|
||||||
locks = "cmd:all()"
|
locks = "cmd:all()"
|
||||||
arg_regex = r"\s|$"
|
arg_regex = r"\s|$"
|
||||||
|
|
||||||
|
|
||||||
def func(self):
|
def func(self):
|
||||||
"""Implement give"""
|
"""Implement give"""
|
||||||
|
|
||||||
|
|
@ -610,7 +610,6 @@ class CmdGive(NumberedTargetCommand):
|
||||||
# NOTE: this behavior may be a bug, see issue #3432
|
# NOTE: this behavior may be a bug, see issue #3432
|
||||||
to_give = utils.make_iter(to_give)
|
to_give = utils.make_iter(to_give)
|
||||||
|
|
||||||
|
|
||||||
singular, plural = to_give[0].get_numbered_name(len(to_give), caller)
|
singular, plural = to_give[0].get_numbered_name(len(to_give), caller)
|
||||||
if target == caller:
|
if target == caller:
|
||||||
caller.msg(f"You keep {plural if len(to_give) > 1 else singular} to yourself.")
|
caller.msg(f"You keep {plural if len(to_give) > 1 else singular} to yourself.")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue