QBFreak / SolarWinds-Evennia

A fresh attempt at my SolarWinds MUD concept, this time with the Evennia engine
Other
1 stars 0 forks source link

Random colors on new player creation should not use hard-coded list #2

Open QBFreak opened 6 years ago

QBFreak commented 6 years ago

Presently, when typeclasses.characters.Character.at_object_creation() is called, it selects a random color for the new character from a hard-coded list of colors.

        colors = ['r', 'g', 'y', 'b', 'm', 'c', 'w']
        self.db.color = random.choice(colors)
        if random.choice([True, False]):
            self.db.color = self.db.color.upper()

What really needs to happen, is to employ the same method that the @color ansi command uses. (see evennia.commands.default.account.CmdColorTest.func())

QBFreak commented 6 years ago

Update unit test in typeclasses.test_characters.TestCharacterAtColor() to match.