Format code imports
This commit is contained in:
parent
92834aacd0
commit
a461a97576
361 changed files with 1019 additions and 754 deletions
|
|
@ -33,8 +33,8 @@ See the ./README.md file for details and install instructions.
|
|||
|
||||
from django.core.exceptions import (
|
||||
ImproperlyConfigured,
|
||||
SuspiciousOperation,
|
||||
SuspiciousFileOperation,
|
||||
SuspiciousOperation,
|
||||
)
|
||||
|
||||
try:
|
||||
|
|
@ -72,6 +72,7 @@ import posixpath
|
|||
import threading
|
||||
from gzip import GzipFile
|
||||
from tempfile import SpooledTemporaryFile
|
||||
|
||||
from django.core.files.base import File
|
||||
from django.core.files.storage import Storage
|
||||
from django.utils.deconstruct import deconstructible
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
import datetime
|
||||
import gzip
|
||||
import pickle
|
||||
import threading
|
||||
from unittest import skipIf
|
||||
from django.test import override_settings
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.files.base import ContentFile
|
||||
from django.test import TestCase
|
||||
from django.test import TestCase, override_settings
|
||||
from django.utils.timezone import is_aware, utc
|
||||
|
||||
import datetime, gzip, pickle, threading
|
||||
|
||||
_SKIP = False
|
||||
try:
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
from .awsstorage import aws_s3_cdn as s3boto3
|
||||
except ImportError:
|
||||
_SKIP = True
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
Build-menu contrib - vincent-lg 2018
|
||||
|
||||
"""
|
||||
from .building_menu import GenericBuildingCmd # noqa
|
||||
from .building_menu import BuildingMenu # noqa
|
||||
from .building_menu import GenericBuildingCmd # noqa
|
||||
|
|
|
|||
|
|
@ -126,14 +126,14 @@ from inspect import getargspec
|
|||
from textwrap import dedent
|
||||
|
||||
from django.conf import settings
|
||||
from evennia import Command, CmdSet
|
||||
|
||||
from evennia import CmdSet, Command
|
||||
from evennia.commands import cmdhandler
|
||||
from evennia.utils.ansi import strip_ansi
|
||||
from evennia.utils.eveditor import EvEditor
|
||||
from evennia.utils.logger import log_err, log_trace
|
||||
from evennia.utils.utils import class_from_module
|
||||
|
||||
|
||||
# Constants
|
||||
_MAX_TEXT_WIDTH = settings.CLIENT_DEFAULT_WIDTH
|
||||
_CMD_NOMATCH = cmdhandler.CMD_NOMATCH
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Building menu tests.
|
|||
"""
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from .building_menu import BuildingMenu, CmdNoMatch
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ Test Color markup.
|
|||
"""
|
||||
|
||||
import re
|
||||
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from . import color_markups
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
from evennia.contrib.base_systems.components import Component, DBField, TagField, signals
|
||||
from evennia.contrib.base_systems.components.holder import ComponentProperty, ComponentHolderMixin
|
||||
from evennia.contrib.base_systems.components.holder import ComponentHolderMixin, ComponentProperty
|
||||
from evennia.contrib.base_systems.components.signals import as_listener
|
||||
from evennia.objects.objects import DefaultCharacter
|
||||
from evennia.utils import create
|
||||
from evennia.utils.test_resources import EvenniaTest, BaseEvenniaTest
|
||||
from evennia.utils.test_resources import BaseEvenniaTest, EvenniaTest
|
||||
|
||||
|
||||
class ComponentTestA(Component):
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ Custom gametime contrib - Griatch, vlgeoff 2017
|
|||
|
||||
"""
|
||||
|
||||
from .custom_gametime import time_to_tuple, UNITS # noqa
|
||||
from .custom_gametime import gametime_to_realtime # noqa
|
||||
from .custom_gametime import realtime_to_gametime # noqa
|
||||
from .custom_gametime import custom_gametime # noqa
|
||||
from .custom_gametime import real_seconds_until # noqa
|
||||
from .custom_gametime import schedule # noqa
|
||||
from .custom_gametime import GametimeScript # noqa
|
||||
from .custom_gametime import custom_gametime # noqa
|
||||
from .custom_gametime import gametime_to_realtime # noqa
|
||||
from .custom_gametime import real_seconds_until # noqa
|
||||
from .custom_gametime import realtime_to_gametime # noqa
|
||||
from .custom_gametime import schedule # noqa
|
||||
from .custom_gametime import UNITS, time_to_tuple # noqa
|
||||
|
|
|
|||
|
|
@ -35,9 +35,10 @@ the converter functions in this module.
|
|||
# change these to fit your game world
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia import DefaultScript
|
||||
from evennia.utils.create import create_script
|
||||
from evennia.utils import gametime
|
||||
from evennia.utils.create import create_script
|
||||
|
||||
# The game time speedup / slowdown relative real time
|
||||
TIMEFACTOR = settings.TIME_FACTOR
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ Testing custom game time
|
|||
|
||||
# Testing custom_gametime
|
||||
from mock import Mock, patch
|
||||
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from .. import custom_gametime
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ Email login contrib - Griatch 2012
|
|||
|
||||
"""
|
||||
|
||||
from .email_login import UnloggedinCmdSet # noqa
|
||||
from . import connection_screens # noqa
|
||||
from .email_login import UnloggedinCmdSet # noqa
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ of the screen is done by the unlogged-in "look" command.
|
|||
"""
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia import utils
|
||||
|
||||
CONNECTION_SCREEN = """
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ the module given by settings.CONNECTION_SCREEN_MODULE.
|
|||
"""
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia.accounts.models import AccountDB
|
||||
from evennia.commands.cmdhandler import CMD_LOGINSTART
|
||||
from evennia.commands.cmdset import CmdSet
|
||||
|
|
|
|||
|
|
@ -3,10 +3,4 @@ In-game Python - vlgeoff 2017
|
|||
|
||||
"""
|
||||
|
||||
from . import callbackhandler
|
||||
from . import commands
|
||||
from . import eventfuncs
|
||||
from . import scripts
|
||||
from . import tests
|
||||
from . import typeclasses
|
||||
from . import utils
|
||||
from . import callbackhandler, commands, eventfuncs, scripts, tests, typeclasses, utils
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@ Module containing the commands of the in-game Python system.
|
|||
from datetime import datetime
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia.contrib.base_systems.ingame_python.utils import get_event_handler
|
||||
from evennia.utils.ansi import raw
|
||||
from evennia.utils.eveditor import EvEditor
|
||||
from evennia.utils.evtable import EvTable
|
||||
from evennia.utils.utils import class_from_module, time_format
|
||||
from evennia.contrib.base_systems.ingame_python.utils import get_event_handler
|
||||
|
||||
COMMAND_DEFAULT_CLASS = class_from_module(settings.COMMAND_DEFAULT_CLASS)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@
|
|||
Scripts for the in-game Python system.
|
||||
"""
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from queue import Queue
|
||||
import re
|
||||
import sys
|
||||
import traceback
|
||||
from datetime import datetime, timedelta
|
||||
from queue import Queue
|
||||
|
||||
from django.conf import settings
|
||||
from evennia import DefaultObject, DefaultScript, ChannelDB, ScriptDB
|
||||
from evennia import logger
|
||||
|
||||
from evennia import ChannelDB, DefaultObject, DefaultScript, ScriptDB, logger
|
||||
from evennia.contrib.base_systems.ingame_python.callbackhandler import CallbackHandler
|
||||
from evennia.contrib.base_systems.ingame_python.utils import EVENTS, InterruptEvent, get_next_wait
|
||||
from evennia.utils.ansi import raw
|
||||
from evennia.utils.create import create_channel
|
||||
from evennia.utils.dbserialize import dbserialize
|
||||
from evennia.utils.utils import all_from_module, delay, pypath_to_realpath
|
||||
from evennia.contrib.base_systems.ingame_python.callbackhandler import CallbackHandler
|
||||
from evennia.contrib.base_systems.ingame_python.utils import get_next_wait, EVENTS, InterruptEvent
|
||||
|
||||
# Constants
|
||||
RE_LINE_ERROR = re.compile(r'^ File "\<string\>", line (\d+)')
|
||||
|
|
|
|||
|
|
@ -2,18 +2,20 @@
|
|||
Module containing the test cases for the in-game Python system.
|
||||
"""
|
||||
|
||||
from mock import Mock
|
||||
from textwrap import dedent
|
||||
|
||||
from django.conf import settings
|
||||
from mock import Mock
|
||||
|
||||
from evennia import ScriptDB
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.objects.objects import ExitCommand
|
||||
from evennia.utils import ansi, utils
|
||||
from evennia.utils.create import create_object, create_script
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
from .commands import CmdCallback
|
||||
|
||||
from .callbackhandler import CallbackHandler
|
||||
from .commands import CmdCallback
|
||||
|
||||
# Force settings
|
||||
settings.EVENTS_CALENDAR = "standard"
|
||||
|
|
|
|||
|
|
@ -7,15 +7,14 @@ default ones in evennia core.
|
|||
|
||||
"""
|
||||
|
||||
from evennia import DefaultCharacter, DefaultExit, DefaultObject, DefaultRoom
|
||||
from evennia import ScriptDB
|
||||
from evennia.utils.utils import delay, inherits_from, lazy_property
|
||||
from evennia import DefaultCharacter, DefaultExit, DefaultObject, DefaultRoom, ScriptDB
|
||||
from evennia.contrib.base_systems.ingame_python.callbackhandler import CallbackHandler
|
||||
from evennia.contrib.base_systems.ingame_python.utils import (
|
||||
phrase_event,
|
||||
register_events,
|
||||
time_event,
|
||||
phrase_event,
|
||||
)
|
||||
from evennia.utils.utils import delay, inherits_from, lazy_property
|
||||
|
||||
# Character help
|
||||
CHARACTER_CAN_DELETE = """
|
||||
|
|
|
|||
|
|
@ -6,14 +6,13 @@ These functions are to be used by developers to customize events and callbacks.
|
|||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from evennia import logger
|
||||
from evennia import ScriptDB
|
||||
|
||||
from evennia import ScriptDB, logger
|
||||
from evennia.contrib.base_systems.custom_gametime import UNITS, gametime_to_realtime
|
||||
from evennia.contrib.base_systems.custom_gametime import real_seconds_until as custom_rsu
|
||||
from evennia.utils.create import create_script
|
||||
from evennia.utils.gametime import real_seconds_until as standard_rsu
|
||||
from evennia.utils.utils import class_from_module
|
||||
from evennia.contrib.base_systems.custom_gametime import UNITS
|
||||
from evennia.contrib.base_systems.custom_gametime import gametime_to_realtime
|
||||
from evennia.contrib.base_systems.custom_gametime import real_seconds_until as custom_rsu
|
||||
|
||||
# Temporary storage for events waiting for the script to be started
|
||||
EVENTS = []
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ Menu-login - Vinvent-lg 2016, Griatch 2019
|
|||
|
||||
"""
|
||||
|
||||
from .menu_login import UnloggedinCmdSet # noqa
|
||||
from . import connection_screens # noqa
|
||||
from .menu_login import UnloggedinCmdSet # noqa
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ of the screen is done by the unlogged-in "look" command.
|
|||
"""
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia import utils
|
||||
|
||||
CONNECTION_SCREEN = """
|
||||
|
|
|
|||
|
|
@ -21,10 +21,9 @@ called automatically when a new user connects.
|
|||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia import Command, CmdSet
|
||||
from evennia import syscmdkeys
|
||||
from evennia import CmdSet, Command, syscmdkeys
|
||||
from evennia.utils.evmenu import EvMenu
|
||||
from evennia.utils.utils import random_string_from_module, class_from_module, callables_from_module
|
||||
from evennia.utils.utils import callables_from_module, class_from_module, random_string_from_module
|
||||
|
||||
_CONNECTION_SCREEN_MODULE = settings.CONNECTION_SCREEN_MODULE
|
||||
_GUEST_ENABLED = settings.GUEST_ENABLED
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Test menu_login
|
|||
"""
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from . import menu_login
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ class CharacterCmdSet(default_cmds.CharacterCmdSet):
|
|||
|
||||
"""
|
||||
from django.conf import settings
|
||||
|
||||
from evennia.commands.cmdset import CmdSet
|
||||
from evennia.commands.default.comms import CmdChannel
|
||||
from evennia.utils import logger
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Legacy Mux comms tests (extracted from 0.9.5)
|
|||
"""
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from . import mux_comms_cmds as comms
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Test of the Unixcommand.
|
|||
"""
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from .unixcommand import UnixCommand
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -28,11 +28,12 @@ Admin/development commands
|
|||
"""
|
||||
|
||||
import re
|
||||
|
||||
from django.conf import settings
|
||||
from evennia import SESSION_HANDLER
|
||||
from evennia import Command, CmdSet, InterruptCommand, default_cmds
|
||||
from evennia import syscmdkeys
|
||||
|
||||
from evennia import SESSION_HANDLER, CmdSet, Command, InterruptCommand, default_cmds, syscmdkeys
|
||||
from evennia.utils import variable_from_module
|
||||
|
||||
from .utils import create_evscaperoom_object
|
||||
|
||||
_AT_SEARCH_RESULT = variable_from_module(*settings.SEARCH_AT_RESULT.rsplit(".", 1))
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ new room (to start from scratch) or join an existing room (with other players).
|
|||
|
||||
"""
|
||||
from evennia import EvMenu
|
||||
from evennia.utils import create, justify, list_to_string, logger
|
||||
from evennia.utils.evmenu import list_node
|
||||
from evennia.utils import create, justify, list_to_string
|
||||
from evennia.utils import logger
|
||||
|
||||
from .room import EvscapeRoom
|
||||
from .utils import create_fantasy_word
|
||||
|
||||
|
|
@ -217,8 +217,8 @@ def node_quit(caller, raw_string, **kwargs):
|
|||
# we check an Attribute on the caller to see if we should
|
||||
# leave the game entirely when leaving
|
||||
if caller.db.evscaperoom_standalone:
|
||||
from evennia.commands import cmdhandler
|
||||
from evennia import default_cmds
|
||||
from evennia.commands import cmdhandler
|
||||
|
||||
cmdhandler.cmdhandler(
|
||||
caller.ndb._menutree._session, "", cmdobj=default_cmds.CmdQuit(), cmdobj_key="@quit"
|
||||
|
|
|
|||
|
|
@ -43,12 +43,13 @@ Available parents:
|
|||
- Positionable (supports sit/lie/knee/climb at once)
|
||||
|
||||
"""
|
||||
import re
|
||||
import inspect
|
||||
import re
|
||||
|
||||
from evennia import DefaultObject
|
||||
from evennia.utils.utils import list_to_string, wrap
|
||||
from .utils import create_evscaperoom_object
|
||||
from .utils import parse_for_perspectives, parse_for_things
|
||||
|
||||
from .utils import create_evscaperoom_object, parse_for_perspectives, parse_for_things
|
||||
|
||||
|
||||
class EvscaperoomObject(DefaultObject):
|
||||
|
|
|
|||
|
|
@ -7,14 +7,13 @@ that particular escaperoom challenge should be gone.
|
|||
|
||||
"""
|
||||
|
||||
from evennia import DefaultRoom, DefaultCharacter, DefaultObject
|
||||
from evennia import utils
|
||||
from evennia.utils.ansi import strip_ansi
|
||||
from evennia import logger
|
||||
from evennia import DefaultCharacter, DefaultObject, DefaultRoom, logger, utils
|
||||
from evennia.locks.lockhandler import check_lockstring
|
||||
from evennia.utils.ansi import strip_ansi
|
||||
from evennia.utils.utils import lazy_property, list_to_string
|
||||
from .objects import EvscaperoomObject
|
||||
|
||||
from .commands import CmdSetEvScapeRoom
|
||||
from .objects import EvscaperoomObject
|
||||
from .state import StateHandler
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,14 +12,15 @@ state is identified by its module name.
|
|||
|
||||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from functools import wraps
|
||||
from evennia import utils
|
||||
from evennia import logger
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia import logger, utils
|
||||
|
||||
from .objects import EvscaperoomObject
|
||||
from .utils import create_evscaperoom_object, msg_cinematic, parse_for_things
|
||||
|
||||
|
||||
# state setup
|
||||
if hasattr(settings, "EVSCAPEROOM_STATE_PACKAGE"):
|
||||
_ROOMSTATE_PACKAGE = settings.EVSCAPEROOM_STATE_PACKAGE
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ teleported back to the evscaperoom menu.
|
|||
|
||||
"""
|
||||
|
||||
from evennia.contrib.full_systems.evscaperoom.state import BaseState
|
||||
from evennia.contrib.full_systems.evscaperoom import objects
|
||||
from evennia.contrib.full_systems.evscaperoom.state import BaseState
|
||||
|
||||
GREETING = """
|
||||
This is the situation, {name}:
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@ Unit tests for the Evscaperoom
|
|||
import inspect
|
||||
import pkgutil
|
||||
from os import path
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from evennia import InterruptCommand
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils import mod_import
|
||||
from . import commands
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from . import commands, objects
|
||||
from . import state as basestate
|
||||
from . import objects
|
||||
from . import utils
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ and does not need to be imported from here.
|
|||
|
||||
import re
|
||||
from random import choice
|
||||
|
||||
from evennia import create_object, search_object
|
||||
from evennia.utils import justify, inherits_from
|
||||
from evennia.utils import inherits_from, justify
|
||||
|
||||
_BASE_TYPECLASS_PATH = "evscaperoom.objects."
|
||||
_RE_PERSPECTIVE = re.compile(r"~(\w+)", re.I + re.U + re.M)
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ in-game.
|
|||
|
||||
"""
|
||||
|
||||
from evennia.commands.command import Command
|
||||
from evennia.commands.cmdset import CmdSet
|
||||
from evennia.commands.command import Command
|
||||
from evennia.scripts.scripts import DefaultScript
|
||||
|
||||
TRADE_TIMEOUT = 60 # timeout for B to accept trade
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ Test the contrib barter system
|
|||
"""
|
||||
|
||||
from mock import Mock
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils.create import create_object
|
||||
|
||||
from . import barter
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -73,12 +73,9 @@ with which to test the system:
|
|||
|
||||
"""
|
||||
|
||||
from evennia import DefaultObject
|
||||
from evennia import DefaultCharacter
|
||||
from evennia import default_cmds
|
||||
from evennia import DefaultCharacter, DefaultObject, default_cmds
|
||||
from evennia.commands.default.muxcommand import MuxCommand
|
||||
from evennia.utils import list_to_string
|
||||
from evennia.utils import evtable
|
||||
from evennia.utils import evtable, list_to_string
|
||||
|
||||
# Options start here.
|
||||
# Maximum character length of 'wear style' strings, or None for unlimited.
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ Testing clothing contrib
|
|||
"""
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils.create import create_object
|
||||
from evennia.objects.objects import DefaultRoom
|
||||
from evennia.utils.create import create_object
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from . import clothing
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ Cooldowns tests.
|
|||
"""
|
||||
|
||||
from mock import patch
|
||||
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from . import cooldowns
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Crafting - Griatch 2020
|
|||
|
||||
"""
|
||||
|
||||
from .crafting import craft # noqa
|
||||
from .crafting import CraftingRecipe # noqa
|
||||
from .crafting import CraftingRecipeBase # noqa
|
||||
from .crafting import craft # noqa
|
||||
from .crafting import CraftingError, CraftingValidationError # noqa
|
||||
|
|
|
|||
|
|
@ -121,11 +121,12 @@ a full example of the components for creating a sword from base components.
|
|||
|
||||
import functools
|
||||
from copy import copy
|
||||
from evennia.utils.utils import iter_to_str, callables_from_module, inherits_from, make_iter
|
||||
|
||||
from evennia.commands.cmdset import CmdSet
|
||||
from evennia.commands.command import Command
|
||||
from evennia.prototypes.spawner import spawn
|
||||
from evennia.utils.create import create_object
|
||||
from evennia.utils.utils import callables_from_module, inherits_from, iter_to_str, make_iter
|
||||
|
||||
_RECIPE_CLASSES = {}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,10 +69,11 @@ just mocked for the example.
|
|||
|
||||
"""
|
||||
|
||||
from random import random, randint
|
||||
from evennia.commands.command import Command, InterruptCommand
|
||||
from .crafting import craft, CraftingRecipe, CraftingValidationError
|
||||
from random import randint, random
|
||||
|
||||
from evennia.commands.command import Command, InterruptCommand
|
||||
|
||||
from .crafting import CraftingRecipe, CraftingValidationError, craft
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Sword recipe
|
||||
|
|
|
|||
|
|
@ -4,11 +4,14 @@ Unit tests for the crafting system contrib.
|
|||
"""
|
||||
|
||||
from unittest import mock
|
||||
from django.test import override_settings
|
||||
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.test import override_settings
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils.test_resources import BaseEvenniaTestCase
|
||||
from evennia.utils.create import create_object
|
||||
from evennia.utils.test_resources import BaseEvenniaTestCase
|
||||
|
||||
from . import crafting, example_recipes
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ default cmdset before it becomes available.
|
|||
"""
|
||||
|
||||
import re
|
||||
|
||||
from evennia import Command, DefaultCharacter
|
||||
from evennia.utils import logger
|
||||
from evennia import DefaultCharacter
|
||||
from evennia import Command
|
||||
|
||||
# gender maps
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@ Test gendersub contrib.
|
|||
"""
|
||||
|
||||
|
||||
from mock import patch
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils.create import create_object
|
||||
from mock import patch
|
||||
|
||||
from . import gendersub
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,11 +42,10 @@ ic/ooc to switch in and out of IC/OOC modes.
|
|||
"""
|
||||
|
||||
import re
|
||||
from evennia import ObjectDB, AccountDB
|
||||
from evennia import default_cmds
|
||||
from evennia.utils import create, evtable, make_iter, inherits_from, datetime_format
|
||||
from evennia.comms.models import Msg
|
||||
|
||||
from evennia import AccountDB, ObjectDB, default_cmds
|
||||
from evennia.comms.models import Msg
|
||||
from evennia.utils import create, datetime_format, evtable, inherits_from, make_iter
|
||||
|
||||
_HEAD_CHAR = "|015-|n"
|
||||
_SUB_HEAD_CHAR = "-"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Test mail contrib
|
|||
"""
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from . import mail
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ will replace the default `desc` command).
|
|||
|
||||
"""
|
||||
import re
|
||||
from evennia import default_cmds
|
||||
from evennia.utils.utils import crop
|
||||
from evennia.utils.eveditor import EvEditor
|
||||
|
||||
from evennia import default_cmds
|
||||
from evennia.utils.eveditor import EvEditor
|
||||
from evennia.utils.utils import crop
|
||||
|
||||
# regex for the set functionality
|
||||
_RE_KEYS = re.compile(r"([\w\s]+)(?:\+*?)", re.U + re.I)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Test multidescer contrib.
|
|||
"""
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from . import multidescer
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ Puzzles - Henddher 2018
|
|||
|
||||
"""
|
||||
|
||||
from .puzzles import PuzzleSystemCmdSet # noqa
|
||||
from .puzzles import PuzzleRecipe # noqa
|
||||
from .puzzles import PuzzleSystemCmdSet # noqa
|
||||
|
|
|
|||
|
|
@ -73,16 +73,12 @@ are spawened on their corresponding location.
|
|||
|
||||
import itertools
|
||||
from random import choice
|
||||
from evennia import create_script
|
||||
from evennia import CmdSet
|
||||
from evennia import DefaultScript
|
||||
from evennia import DefaultCharacter
|
||||
from evennia import DefaultRoom
|
||||
from evennia import DefaultExit
|
||||
|
||||
from evennia import CmdSet, DefaultCharacter, DefaultExit, DefaultRoom, DefaultScript, create_script
|
||||
from evennia.commands.default.muxcommand import MuxCommand
|
||||
from evennia.utils.utils import inherits_from
|
||||
from evennia.utils import search, utils, logger
|
||||
from evennia.prototypes.spawner import spawn
|
||||
from evennia.utils import logger, search, utils
|
||||
from evennia.utils.utils import inherits_from
|
||||
|
||||
# Tag used by puzzles
|
||||
_PUZZLES_TAG_CATEGORY = "puzzles"
|
||||
|
|
|
|||
|
|
@ -5,12 +5,15 @@ Testing puzzles.
|
|||
|
||||
# Test of the Puzzles module
|
||||
|
||||
import re
|
||||
import itertools
|
||||
import re
|
||||
|
||||
from mock import Mock
|
||||
from evennia.utils import search
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils import search
|
||||
from evennia.utils.create import create_object
|
||||
|
||||
from . import puzzles
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ in your game and using it as-is.
|
|||
"""
|
||||
|
||||
from random import randint
|
||||
from evennia import DefaultCharacter, Command, default_cmds, DefaultScript
|
||||
|
||||
from evennia import Command, DefaultCharacter, DefaultScript, default_cmds
|
||||
from evennia.commands.default.help import CmdHelp
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ in your game and using it as-is.
|
|||
"""
|
||||
|
||||
from random import randint
|
||||
from evennia import Command, default_cmds, DefaultObject
|
||||
|
||||
from evennia import Command, DefaultObject, default_cmds
|
||||
|
||||
from . import tb_basic
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -67,10 +67,12 @@ in your game and using it as-is.
|
|||
"""
|
||||
|
||||
from random import randint
|
||||
|
||||
from evennia import TICKER_HANDLER as tickerhandler
|
||||
from evennia import Command, default_cmds
|
||||
from evennia.commands.default.muxcommand import MuxCommand
|
||||
from evennia.prototypes.spawner import spawn
|
||||
from evennia import TICKER_HANDLER as tickerhandler
|
||||
|
||||
from . import tb_basic
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -67,9 +67,10 @@ in your game and using it as-is.
|
|||
"""
|
||||
|
||||
from random import randint
|
||||
from evennia.utils.logger import log_trace
|
||||
from evennia import Command, default_cmds, DefaultScript, create_object
|
||||
|
||||
from evennia import Command, DefaultScript, create_object, default_cmds
|
||||
from evennia.commands.default.muxcommand import MuxCommand
|
||||
from evennia.utils.logger import log_trace
|
||||
|
||||
from . import tb_basic
|
||||
|
||||
|
|
|
|||
|
|
@ -101,8 +101,10 @@ in your game and using it as-is.
|
|||
"""
|
||||
|
||||
from random import randint
|
||||
from evennia import DefaultObject, Command, default_cmds, DefaultScript
|
||||
|
||||
from evennia import Command, DefaultObject, DefaultScript, default_cmds
|
||||
from evennia.commands.default.help import CmdHelp
|
||||
|
||||
from . import tb_basic
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@ Turnbattle tests.
|
|||
|
||||
"""
|
||||
|
||||
from mock import MagicMock, patch
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.objects.objects import DefaultRoom
|
||||
from evennia.utils.create import create_object
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
from mock import MagicMock, patch
|
||||
|
||||
from . import tb_basic, tb_equip, tb_items, tb_magic, tb_range
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ Extended Room - Griatch 2012, vincent-lg 2019
|
|||
|
||||
"""
|
||||
|
||||
from .extended_room import ExtendedRoom # noqa
|
||||
from .extended_room import ExtendedRoomCmdSet # noqa
|
||||
from .extended_room import CmdExtendedRoomLook # noqa
|
||||
from .extended_room import CmdExtendedRoomDesc # noqa
|
||||
from .extended_room import CmdExtendedRoomDetail # noqa
|
||||
from .extended_room import CmdExtendedRoomGameTime # noqa
|
||||
from .extended_room import CmdExtendedRoomLook # noqa
|
||||
from .extended_room import ExtendedRoom # noqa
|
||||
from .extended_room import ExtendedRoomCmdSet # noqa
|
||||
|
|
|
|||
|
|
@ -86,12 +86,10 @@ typeclass or use the `typeclass` command to swap existing rooms.
|
|||
|
||||
import datetime
|
||||
import re
|
||||
|
||||
from django.conf import settings
|
||||
from evennia import DefaultRoom
|
||||
from evennia import gametime
|
||||
from evennia import default_cmds
|
||||
from evennia import utils
|
||||
from evennia import CmdSet
|
||||
|
||||
from evennia import CmdSet, DefaultRoom, default_cmds, gametime, utils
|
||||
|
||||
# error return function, needed by Extended Look command
|
||||
_AT_SEARCH_RESULT = utils.variable_from_module(*settings.SEARCH_AT_RESULT.rsplit(".", 1))
|
||||
|
|
|
|||
|
|
@ -4,10 +4,13 @@ Testing of ExtendedRoom contrib
|
|||
"""
|
||||
|
||||
import datetime
|
||||
from mock import patch, Mock
|
||||
|
||||
from django.conf import settings
|
||||
from mock import Mock, patch
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.objects.objects import DefaultRoom
|
||||
|
||||
from . import extended_room
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,9 @@ If you don't want the player to be able to specify the size of the map, ignore a
|
|||
arguments passed into the Map command.
|
||||
"""
|
||||
import time
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia import CmdSet
|
||||
from evennia.commands.default.muxcommand import MuxCommand
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@ Tests of ingame_map_display.
|
|||
"""
|
||||
|
||||
|
||||
from typeclasses import exits, rooms
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils.create import create_object
|
||||
from typeclasses import rooms, exits
|
||||
|
||||
from . import ingame_map_display
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -279,10 +279,11 @@ EXAMPLE2_LEGEND = {
|
|||
---
|
||||
"""
|
||||
from django.conf import settings
|
||||
from evennia.utils import utils
|
||||
from evennia import create_object
|
||||
from typeclasses import exits
|
||||
|
||||
from evennia import create_object
|
||||
from evennia.utils import utils
|
||||
|
||||
COMMAND_DEFAULT_CLASS = utils.class_from_module(settings.COMMAND_DEFAULT_CLASS)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,16 +3,18 @@ Test map builder.
|
|||
|
||||
"""
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from . import mapbuilder
|
||||
import random
|
||||
from random import randint
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
from typeclasses import exits, rooms
|
||||
|
||||
# Add the necessary imports for your instructions here.
|
||||
from evennia import create_object
|
||||
from typeclasses import rooms, exits
|
||||
from random import randint
|
||||
import random
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from . import mapbuilder
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
# A map with a temple (▲) amongst mountains (n,∩) in a forest (♣,♠) on an
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ Simple Door - Griatch 2016
|
|||
|
||||
"""
|
||||
|
||||
from .simpledoor import SimpleDoorCmdSet # noqa
|
||||
from .simpledoor import SimpleDoor # noqa
|
||||
from .simpledoor import SimpleDoorCmdSet # noqa
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Tests of simpledoor.
|
|||
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from . import simpledoor
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Slow Exit - Griatch 2014
|
|||
|
||||
"""
|
||||
|
||||
from .slow_exit import SlowExitCmdSet # noqa
|
||||
from .slow_exit import SlowExit # noqa
|
||||
from .slow_exit import CmdSetSpeed # noqa
|
||||
from .slow_exit import CmdStop # noqa
|
||||
from .slow_exit import SlowExit # noqa
|
||||
from .slow_exit import SlowExitCmdSet # noqa
|
||||
|
|
|
|||
|
|
@ -55,11 +55,10 @@ TickerHandler might be better.
|
|||
|
||||
"""
|
||||
|
||||
from evennia.commands.cmdset import CmdSet
|
||||
from evennia.commands.command import Command
|
||||
from evennia.objects.objects import DefaultExit
|
||||
from evennia.utils import utils
|
||||
from evennia.commands.command import Command
|
||||
from evennia.commands.cmdset import CmdSet
|
||||
|
||||
|
||||
MOVE_DELAY = {"stroll": 6, "walk": 4, "run": 2, "sprint": 1}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ Slow exit tests.
|
|||
"""
|
||||
|
||||
from mock import Mock, patch
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils.create import create_object
|
||||
|
||||
from . import slow_exit
|
||||
|
||||
slow_exit.MOVE_DELAY = {"stroll": 0, "walk": 0, "run": 0, "sprint": 0}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ Wilderness contrib - titeuf87, 2017
|
|||
|
||||
"""
|
||||
|
||||
from .wilderness import WildernessExit # noqa
|
||||
from .wilderness import WildernessMapProvider # noqa
|
||||
from .wilderness import WildernessRoom # noqa
|
||||
from .wilderness import WildernessScript # noqa
|
||||
from .wilderness import create_wilderness # noqa
|
||||
from .wilderness import enter_wilderness # noqa
|
||||
from .wilderness import get_new_coordinates # noqa
|
||||
from .wilderness import WildernessScript # noqa
|
||||
from .wilderness import WildernessExit # noqa
|
||||
from .wilderness import WildernessRoom # noqa
|
||||
from .wilderness import WildernessMapProvider # noqa
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ Test wilderness
|
|||
|
||||
"""
|
||||
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
from evennia import DefaultCharacter
|
||||
from evennia.utils.create import create_object
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from . import wilderness
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -113,8 +113,7 @@ create a new wilderness (with the name "default") but using our new map provider
|
|||
|
||||
"""
|
||||
|
||||
from evennia import DefaultRoom, DefaultExit, DefaultScript
|
||||
from evennia import create_object, create_script
|
||||
from evennia import DefaultExit, DefaultRoom, DefaultScript, create_object, create_script
|
||||
from evennia.utils import inherits_from
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ XYZGrid - Griatch 2021
|
|||
|
||||
"""
|
||||
|
||||
from . import commands # noqa
|
||||
from . import example # noqa
|
||||
from . import launchcmd # noqa
|
||||
from . import prototypes # noqa
|
||||
|
|
@ -12,4 +13,3 @@ from . import xymap # noqa
|
|||
from . import xymap_legend # noqa
|
||||
from . import xyzgrid # noqa
|
||||
from . import xyzroom # noqa
|
||||
from . import commands # noqa
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ the commands with XYZ-aware equivalents.
|
|||
from collections import namedtuple
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia import CmdSet, InterruptCommand, default_cmds
|
||||
from evennia.commands.default import building
|
||||
from evennia.contrib.grid.xyzgrid.xyzgrid import get_xyzgrid
|
||||
|
|
|
|||
|
|
@ -17,11 +17,12 @@ Use `evennia xyzgrid help` for usage help.
|
|||
"""
|
||||
|
||||
from os.path import join as pathjoin
|
||||
from django.conf import settings
|
||||
import evennia
|
||||
from evennia.utils import ansi
|
||||
from evennia.contrib.grid.xyzgrid.xyzgrid import get_xyzgrid
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
import evennia
|
||||
from evennia.contrib.grid.xyzgrid.xyzgrid import get_xyzgrid
|
||||
from evennia.utils import ansi
|
||||
|
||||
_HELP_SHORT = """
|
||||
evennia xyzgrid help | list | init | add | spawn | initpath | delete [<options>]
|
||||
|
|
|
|||
|
|
@ -3,14 +3,15 @@
|
|||
Tests for the XYZgrid system.
|
||||
|
||||
"""
|
||||
from random import randint
|
||||
from unittest import mock
|
||||
|
||||
from random import randint
|
||||
from parameterized import parameterized
|
||||
from django.test import TestCase
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
from . import xymap, xyzgrid, xymap_legend, xyzroom
|
||||
from parameterized import parameterized
|
||||
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from . import xymap, xymap_legend, xyzgrid, xyzroom
|
||||
|
||||
MAP1 = """
|
||||
|
||||
|
|
|
|||
|
|
@ -95,25 +95,27 @@ See `./example.py` for a full grid example.
|
|||
import pickle
|
||||
from collections import defaultdict
|
||||
from os import mkdir
|
||||
from os.path import isdir, isfile, join as pathjoin
|
||||
from os.path import isdir, isfile
|
||||
from os.path import join as pathjoin
|
||||
|
||||
try:
|
||||
from scipy.sparse.csgraph import dijkstra
|
||||
from scipy.sparse import csr_matrix
|
||||
from scipy import zeros
|
||||
from scipy.sparse import csr_matrix
|
||||
from scipy.sparse.csgraph import dijkstra
|
||||
except ImportError as err:
|
||||
raise ImportError(
|
||||
f"{err}\nThe XYZgrid contrib requires "
|
||||
"the SciPy package. Install with `pip install scipy'."
|
||||
)
|
||||
from django.conf import settings
|
||||
from evennia.utils.utils import variable_from_module, mod_import, is_iter
|
||||
from evennia.utils import logger
|
||||
|
||||
from evennia.prototypes import prototypes as protlib
|
||||
from evennia.prototypes.spawner import flatten_prototype
|
||||
from evennia.utils import logger
|
||||
from evennia.utils.utils import is_iter, mod_import, variable_from_module
|
||||
|
||||
from .utils import MapError, MapParserError, BIGVAL
|
||||
from . import xymap_legend
|
||||
from .utils import BIGVAL, MapError, MapParserError
|
||||
|
||||
_NO_DB_PROTOTYPES = True
|
||||
if hasattr(settings, "XYZGRID_USE_DB_PROTOTYPES"):
|
||||
|
|
|
|||
|
|
@ -21,10 +21,11 @@ import uuid
|
|||
from collections import defaultdict
|
||||
|
||||
from django.core import exceptions as django_exceptions
|
||||
|
||||
from evennia.prototypes import spawner
|
||||
from evennia.utils.utils import class_from_module
|
||||
|
||||
from .utils import MAPSCAN, REVERSE_DIRECTIONS, MapParserError, BIGVAL, MapError
|
||||
from .utils import BIGVAL, MAPSCAN, REVERSE_DIRECTIONS, MapError, MapParserError
|
||||
|
||||
NodeTypeclass = None
|
||||
ExitTypeclass = None
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@ The grid has three main functions:
|
|||
from evennia.scripts.scripts import DefaultScript
|
||||
from evennia.utils import logger
|
||||
from evennia.utils.utils import variable_from_module
|
||||
|
||||
from .xymap import XYMap
|
||||
from .xyzroom import XYZRoom, XYZExit
|
||||
from .xyzroom import XYZExit, XYZRoom
|
||||
|
||||
|
||||
class XYZGrid(DefaultScript):
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ used as stand-alone XYZ-coordinate-aware rooms.
|
|||
|
||||
from django.conf import settings
|
||||
from django.db.models import Q
|
||||
|
||||
from evennia.objects.manager import ObjectManager
|
||||
from evennia.objects.objects import DefaultExit, DefaultRoom
|
||||
|
||||
|
|
|
|||
|
|
@ -98,12 +98,13 @@ You can see all the features of the `BaseBuff` class below, or browse `samplebuf
|
|||
many attributes and hook methods you can overload to create complex, interrelated buffs.
|
||||
|
||||
"""
|
||||
from random import random
|
||||
import time
|
||||
from random import random
|
||||
|
||||
from evennia import Command
|
||||
from evennia.server import signals
|
||||
from evennia.utils import utils, search
|
||||
from evennia.typeclasses.attributes import AttributeProperty
|
||||
from evennia.utils import search, utils
|
||||
|
||||
|
||||
class BaseBuff:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import random
|
||||
|
||||
from .buff import BaseBuff, Mod
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,14 +2,15 @@
|
|||
Tests for the buff system contrib
|
||||
"""
|
||||
from unittest.mock import Mock, call, patch
|
||||
from evennia import DefaultObject, create_object
|
||||
from evennia.utils import create
|
||||
from evennia.utils.utils import lazy_property
|
||||
from .samplebuffs import StatBuff
|
||||
from .buff import BaseBuff, Mod, BuffHandler, BuffableProperty
|
||||
from evennia.utils.test_resources import EvenniaTest
|
||||
|
||||
from evennia import DefaultObject, create_object
|
||||
from evennia.contrib.rpg.buffs import buff
|
||||
from evennia.utils import create
|
||||
from evennia.utils.test_resources import EvenniaTest
|
||||
from evennia.utils.utils import lazy_property
|
||||
|
||||
from .buff import BaseBuff, BuffableProperty, BuffHandler, Mod
|
||||
from .samplebuffs import StatBuff
|
||||
|
||||
|
||||
class _EmptyBuff(BaseBuff):
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import string
|
|||
from random import choices
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia import DefaultAccount
|
||||
from evennia.commands.default.muxcommand import MuxAccountCommand
|
||||
from evennia.objects.models import ObjectDB
|
||||
|
|
|
|||
|
|
@ -59,10 +59,11 @@ and other one-time method calls and set-up should be put here.
|
|||
"""
|
||||
|
||||
import inflect
|
||||
from typeclasses.characters import Character
|
||||
|
||||
from evennia.prototypes.spawner import spawn
|
||||
from evennia.utils import dedent
|
||||
from evennia.utils.evtable import EvTable
|
||||
from typeclasses.characters import Character
|
||||
|
||||
_INFLECT = inflect.engine()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from django.conf import settings
|
||||
from django.test import override_settings
|
||||
|
||||
from evennia import DefaultCharacter
|
||||
from evennia.commands.default import account
|
||||
from evennia.utils import inherits_from
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Rolling dice - Griatch, 2012
|
|||
|
||||
"""
|
||||
|
||||
from .dice import roll # noqa
|
||||
from .dice import roll_dice # noqa
|
||||
from .dice import CmdDice # noqa
|
||||
from .dice import DiceCmdSet # noqa
|
||||
from .dice import roll # noqa
|
||||
from .dice import roll_dice # noqa
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ dice.roll_dice(3, 10, ("+", 2)) # 3d10 + 2
|
|||
"""
|
||||
import re
|
||||
from random import randint
|
||||
from evennia import default_cmds, CmdSet
|
||||
|
||||
from evennia import CmdSet, default_cmds
|
||||
|
||||
|
||||
def roll(dicenum, dicetype, modifier=None, conditional=None, return_tuple=False):
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ Testing of TestDice.
|
|||
|
||||
"""
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from mock import patch
|
||||
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
|
||||
from . import dice
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Test health bar contrib
|
|||
"""
|
||||
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from . import health_bar
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,16 +3,34 @@ Roleplaying emotes and language - Griatch, 2015
|
|||
|
||||
"""
|
||||
|
||||
from .rpsystem import EmoteError, SdescError, RecogError, LanguageError # noqa
|
||||
from .rpsystem import parse_language, parse_sdescs_and_recogs, send_emote # noqa
|
||||
from .rpsystem import SdescHandler, RecogHandler # noqa
|
||||
from .rpsystem import RPCommand, CmdEmote, CmdSay, CmdSdesc, CmdPose, CmdRecog, CmdMask # noqa
|
||||
from .rpsystem import RPSystemCmdSet # noqa
|
||||
from .rplanguage import LanguageExistsError # noqa
|
||||
from .rplanguage import LanguageHandler # noqa
|
||||
from .rplanguage import (
|
||||
LanguageError,
|
||||
add_language,
|
||||
available_languages,
|
||||
obfuscate_language,
|
||||
obfuscate_whisper,
|
||||
)
|
||||
from .rpsystem import CmdSay # noqa
|
||||
from .rpsystem import ContribRPCharacter # noqa
|
||||
from .rpsystem import ContribRPObject # noqa
|
||||
from .rpsystem import ContribRPRoom # noqa
|
||||
from .rpsystem import ContribRPCharacter # noqa
|
||||
|
||||
from .rplanguage import LanguageError, LanguageExistsError # noqa
|
||||
from .rplanguage import LanguageHandler # noqa
|
||||
from .rplanguage import obfuscate_language, obfuscate_whisper # noqa
|
||||
from .rplanguage import add_language, available_languages # noqa
|
||||
from .rpsystem import RPSystemCmdSet # noqa
|
||||
from .rpsystem import (
|
||||
CmdEmote,
|
||||
CmdMask,
|
||||
CmdPose,
|
||||
CmdRecog,
|
||||
CmdSdesc,
|
||||
EmoteError,
|
||||
LanguageError,
|
||||
RecogError,
|
||||
RecogHandler,
|
||||
RPCommand,
|
||||
SdescError,
|
||||
SdescHandler,
|
||||
parse_language,
|
||||
parse_sdescs_and_recogs,
|
||||
send_emote,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ import re
|
|||
from string import punctuation
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia.commands.cmdset import CmdSet
|
||||
from evennia.commands.command import Command
|
||||
from evennia.objects.models import ObjectDB
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@ Tests for RP system
|
|||
|
||||
"""
|
||||
import time
|
||||
|
||||
from anything import Anything
|
||||
|
||||
from evennia import create_object
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
from evennia import create_object
|
||||
|
||||
from . import rpsystem
|
||||
from . import rplanguage
|
||||
from . import rplanguage, rpsystem
|
||||
|
||||
mtrans = {"testing": "1", "is": "2", "a": "3", "human": "4"}
|
||||
atrans = ["An", "automated", "advantageous", "repeatable", "faster"]
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ Traits - Whitenoise 2014, Griatch 2020
|
|||
|
||||
"""
|
||||
|
||||
from .traits import TraitException # noqa
|
||||
from .traits import MandatoryTraitKey # noqa
|
||||
from .traits import TraitException # noqa
|
||||
from .traits import TraitHandler # noqa
|
||||
from .traits import TraitProperty # noqa
|
||||
from .traits import Trait, StaticTrait, CounterTrait, GaugeTrait # noqa
|
||||
from .traits import CounterTrait, GaugeTrait, StaticTrait, Trait # noqa
|
||||
|
|
|
|||
|
|
@ -9,9 +9,10 @@ Unit test module for Trait classes.
|
|||
from copy import copy
|
||||
|
||||
from anything import Something
|
||||
from mock import MagicMock, patch
|
||||
|
||||
from evennia.objects.objects import DefaultCharacter
|
||||
from evennia.utils.test_resources import BaseEvenniaTestCase, EvenniaTest
|
||||
from mock import MagicMock, patch
|
||||
|
||||
from . import traits
|
||||
|
||||
|
|
|
|||
|
|
@ -457,6 +457,7 @@ from functools import total_ordering
|
|||
from time import time
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from evennia.utils import logger
|
||||
from evennia.utils.dbserialize import _SaverDict
|
||||
from evennia.utils.utils import class_from_module, inherits_from, list_to_string, percent
|
||||
|
|
|
|||
|
|
@ -44,9 +44,8 @@
|
|||
# everything in this block will be appended to the beginning of
|
||||
# all other #CODE blocks when they are executed.
|
||||
|
||||
from evennia import create_object, search_object
|
||||
from evennia import DefaultObject, create_object, search_object
|
||||
from evennia.contrib.tutorials import red_button
|
||||
from evennia import DefaultObject
|
||||
|
||||
limbo = search_object("Limbo")[0]
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ make sure to put it on yourself or you won't see any messages!
|
|||
|
||||
"""
|
||||
import random
|
||||
|
||||
from evennia import DefaultScript
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ Tests for the bodyfunctions.
|
|||
|
||||
"""
|
||||
from mock import Mock, patch
|
||||
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from .bodyfunctions import BodyFunctions
|
||||
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue