mirror of
https://github.com/evennia/evennia.git
synced 2026-03-17 13:26:30 +01:00
Convert master docs to use MyST
This commit is contained in:
parent
6e03216cd9
commit
d229ff024c
359 changed files with 3275 additions and 4567 deletions
|
|
@ -7,21 +7,21 @@ exists before answering - maybe you can clarify that answer rather than to make
|
|||
|
||||
## Table of Contents
|
||||
|
||||
- [Will I run out of dbrefs?](./Coding-FAQ#will-i-run-out-of-dbrefs)
|
||||
- [Removing default commands](./Coding-FAQ#removing-default-commands)
|
||||
- [Preventing character from moving based on a condition](./Coding-FAQ#preventing-character-from-
|
||||
- [Will I run out of dbrefs?](./Coding-FAQ.md#will-i-run-out-of-dbrefs)
|
||||
- [Removing default commands](./Coding-FAQ.md#removing-default-commands)
|
||||
- [Preventing character from moving based on a condition](./Coding-FAQ.md#preventing-character-from-
|
||||
moving-based-on-a-condition)
|
||||
- [Reference initiating object in an EvMenu command](./Coding-FAQ#reference-initiating-object-in-an-
|
||||
- [Reference initiating object in an EvMenu command](./Coding-FAQ.md#reference-initiating-object-in-an-
|
||||
evmenu-command)
|
||||
- [Adding color to default Evennia Channels](./Coding-FAQ#adding-color-to-default-evennia-channels)
|
||||
- [Selectively turn off commands in a room](./Coding-FAQ#selectively-turn-off-commands-in-a-room)
|
||||
- [Select Command based on a condition](./Coding-FAQ#select-command-based-on-a-condition)
|
||||
- [Automatically updating code when reloading](./Coding-FAQ#automatically-updating-code-when-
|
||||
- [Adding color to default Evennia Channels](./Coding-FAQ.md#adding-color-to-default-evennia-channels)
|
||||
- [Selectively turn off commands in a room](./Coding-FAQ.md#selectively-turn-off-commands-in-a-room)
|
||||
- [Select Command based on a condition](./Coding-FAQ.md#select-command-based-on-a-condition)
|
||||
- [Automatically updating code when reloading](./Coding-FAQ.md#automatically-updating-code-when-
|
||||
reloading)
|
||||
- [Changing all exit messages](./Coding-FAQ#changing-all-exit-messages)
|
||||
- [Add parsing with the "to" delimiter](./Coding-FAQ#add-parsing-with-the-to-delimiter)
|
||||
- [Store last used session IP address](./Coding-FAQ#store-last-used-session-ip-address)
|
||||
- [Use wide characters with EvTable](./Coding-FAQ#non-latin-characters-in-evtable)
|
||||
- [Changing all exit messages](./Coding-FAQ.md#changing-all-exit-messages)
|
||||
- [Add parsing with the "to" delimiter](./Coding-FAQ.md#add-parsing-with-the-to-delimiter)
|
||||
- [Store last used session IP address](./Coding-FAQ.md#store-last-used-session-ip-address)
|
||||
- [Use wide characters with EvTable](./Coding-FAQ.md#non-latin-characters-in-evtable)
|
||||
|
||||
## Will I run out of dbrefs?
|
||||
**Q:** The `#dbref` of a database object is ever-increasing. Evennia doesn't allow you to change or
|
||||
|
|
@ -34,12 +34,12 @@ still using Evennia at that point and has this concern, get back to us and we ca
|
|||
dbref reuse then.
|
||||
|
||||
## Removing default commands
|
||||
**Q:** How does one *remove* (not replace) e.g. the default `get` [Command](./Commands) from the
|
||||
Character [Command Set](./Command-Sets)?
|
||||
**Q:** How does one *remove* (not replace) e.g. the default `get` [Command](./Commands.md) from the
|
||||
Character [Command Set](./Command-Sets.md)?
|
||||
|
||||
**A:** Go to `mygame/commands/default_cmdsets.py`. Find the `CharacterCmdSet` class. It has one
|
||||
method named `at_cmdset_creation`. At the end of that method, add the following line:
|
||||
`self.remove(default_cmds.CmdGet())`. See the [Adding Commands Tutorial](./Adding-Command-Tutorial)
|
||||
`self.remove(default_cmds.CmdGet())`. See the [Adding Commands Tutorial](./Adding-Command-Tutorial.md)
|
||||
for more info.
|
||||
|
||||
## Preventing character from moving based on a condition
|
||||
|
|
@ -47,7 +47,7 @@ for more info.
|
|||
combat, immobilized, etc.)
|
||||
|
||||
**A:** The `at_before_move` hook is called by Evennia just before performing any move. If it returns
|
||||
`False`, the move is aborted. Let's say we want to check for an [Attribute](./Attributes) `cantmove`.
|
||||
`False`, the move is aborted. Let's say we want to check for an [Attribute](./Attributes.md) `cantmove`.
|
||||
Add the following code to the `Character` class:
|
||||
|
||||
```python
|
||||
|
|
@ -63,7 +63,7 @@ def at_before_move(self, destination):
|
|||
**Q:** An object has a Command on it starts up an EvMenu instance. How do I capture a reference to
|
||||
that object for use in the menu?
|
||||
|
||||
**A:** When an [EvMenu](./EvMenu) is started, the menu object is stored as `caller.ndb._menutree`.
|
||||
**A:** When an [EvMenu](./EvMenu.md) is started, the menu object is stored as `caller.ndb._menutree`.
|
||||
This is a good place to store menu-specific things since it will clean itself up when the menu
|
||||
closes. When initiating the menu, any additional keywords you give will be available for you as
|
||||
properties on this menu object:
|
||||
|
|
@ -112,7 +112,7 @@ CHANNEL_COLORS`.
|
|||
**Q:** I want certain commands to turn off in a given room. They should still work normally for
|
||||
staff.
|
||||
|
||||
**A:** This is done using a custom cmdset on a room [locked with the 'call' lock type](./Locks). Only
|
||||
**A:** This is done using a custom cmdset on a room [locked with the 'call' lock type](./Locks.md). Only
|
||||
if this lock is passed will the commands on the room be made available to an object inside it. Here
|
||||
is an example of a room where certain commands are disabled for non-staff:
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ superusers).
|
|||
command to only be available on a full moon, from midnight to three in-game time.
|
||||
|
||||
**A:** This is easiest accomplished by putting the "werewolf" command on the Character as normal,
|
||||
but to [lock](./Locks) it with the "cmd" type lock. Only if the "cmd" lock type is passed will the
|
||||
but to [lock](./Locks.md) it with the "cmd" type lock. Only if the "cmd" lock type is passed will the
|
||||
command be available.
|
||||
|
||||
```python
|
||||
|
|
@ -168,8 +168,8 @@ class CmdWerewolf(Command):
|
|||
def func(self):
|
||||
# ...
|
||||
```
|
||||
Add this to the [default cmdset as usual](./Adding-Command-Tutorial). The `is_full_moon` [lock
|
||||
function](Locks#lock-functions) does not yet exist. We must create that:
|
||||
Add this to the [default cmdset as usual](./Adding-Command-Tutorial.md). The `is_full_moon` [lock
|
||||
function](./Locks.md#lock-functions) does not yet exist. We must create that:
|
||||
|
||||
```python
|
||||
# in mygame/server/conf/lockfuncs.py
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue