Rename the generator contrib into random_string_generator

This commit is contained in:
Vincent Le Goff 2017-07-25 22:25:29 +02:00 committed by Griatch
parent 90ae35d9fb
commit d306c25583
3 changed files with 8 additions and 8 deletions

View file

@ -30,8 +30,6 @@ things you want from here into your game folder and change them there.
multiple descriptions for time and season as well as details.
* GenderSub (Griatch 2015) - Simple example (only) of storing gender
on a character and access it in an emote with a custom marker.
* Generator (Vincent Le Goff 2017) - Simple pseudo-random generator of
strings with rules, avoiding repetitions.
* Mail (grungies1138 2016) - An in-game mail system for communication.
* Menu login (Griatch 2011) - A login system using menus asking
for name/password rather than giving them as one command
@ -40,6 +38,8 @@ things you want from here into your game folder and change them there.
* Menu Login (Vincent-lg 2016) - Alternate login system using EvMenu.
* Multidescer (Griatch 2016) - Advanced descriptions combined from
many separate description components, inspired by MUSH.
* Random_string_generator (Vincent Le Goff 2017) - Simple pseudo-random
gereator of strings with rules, avoiding repetitions.
* RPLanguage (Griatch 2015) - Dynamic obfuscation of emotes when
speaking unfamiliar languages. Also obfuscates whispers.
* RPSystem (Griatch 2015) - Full director-style emoting system

View file

@ -11,7 +11,7 @@ stored and won't be available again in order to avoid repetition.
Here's a very simple example:
```python
from evennia.contrib.generator import Generator
from evennia.contrib.random_string_generator import Generator
# Create a generator for phone numbers
phone_generator = Generator("phone number", r"555-\d{3}-\d{4}")
# Generate a phone number (555-XXX-XXXX with X as numbers)
@ -163,7 +163,7 @@ class Generator(object):
try:
script = ScriptDB.objects.get(db_key="generator_script")
except ScriptDB.DoesNotExist:
script = create_script("contrib.generator.GeneratorScript")
script = create_script("contrib.random_string_generator.GeneratorScript")
type(self).script = script
return script

View file

@ -987,11 +987,11 @@ class TestUnixCommand(CommandTest):
self.assertTrue(any(l.startswith("dummy: error:") for l in lines))
from evennia.contrib import generator
from evennia.contrib import random_string_generator
SIMPLE_GENERATOR = generator.Generator("simple", "[01]{2}")
SIMPLE_GENERATOR = random_string_generator.Generator("simple", "[01]{2}")
class TestGenerator(EvenniaTest):
class TestRandomStringGenerator(EvenniaTest):
def test_generate(self):
"""Generate and fail when exhausted."""
@ -1004,5 +1004,5 @@ class TestGenerator(EvenniaTest):
# At this point, we have generated 4 strings.
# We can't generate one more
with self.assertRaises(generator.ExhaustedGenerator):
with self.assertRaises(random_string_generator.ExhaustedGenerator):
SIMPLE_GENERATOR.get()