From 49f76e99340119c5bd403a05913531aed07e5e9b Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 9 May 2016 05:09:14 +0000 Subject: [PATCH] Rename internal:language: to .mudpy.linguistic Convert the old style internal:language element to a new style .mudpy.linguistic element and adjust the command_say() function accordingly. --- etc/mudpy.yaml | 9 ++++----- lib/mudpy/misc.py | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/etc/mudpy.yaml b/etc/mudpy.yaml index 08832e6..e6fd405 100644 --- a/etc/mudpy.yaml +++ b/etc/mudpy.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2004-2014 Jeremy Stanley . Permission +# Copyright (c) 2004-2016 Jeremy Stanley . Permission # to use, copy, modify, and distribute this software is granted under # terms provided in the LICENSE file distributed with this software. @@ -9,10 +9,9 @@ __control__: private_files: [ "account.yaml" ] read_only: yes -internal:language: - actions: { "?": "ask", ",": "begin", "-": "begin", ":": "begin", ";": "begin", "!": "exclaim", "...": "muse", ".": "say" } - default_punctuation: . - typos: { "i": "I", "i'd": "I'd", "i'll": "I'll", "i'm": "I'm", "teh": "the", "theyre": "they're", "youre": "you're" } +.mudpy.linguistic.actions: { "?": "ask", ",": "begin", "-": "begin", ":": "begin", ";": "begin", "!": "exclaim", "...": "muse", ".": "say" } +.mudpy.linguistic.default_punctuation: . +.mudpy.linguistic.typos: { "i": "I", "i'd": "I'd", "i'll": "I'll", "i'm": "I'm", "teh": "the", "theyre": "they're", "youre": "you're" } internal:limits: #default_admins: [ "admin" ] diff --git a/lib/mudpy/misc.py b/lib/mudpy/misc.py index bf107a4..c0845c5 100644 --- a/lib/mudpy/misc.py +++ b/lib/mudpy/misc.py @@ -2055,11 +2055,11 @@ def command_say(actor, parameters): if message: # match the punctuation used, if any, to an action - actions = universe.categories["internal"]["language"].get( + actions = universe.contents["mudpy.linguistic"].get( "actions" ) default_punctuation = ( - universe.categories["internal"]["language"].get( + universe.contents["mudpy.linguistic"].get( "default_punctuation")) action = "" @@ -2084,7 +2084,7 @@ def command_say(actor, parameters): message = message[0].lower() + message[1:] # iterate over all words in message, replacing typos - typos = universe.categories["internal"]["language"].get( + typos = universe.contents["mudpy.linguistic"].get( "typos" ) words = message.split() -- 2.11.0