From b13e4499cacf0f79309848a6f7772e9f8aa1424d Mon Sep 17 00:00:00 2001 From: homeofpoe Date: Mon, 24 Apr 2023 14:46:31 -0700 Subject: [PATCH] Update README.md Fix header levels --- evennia/contrib/base_systems/components/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/evennia/contrib/base_systems/components/README.md b/evennia/contrib/base_systems/components/README.md index 7446419617..7e430c19c5 100644 --- a/evennia/contrib/base_systems/components/README.md +++ b/evennia/contrib/base_systems/components/README.md @@ -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