Rename internal:language: to .mudpy.linguistic
authorJeremy Stanley <fungi@yuggoth.org>
Mon, 9 May 2016 05:09:14 +0000 (05:09 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Mon, 9 May 2016 05:09:14 +0000 (05:09 +0000)
Convert the old style internal:language element to a new style
.mudpy.linguistic element and adjust the command_say() function
accordingly.

etc/mudpy.yaml
lib/mudpy/misc.py

index 08832e6..e6fd405 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2004-2014 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-2016 Jeremy Stanley <fungi@yuggoth.org>. 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" ]
index bf107a4..c0845c5 100644 (file)
@@ -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()