From d6b5425a9e6846cde8d8564f5c268582861fbf8b Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 29 Apr 2023 08:52:29 +0200 Subject: [PATCH] Evennia 1.3.0 minor release --- CHANGELOG.md | 10 ++++++---- docs/Makefile | 4 ++-- docs/source/Coding/Changelog.md | 14 +++++++++++--- docs/source/Contribs/Contrib-Components.md | 18 ++++++++++-------- docs/source/Contribs/Contribs-Overview.md | 4 ++-- evennia/VERSION.txt | 2 +- pyproject.toml | 2 +- 7 files changed, 33 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3ff4ad6e5..8bf926bd25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,18 @@ # Changelog -## Main branch +## Evennia 1.3.0 + +Apr 29, 2023 -- Fix: The username validator did not display errors correctly in web - registration form. - Feature: Better ANSI color fallbacks (InspectorCaracal). - Feature: Add support for saving `deque` with `maxlen` to Attributes (before `maxlen` was ignored). -- Tools: More unit tests for scripts (Storsorken) +- Fix: The username validator did not display errors correctly in web + registration form. - Fix: Components contrib had issues with inherited typeclasses (ChrisLR) - Fix: f-string fix in clothing contrib (aMiss-aWry) - Fix: Have `EvenniaTestCase` properly flush idmapper cache (bradleymarques) +- Tools: More unit tests for scripts (Storsorken) - Docs: Made separate doc pages for Exits, Characters and Rooms. Expanded on how to change the description of an in-game object with templating. - Docs: A multitude of doc issues and typos fixed. diff --git a/docs/Makefile b/docs/Makefile index 6ecb864bc5..9d6484977c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -58,10 +58,10 @@ _multiversion-check-env: @EVDIR=$(EVDIR) EVGAMEDIR=$(EVGAMEDIR) bash -e checkenv.sh multiversion _clean_api_index: - rm source/api/* + rm -f source/api/* _clean_api_rsts: - rm source/api/*.rst + rm -f source/api/*.rst # remove superfluos 'module' and 'package' text from api headers _reformat_apidoc_headers: diff --git a/docs/source/Coding/Changelog.md b/docs/source/Coding/Changelog.md index 3e475f97ca..8bf926bd25 100644 --- a/docs/source/Coding/Changelog.md +++ b/docs/source/Coding/Changelog.md @@ -1,13 +1,21 @@ # Changelog -## Main branch +## Evennia 1.3.0 +Apr 29, 2023 + +- Feature: Better ANSI color fallbacks (InspectorCaracal). - Feature: Add support for saving `deque` with `maxlen` to Attributes (before `maxlen` was ignored). -- Fix: More unit tests for scripts (Storsorken) +- Fix: The username validator did not display errors correctly in web + registration form. +- Fix: Components contrib had issues with inherited typeclasses (ChrisLR) +- Fix: f-string fix in clothing contrib (aMiss-aWry) +- Fix: Have `EvenniaTestCase` properly flush idmapper cache (bradleymarques) +- Tools: More unit tests for scripts (Storsorken) - Docs: Made separate doc pages for Exits, Characters and Rooms. Expanded on how to change the description of an in-game object with templating. -- Docs: Fixed a multitude of doc issues. +- Docs: A multitude of doc issues and typos fixed. ## Evennia 1.2.1 diff --git a/docs/source/Contribs/Contrib-Components.md b/docs/source/Contribs/Contrib-Components.md index aa221f860e..2e12a11cef 100644 --- a/docs/source/Contribs/Contrib-Components.md +++ b/docs/source/Contribs/Contrib-Components.md @@ -1,24 +1,26 @@ # Components -_Contrib by ChrisLR 2021_ +Contrib by ChrisLR, 2021 -# The Components Contrib +Expand typeclasses using a components/composition approach. + +## 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 +128,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 @@ -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 diff --git a/docs/source/Contribs/Contribs-Overview.md b/docs/source/Contribs/Contribs-Overview.md index 3a5d025929..684dffa859 100644 --- a/docs/source/Contribs/Contribs-Overview.md +++ b/docs/source/Contribs/Contribs-Overview.md @@ -111,9 +111,9 @@ Additional color markup styles for Evennia (extending or replacing the default ### `components` -__Contrib by ChrisLR 2021__ +_Contrib by ChrisLR, 2021_ -# The Components Contrib +Expand typeclasses using a components/composition approach. [Read the documentation](./Contrib-Components.md) - [Browse the Code](evennia.contrib.base_systems.components) diff --git a/evennia/VERSION.txt b/evennia/VERSION.txt index 6085e94650..f0bb29e763 100644 --- a/evennia/VERSION.txt +++ b/evennia/VERSION.txt @@ -1 +1 @@ -1.2.1 +1.3.0 diff --git a/pyproject.toml b/pyproject.toml index 2534c1b68f..78832c8620 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "evennia" -version = "1.2.1" +version = "1.3.0" maintainers = [{ name = "Griatch", email = "griatch@gmail.com" }] description = "A full-featured toolkit and server for text-based multiplayer games (MUDs, MU*, etc)." requires-python = ">=3.10"