def create_character(self, name, owner=""): '''Create an in-world character if one does not already exist. If one exists, return it.''' # TODO: This is pretty dumb and needs reorganized. charobj = self.get_character(name) if not charobj: # No character in the db named that, # So create an object for the player and save it. charobj = Character() charobj.name = name charobj.owner = owner charobj.states.append('player') return charobj