Fixes to XYZGrid doc, docstrings
This commit is contained in:
parent
1248f5f965
commit
3c72b48d59
3 changed files with 34 additions and 20 deletions
|
|
@ -397,14 +397,23 @@ The map string consists of two main classes of entities - _nodes_ and _links_.
|
||||||
|
|
||||||
### Map legend
|
### Map legend
|
||||||
|
|
||||||
There can be many different types of _nodes_ and _links_. Whereas the map
|
There can be many different types of _nodes_ and _links_. Whereas the map
|
||||||
string describes where they are located. The _Map Legend_ connects each symbol
|
string describes where they are located, the _Map Legend_ connects each symbol
|
||||||
on the map to Python code.
|
on the map to Python code.
|
||||||
|
|
||||||
The legend is a `dict` added as the key 'legend' to the `XYMAP_DATA` dict. It is
|
```
|
||||||
optional, and any symbol not explicitly given in your legend will fall back to
|
|
||||||
its value in the default legend found in
|
LEGEND = {
|
||||||
`evennia.contrib.xyzgrid.xymap_legend`).
|
'#': xymap_legend.MapNode,
|
||||||
|
'-': xymap_legende.EWMapLink
|
||||||
|
}
|
||||||
|
|
||||||
|
# added to XYMAP_DATA dict as 'legend': LEGEND below
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
The legend is optional, and any symbol not explicitly given in your legend will
|
||||||
|
fall back to its value in the default legend [outlined below](#default-legend).
|
||||||
|
|
||||||
- [MapNode](api:evennia.contrib.xyzgrid.xymap_legend#evennia.contrib.xyzgrid.xymap_legend.MapNode)
|
- [MapNode](api:evennia.contrib.xyzgrid.xymap_legend#evennia.contrib.xyzgrid.xymap_legend.MapNode)
|
||||||
is the base class for all nodes.
|
is the base class for all nodes.
|
||||||
|
|
@ -614,16 +623,21 @@ up-down links (it'd be unclear which leads where) and if adjacent to a node, the
|
||||||
link will prioritize connecting to the node. Here are some examples:
|
link will prioritize connecting to the node. Here are some examples:
|
||||||
|
|
||||||
#
|
#
|
||||||
u - moving up in BOTH directions will bring you to the other node (two-way)
|
u - moving up in BOTH directions will bring you to the other node (two-way)
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
| - one-way up from the lower node to the upper
|
| - one-way up from the lower node to the upper, south to go back
|
||||||
u
|
u
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
d - one-way up, one-way down again (expected up/down behavior)
|
^ - true one-way up movement, combined with a one-way 'n' link
|
||||||
|
u
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
d - one-way up, one-way down again (standard up/down behavior)
|
||||||
u
|
u
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
@ -1187,13 +1201,13 @@ These are new custom [Typeclasses](../Components/Typeclasses) located in
|
||||||
|
|
||||||
You should usually **not** create XYZRooms/Exits manually. They are intended
|
You should usually **not** create XYZRooms/Exits manually. They are intended
|
||||||
to be created/deleted based on the layout of the grid. So to add a new room, add
|
to be created/deleted based on the layout of the grid. So to add a new room, add
|
||||||
a new node to your map. To delete it, you remove it. Then rerun `evennia xyzgrid
|
a new node to your map. To delete it, you remove it. Then rerun
|
||||||
spawn`. This may lead to manually created rooms being deleted or confusing the
|
**evennia xyzgrid spawn**. Having manually created XYZRooms/exits in the mix
|
||||||
system.
|
can lead to them getting deleted or the system getting confused.
|
||||||
|
|
||||||
If you **still** want to create such rooms manually (don't say we didn't warn you!),
|
If you **still** want to create XYZRoom/Exits manually (don't say we didn't
|
||||||
you should do it with their `XYZRoom.create()` and `XYZExit.create()` methods.
|
warn you!), you should do it with their `XYZRoom.create()` and
|
||||||
This makes sure the XYZ they use are unique.
|
`XYZExit.create()` methods. This makes sure the XYZ they use are unique.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Toc
|
# Toc
|
||||||
- [API root](api/evennia-api.rst)
|
|
||||||
- [Coding/Coding Introduction](Coding/Coding-Introduction)
|
- [Coding/Coding Introduction](Coding/Coding-Introduction)
|
||||||
- [Coding/Coding Overview](Coding/Coding-Overview)
|
- [Coding/Coding Overview](Coding/Coding-Overview)
|
||||||
- [Coding/Continuous Integration](Coding/Continuous-Integration)
|
- [Coding/Continuous Integration](Coding/Continuous-Integration)
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,15 @@ as up and down. These are indicated in code as 'n', 'ne', 'e', 'se', 's', 'sw',
|
||||||
1
|
1
|
||||||
+ 0 1 2 3 4 5 6 7 8 9 0
|
+ 0 1 2 3 4 5 6 7 8 9 0
|
||||||
|
|
||||||
10 # # # # #
|
10 # # # # #-I-#
|
||||||
\ I I I d
|
\ i i i d
|
||||||
9 #-#-#-# |
|
9 #-#-#-# |
|
||||||
|\ | u
|
|\ | u
|
||||||
8 #-#-#-#-----#-----o
|
8 #-#-#-#-----#b----o
|
||||||
| | |
|
| | |
|
||||||
7 #-#---#-#-#-#-# |
|
7 #-#---#-#-#-#-# |
|
||||||
| |x|x| |
|
| |x|x| |
|
||||||
6 o-#-#-# #-#-#-#-#
|
6 o-#-#-# #-#-#-#b#
|
||||||
\ |x|x|
|
\ |x|x|
|
||||||
5 o---#-#<--#-#-#
|
5 o---#-#<--#-#-#
|
||||||
/ |
|
/ |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue