From 6cc5c8df50d7ca3e1c7be296ea6872ce94151722 Mon Sep 17 00:00:00 2001 From: Cal Date: Wed, 21 Feb 2024 14:00:56 -0700 Subject: [PATCH 1/2] change lunr weighting --- evennia/commands/default/help.py | 6 +++--- evennia/help/utils.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/evennia/commands/default/help.py b/evennia/commands/default/help.py index 9a1aa0fa76..9956a23c08 100644 --- a/evennia/commands/default/help.py +++ b/evennia/commands/default/help.py @@ -480,9 +480,9 @@ class CmdHelp(COMMAND_DEFAULT_CLASS): # lunr search fields/boosts search_fields = [ {"field_name": "key", "boost": 10}, - {"field_name": "aliases", "boost": 9}, - {"field_name": "no_prefix", "boost": 8}, - {"field_name": "category", "boost": 7}, + {"field_name": "aliases", "boost": 7}, + {"field_name": "no_prefix", "boost": 6}, + {"field_name": "category", "boost": 5}, {"field_name": "tags", "boost": 1}, # tags are not used by default ] match, suggestions = None, None diff --git a/evennia/help/utils.py b/evennia/help/utils.py index 41ae5a2b9b..5ef3157ca9 100644 --- a/evennia/help/utils.py +++ b/evennia/help/utils.py @@ -88,8 +88,8 @@ def help_search_with_index(query, candidate_entries, suggestion_maxnum=5, fields if not fields: fields = [ {"field_name": "key", "boost": 10}, - {"field_name": "aliases", "boost": 9}, - {"field_name": "category", "boost": 8}, + {"field_name": "aliases", "boost": 7}, + {"field_name": "category", "boost": 6}, {"field_name": "tags", "boost": 5}, ] From f07e4882b01cb06b467ee74fc724e0689049e107 Mon Sep 17 00:00:00 2001 From: Cal Date: Wed, 21 Feb 2024 14:01:16 -0700 Subject: [PATCH 2/2] remove 'building' filehelp to prevent confusion --- evennia/game_template/world/help_entries.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/evennia/game_template/world/help_entries.py b/evennia/game_template/world/help_entries.py index 927888b170..88460b64f0 100644 --- a/evennia/game_template/world/help_entries.py +++ b/evennia/game_template/world/help_entries.py @@ -55,13 +55,4 @@ HELP_ENTRY_DICTS = [ """, }, - { - "key": "building", - "category": "building", - "text": """ - Evennia comes with a bunch of default building commands. You can - find a beginner tutorial in the Evennia documentation. - - """, - }, ]