mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 08:16:30 +01:00
Extended install instructions for gendersub. REsolve #2525.
This commit is contained in:
parent
8a7ebf992b
commit
4af263b362
1 changed files with 30 additions and 1 deletions
|
|
@ -17,10 +17,39 @@ An object can have the following genders:
|
|||
## Installation
|
||||
|
||||
Import and add the `SetGender` command to your default cmdset in
|
||||
`mygame/commands/default_cmdset.py`
|
||||
`mygame/commands/default_cmdset.py`:
|
||||
|
||||
```python
|
||||
# mygame/commands/default_cmdsets.py
|
||||
|
||||
# ...
|
||||
|
||||
from evennia.contrib.game_systems.gendersub import SetGender # <---
|
||||
|
||||
# ...
|
||||
|
||||
class CharacterCmdSet(default_cmds.CharacterCmdSet):
|
||||
# ...
|
||||
def at_cmdset_creation(self):
|
||||
# ...
|
||||
self.add(SetGender()) # <---
|
||||
```
|
||||
|
||||
Make your `Character` inherit from `GenderCharacter`.
|
||||
|
||||
```python
|
||||
# mygame/typeclasses/characters.py
|
||||
|
||||
# ...
|
||||
|
||||
from evennia.contrib.game_systems.gendersub import GenderCharacter # <---
|
||||
|
||||
class Character(GenderCharacter): # <---
|
||||
# ...
|
||||
```
|
||||
|
||||
Reload the server (`evennia reload` or `reload` from inside the game).
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue