Update links/paths to new contrib locations

This commit is contained in:
Griatch 2021-12-19 17:04:26 +01:00
parent 7f2b8c81d7
commit 8139fd79c7
61 changed files with 171 additions and 248 deletions

View file

@ -79,7 +79,7 @@ For example:
mapbuilder world.gamemap.MAP world.maplegend.MAP_LEGEND
mapbuilder evennia.contrib.grid.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
mapbuilder/two evennia.contrib.grid.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
(Legend path defaults to map path)
Below are two examples showcasing the use of automatic exit generation and
@ -93,7 +93,7 @@ convenience The below example code should be in mymap.py in mygame/world.
from django.conf import settings
from evennia.utils import utils
# mapbuilder evennia.contrib.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
# mapbuilder evennia.contrib.grid.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
# -*- coding: utf-8 -*-
@ -193,7 +193,7 @@ EXAMPLE1_LEGEND = {
## Example Two
```python
# @mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
# @mapbuilder/two evennia.contrib.grid.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
# -*- coding: utf-8 -*-

View file

@ -81,7 +81,7 @@ For example:
mapbuilder world.gamemap.MAP world.maplegend.MAP_LEGEND
mapbuilder evennia.contrib.grid.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
mapbuilder/two evennia.contrib.grid.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
(Legend path defaults to map path)
Below are two examples showcasing the use of automatic exit generation and
@ -91,7 +91,7 @@ convenience The below example code should be in mymap.py in mygame/world.
# Example One:
```python
# @mapbuilder evennia.contrib.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
# @mapbuilder evennia.contrib.grid.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
# -*- coding: utf-8 -*-
@ -191,7 +191,7 @@ EXAMPLE1_LEGEND = {
# Example two
```python
# @mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
# @mapbuilder/two evennia.contrib.grid.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
# -*- coding: utf-8 -*-
@ -414,8 +414,8 @@ class CmdMapBuilder(COMMAND_DEFAULT_CLASS):
Example:
@mapbuilder world.gamemap.MAP world.maplegend.MAP_LEGEND
@mapbuilder evennia.contrib.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
@mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
@mapbuilder evennia.contrib.grid.mapbuilder.EXAMPLE1_MAP EXAMPLE1_LEGEND
@mapbuilder/two evennia.contrib.grid.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
(Legend path defaults to map path)
This is a command which takes two inputs:

View file

@ -18,7 +18,7 @@ import random
# A map with a temple (▲) amongst mountains (n,∩) in a forest (♣,♠) on an
# island surrounded by water (≈). By giving no instructions for the water
# characters we effectively skip it and create no rooms for those squares.
EXAMPLE1_MAP = '''
EXAMPLE1_MAP = '''\
n
@ -102,7 +102,7 @@ EXAMPLE1_LEGEND = {
# Example two
# @mapbuilder/two evennia.contrib.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
# @mapbuilder/two evennia.contrib.grid.mapbuilder.EXAMPLE2_MAP EXAMPLE2_LEGEND
# -*- coding: utf-8 -*-
@ -115,7 +115,7 @@ EXAMPLE1_LEGEND = {
# This is the same layout as Example 1 but included are characters for exits.
# We can use these characters to determine which rooms should be connected.
EXAMPLE2_MAP = '''
EXAMPLE2_MAP = '''\
--

View file

@ -10,5 +10,3 @@ from .wilderness import WildernessScript # noqa
from .wilderness import WildernessExit # noqa
from .wilderness import WildernessRoom # noqa
from .wilderness import WildernessMapProvider # noqa
from .wilderness import Wilderness # noqa
from .wilderness import WildernessMap # noqa

View file

@ -17,11 +17,11 @@ with their own name. If no name is provided, then a default one is used. Interna
the wilderness is stored as a Script with the name you specify. If you don't
specify the name, a script named "default" will be created and used.
@py from evennia.contrib.grid import wilderness; wilderness.create_wilderness()
py from evennia.contrib.grid import wilderness; wilderness.create_wilderness()
Once created, it is possible to move into that wilderness map:
@py from evennia.contrib.grid import wilderness; wilderness.enter_wilderness(me)
py from evennia.contrib.grid import wilderness; wilderness.enter_wilderness(me)
All coordinates used by the wilderness map are in the format of `(x, y)`
tuples. x goes from left to right and y goes from bottom to top. So `(0, 0)`

View file

@ -29,13 +29,13 @@ in the docs.
1. If you haven't before, install the extra contrib requirements.
You can do so by doing `pip install -r requirements_extra.txt` from the
`evennia/` folder.
2. Import and add the `evennia.contrib.xyzgrid.commands.XYZGridCmdSet` to the
2. Import and add the `evennia.contrib.grid.xyzgrid.commands.XYZGridCmdSet` to the
`CharacterCmdset` cmdset in `mygame/commands.default_cmds.py`. Reload
the server. This makes the `map`, `goto/path` and modified `teleport` and
`open` commands available in-game.
3. Edit `mygame/server/conf/settings.py` and set
EXTRA_LAUNCHER_COMMANDS['xyzgrid'] = 'evennia.contrib.xyzgrid.launchcmd.xyzcommand'
EXTRA_LAUNCHER_COMMANDS['xyzgrid'] = 'evennia.contrib.grid.xyzgrid.launchcmd.xyzcommand'
4. Run the new `evennia xyzgrid help` for instructions on how to spawn the grid.
@ -45,7 +45,7 @@ After installation, do the following (from your command line, where the
`evennia` command is available) to install an example grid:
evennia xyzgrid init
evennia xyzgrid add evennia.contrib.xyzgrid.example
evennia xyzgrid add evennia.contrib.grid.xyzgrid.example
evennia xyzgrid list
evennia xyzgrid show "the large tree"
evennia xyzgrid show "the small cave"

View file

@ -851,9 +851,11 @@ class TestMap8(_MapTest):
"""
mapstr = self.map.get_visual_range(coord, dist=dist, mode='nodes',
target=target, target_path_style="",
target=target, target_path_style=".",
character='@',
max_size=max_size)
self.assertEqual(expected, mapstr.replace("||", "|"))
def test_spawn(self):
"""
Spawn the map into actual objects.
@ -1013,10 +1015,9 @@ class TestMap11(_MapTest):
"""
mapstr = self.map.get_visual_range(coord, dist=dist, mode='nodes',
target=target, target_path_style="",
target=target, target_path_style=".",
character='@',
max_size=max_size)
print(f"\n\n{coord}-{target}\n{expected}\n\n{mapstr}")
self.assertEqual(expected, mapstr)