Direct-reference typeclass in xyzgrid example, for simplicity

This commit is contained in:
Griatch 2021-08-22 20:33:37 +02:00
parent ddaf22ea58
commit 6e975236eb
2 changed files with 5 additions and 5 deletions

View file

@ -57,7 +57,7 @@ Exits: northeast and east
available for use as prototype-parents when spawning the grid. available for use as prototype-parents when spawning the grid.
3. Run `evennia xyzgrid help` for available options. 3. Run `evennia xyzgrid help` for available options.
4. (Optional): By default, the xyzgrid will only spawn module-based 4. (Optional): By default, the xyzgrid will only spawn module-based
[prototypes](Prototypes). This is an optimization and usually makes sense [prototypes](../Components/Prototypes). This is an optimization and usually makes sense
since the grid is entirely defined outside the game anyway. If you want to since the grid is entirely defined outside the game anyway. If you want to
also make use of in-game (db-) created prototypes, add also make use of in-game (db-) created prototypes, add
`XYZGRID_USE_DB_PROTOTYPES = True` to settings. `XYZGRID_USE_DB_PROTOTYPES = True` to settings.

View file

@ -29,15 +29,15 @@ from evennia.contrib.xyzgrid import xymap_legend
ROOM_PARENT = { ROOM_PARENT = {
"key": "An empty room", "key": "An empty room",
"prototype_key": "xyz_exit_prototype", "prototype_key": "xyz_exit_prototype",
"prototype_parent": "xyz_room", # "prototype_parent": "xyz_room",
# "typeclass": "evennia.contrib.xyzgrid.xyzroom.XYZRoom", "typeclass": "evennia.contrib.xyzgrid.xyzroom.XYZRoom",
"desc": "An empty room.", "desc": "An empty room.",
} }
EXIT_PARENT = { EXIT_PARENT = {
"prototype_key": "xyz_exit_prototype", "prototype_key": "xyz_exit_prototype",
"prototype_parent": "xyz_exit", # "prototype_parent": "xyz_exit",
# "typeclass": "evennia.contrib.xyzgrid.xyzroom.XYZExit", "typeclass": "evennia.contrib.xyzgrid.xyzroom.XYZExit",
"desc": "A path to the next location.", "desc": "A path to the next location.",
} }