mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-01 10:28:27 +02:00
Added a content registry, so homebrew content can be referenced by name.
This commit is contained in:
@@ -4,7 +4,7 @@ from collections import defaultdict
|
||||
|
||||
from dungeonsheets import exceptions, features, monsters, weapons
|
||||
from dungeonsheets.classes.classes import CharClass, SubClass
|
||||
from dungeonsheets.stats import findattr
|
||||
from dungeonsheets.content_registry import find_content
|
||||
|
||||
|
||||
# PHB
|
||||
@@ -272,7 +272,7 @@ class Druid(CharClass):
|
||||
else:
|
||||
# Not already a monster so see if we can find one
|
||||
try:
|
||||
NewMonster = findattr(monsters, shape)
|
||||
NewMonster = find_content(shape, valid_classes=[monsters.Monster])
|
||||
new_shape = NewMonster()
|
||||
except AttributeError:
|
||||
msg = (
|
||||
|
||||
Reference in New Issue
Block a user