Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Branden
/
thiccmud
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b440aa07
authored
2016-12-20 18:30:36 -0500
by
Branden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
#First steps coding, Add a new default command
1 parent
ac533bb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
thiccMud/commands/command.py
thiccMud/commands/default_cmdsets.py
thiccMud/commands/command.py
View file @
b440aa0
...
...
@@ -182,3 +182,29 @@ class Command(BaseCommand):
# else:
# self.character = None
#
class
CmdAbilities
(
Command
):
"""
List abilities
Usage:
abilities
Displays a list of your current ability values.
"""
key
=
"abilities"
aliases
=
[
"abi"
]
lock
=
"cmd:all()"
help_category
=
"General"
def
func
(
self
):
"implements the actual functionality"
str
,
agi
,
mag
=
self
.
caller
.
get_abilities
()
string
=
"STR:
%
s, AGI:
%
s, MAG:
%
s"
%
(
str
,
agi
,
mag
)
self
.
caller
.
msg
(
string
)
...
...
thiccMud/commands/default_cmdsets.py
View file @
b440aa0
...
...
@@ -15,6 +15,7 @@ own cmdsets by inheriting from them or directly from `evennia.CmdSet`.
"""
from
evennia
import
default_cmds
from
commands.command
import
CmdAbilities
class
CharacterCmdSet
(
default_cmds
.
CharacterCmdSet
):
"""
...
...
@@ -32,6 +33,7 @@ class CharacterCmdSet(default_cmds.CharacterCmdSet):
#
# any commands you add below will overload the default ones.
#
self
.
add
(
CmdAbilities
())
class
PlayerCmdSet
(
default_cmds
.
PlayerCmdSet
):
...
...
Please
register
or
sign in
to post a comment