Update README.md

Fix header levels
This commit is contained in:
homeofpoe 2023-04-24 14:46:31 -07:00 committed by GitHub
parent 616daf723a
commit b13e4499ca

View file

@ -2,23 +2,23 @@
_Contrib by ChrisLR 2021_
# The Components Contrib
## The Components Contrib
This contrib introduces Components and Composition to Evennia.
Each 'Component' class represents a feature that will be 'enabled' on a typeclass instance.
You can register these components on an entire typeclass or a single object at runtime.
It supports both persisted attributes and in-memory attributes by using Evennia's AttributeHandler.
# Pros
## Pros
- You can reuse a feature across multiple typeclasses without inheritance
- You can cleanly organize each feature into a self-contained class.
- You can check if your object supports a feature without checking its instance.
# Cons
## Cons
- It introduces additional complexity.
- A host typeclass instance is required.
# How to install
## How to install
To enable component support for a typeclass,
import and inherit the ComponentHolderMixin, similar to this
@ -126,7 +126,7 @@ from typeclasses.components import health
```
Both of the above examples will work.
# Full Example
## Full Example
```python
from evennia.contrib.base_systems import components