From bc92bad15a18c8f2a83dc029085569b715e69159 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 29 Apr 2023 08:00:32 +0200 Subject: [PATCH] Add proper header to components contrib --- evennia/contrib/base_systems/components/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/evennia/contrib/base_systems/components/README.md b/evennia/contrib/base_systems/components/README.md index 7e430c19c5..0a7d0d01e5 100644 --- a/evennia/contrib/base_systems/components/README.md +++ b/evennia/contrib/base_systems/components/README.md @@ -1,6 +1,8 @@ # Components -_Contrib by ChrisLR 2021_ +Contrib by ChrisLR, 2021 + +Expand typeclasses using a components/composition approach. ## The Components Contrib @@ -134,7 +136,7 @@ from evennia.contrib.base_systems import components # This is the Component class class Health(components.Component): name = "health" - + # Stores the current and max values as Attributes on the host, defaulting to 100 current = components.DBField(default=100) max = components.DBField(default=100) @@ -185,7 +187,7 @@ class Attack(Command): # Attempt to retrieve the component, None is obtained if it does not exist. if target.components.health: valid_target = target - + if not valid_target: caller.msg("You can't attack that!") return True