code
stringlengths
321
95.4k
apis
list
extract_api
stringlengths
105
90.3k
""" TutorialMirror A simple mirror object to experiment with. """ from evennia import DefaultObject from evennia.utils import make_iter, is_iter from evennia import logger class TutorialMirror(DefaultObject): """ A simple mirror object that - echoes back the description of the object looking at it ...
[ "evennia.logger.log_msg", "evennia.utils.make_iter", "evennia.utils.is_iter" ]
[((1810, 1823), 'evennia.utils.is_iter', 'is_iter', (['text'], {}), '(text)\n', (1817, 1823), False, 'from evennia.utils import make_iter, is_iter\n'), ((1878, 1897), 'evennia.utils.make_iter', 'make_iter', (['from_obj'], {}), '(from_obj)\n', (1887, 1897), False, 'from evennia.utils import make_iter, is_iter\n'), ((216...
""" Combat Manager. This is where the magic happens. And by magic, we mean characters dying, most likely due to vile sorcery. The Combat Manager is invoked by a character starting combat with the +fight command. Anyone set up as a defender of either of those two characters is pulled into combat automatically. Otherwis...
[ "evennia.utils.utils.fill", "evennia.utils.utils.dedent" ]
[((9754, 9845), 'server.utils.prettytable.PrettyTable', 'PrettyTable', (["['{wCombatant{n', '{wDamage{n', '{wFatigue{n', '{wAction{n', '{wReady?{n']"], {}), "(['{wCombatant{n', '{wDamage{n', '{wFatigue{n', '{wAction{n',\n '{wReady?{n'])\n", (9765, 9845), False, 'from server.utils.prettytable import PrettyTable\n'), ...
""" The filehelp-system allows for defining help files outside of the game. These will be treated as non-command help entries and displayed in the same way as help entries created using the `sethelp` default command. After changing an entry on-disk you need to reload the server to have the change show in-game. An file...
[ "evennia.locks.lockhandler.LockHandler", "evennia.utils.logger.error", "evennia.utils.logger.log_err", "evennia.utils.utils.all_from_module", "evennia.utils.utils.make_iter", "evennia.utils.utils.variable_from_module" ]
[((3197, 3214), 'evennia.locks.lockhandler.LockHandler', 'LockHandler', (['self'], {}), '(self)\n', (3208, 3214), False, 'from evennia.locks.lockhandler import LockHandler\n'), ((6067, 6132), 'evennia.utils.utils.variable_from_module', 'variable_from_module', (['module_or_path'], {'variable': '"""HELP_ENTRY_DICTS"""'})...
""" MIT License Copyright (c) 2021 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
[ "evennia.utils.create.create_object", "evennia.prototypes.spawner.spawn" ]
[((1899, 1926), 'random.randint', 'random.randint', (['(1)', 'die_type'], {}), '(1, die_type)\n', (1913, 1926), False, 'import random\n'), ((4326, 4349), 'world.definitions.chardefs.get_random_occupation', 'get_random_occupation', ([], {}), '()\n', (4347, 4349), False, 'from world.definitions.chardefs import get_random...
""" Functions for processing input commands. All global functions in this module whose name does not start with "_" is considered an inputfunc. Each function must have the following callsign (where inputfunc name is always lower-case, no matter what the OOB input name looked like): inputfunc(session, *args, **kwa...
[ "evennia.scripts.monitorhandler.MONITOR_HANDLER.add", "evennia.scripts.monitorhandler.MONITOR_HANDLER.remove", "evennia.utils.logger.log_err", "evennia.utils.utils.to_str", "evennia.scripts.tickerhandler.TICKER_HANDLER.remove", "evennia.scripts.tickerhandler.TICKER_HANDLER.add", "evennia.scripts.monitor...
[((947, 995), 'importlib.import_module', 'importlib.import_module', (['settings.SESSION_ENGINE'], {}), '(settings.SESSION_ENGINE)\n', (970, 995), False, 'import importlib\n'), ((2671, 2744), 'evennia.commands.cmdhandler.cmdhandler', 'cmdhandler', (['session', 'txt'], {'callertype': '"""session"""', 'session': 'session'...
""" Commands Commands describe the input the account can do to the game. """ from evennia.commands.command import Command as BaseCommand from evennia.utils import ansi # from evennia import default_cmds class Command(BaseCommand): """ Inherit from this if you want to create your own command styles fro...
[ "evennia.utils.ansi.strip_ansi", "evennia.utils.utils.inherits_from" ]
[((10948, 11021), 'evennia.utils.utils.inherits_from', 'utils.inherits_from', (['self.caller', '"""evennia.objects.objects.DefaultObject"""'], {}), "(self.caller, 'evennia.objects.objects.DefaultObject')\n", (10967, 11021), False, 'from evennia.utils import utils\n'), ((2754, 2778), 'evennia.utils.ansi.strip_ansi', 'an...
import re from django.conf import settings from evennia.utils.ansi import strip_ansi from evennia.utils.utils import make_iter, to_str, wrap def capitalize(text): #allow ellipses to force lower case. if not "..." in text[0:4]: list_text = text if text.startswith("|"): list_text = te...
[ "evennia.utils.ansi.strip_ansi", "evennia.utils.utils.make_iter" ]
[((3253, 3279), 're.split', 're.split', (['"""\\\\n|\\\\|/"""', 'text'], {}), "('\\\\n|\\\\|/', text)\n", (3261, 3279), False, 'import re\n'), ((3464, 3505), 're.findall', 're.findall', (['"""((?:\\\\S+\\\\s*)|(?:^\\\\s+))"""', 'x'], {}), "('((?:\\\\S+\\\\s*)|(?:^\\\\s+))', x)\n", (3474, 3505), False, 'import re\n'), (...
from evennia.prototypes.spawner import spawn def return_all_coin_types(coin_dict): """ Takes a coin dictionary and returns the value of all 4 types of coins, as individual variables. If a coin dictionary is not provided, the method attempts to pull one from the owner object. If that fails, a coin dict...
[ "evennia.prototypes.spawner.spawn" ]
[((7499, 7520), 'evennia.prototypes.spawner.spawn', 'spawn', (['coin_prototype'], {}), '(coin_prototype)\n', (7504, 7520), False, 'from evennia.prototypes.spawner import spawn\n')]
""" The default command parser. Use your own by assigning `settings.COMMAND_PARSER` to a Python path to a module containing the replacing cmdparser function. The replacement parser must accept the same inputs as the default one. """ import re from django.conf import settings from evennia.utils.logger import log_trac...
[ "evennia.utils.logger.log_trace" ]
[((343, 400), 're.compile', 're.compile', (['settings.SEARCH_MULTIMATCH_REGEX', '(re.I + re.U)'], {}), '(settings.SEARCH_MULTIMATCH_REGEX, re.I + re.U)\n', (353, 400), False, 'import re\n'), ((3953, 4009), 'evennia.utils.logger.log_trace', 'log_trace', (["('cmdhandler error. raw_input:%s' % raw_string)"], {}), "('cmdha...
from evennia.contrib import custom_gametime from commands.command import Command class CmdTime(Command): """ Display the time. Syntax: time """ key = "time" locks = "cmd:all()" def func(self): """Execute the time command.""" # Get the absolut...
[ "evennia.contrib.custom_gametime.custom_gametime" ]
[((691, 737), 'evennia.contrib.custom_gametime.custom_gametime', 'custom_gametime.custom_gametime', ([], {'absolute': '(True)'}), '(absolute=True)\n', (722, 737), False, 'from evennia.contrib import custom_gametime\n')]
""" Containers Containers are storage classes usually initialized from a setting. They represent Singletons and acts as a convenient place to find resources ( available as properties on the singleton) evennia.GLOBAL_SCRIPTS evennia.OPTION_CLASSES """ from django.conf import settings from evennia.utils.utils import...
[ "evennia.utils.utils.class_from_module", "evennia.utils.utils.callables_from_module", "evennia.utils.logger.log_err" ]
[((2966, 2997), 'django.conf.settings.GLOBAL_SCRIPTS.items', 'settings.GLOBAL_SCRIPTS.items', ([], {}), '()\n', (2995, 2997), False, 'from django.conf import settings\n'), ((1139, 1168), 'evennia.utils.utils.callables_from_module', 'callables_from_module', (['module'], {}), '(module)\n', (1160, 1168), False, 'from even...
from evennia.utils.create import create_object from evennia.utils.search import search_object """ At_initial_setup module template Custom at_initial_setup method. This allows you to hook special modifications to the initial server startup process. Note that this will only be run once - when the server starts up for ...
[ "evennia.utils.create.create_object", "evennia.utils.search.search_object" ]
[((1272, 1333), 'evennia.utils.create.create_object', 'create_object', ([], {'typeclass': '"""rooms.rooms.Room"""', 'key': '"""black_hole"""'}), "(typeclass='rooms.rooms.Room', key='black_hole')\n", (1285, 1333), False, 'from evennia.utils.create import create_object\n'), ((1709, 1774), 'evennia.utils.create.create_obj...
# ------------------------------------------------------------- # # Teleport room - puzzles solution # # This is a sort of puzzle room that requires a certain # attribute on the entering character to be the same as # an attribute of the room. If not, the character will # be teleported away to a target location. This is...
[ "evennia.search_object" ]
[((2471, 2497), 'evennia.search_object', 'search_object', (['teleport_to'], {}), '(teleport_to)\n', (2484, 2497), False, 'from evennia import utils, create_object, search_object\n')]
""" Channel commands are OOC commands and intended to be made available to the Account at all times. Send to Channel command exists in system.py """ from django.conf import settings from evennia import Command as BaseCommand from evennia.commands.default.comms import find_channel from evennia.comms.models import Chan...
[ "evennia.utils.logger.tail_log_file", "evennia.utils.utils.class_from_module", "evennia.commands.default.comms.find_channel" ]
[((490, 591), 'evennia.utils.utils.class_from_module', 'class_from_module', (['settings.BASE_CHANNEL_TYPECLASS'], {'fallback': 'settings.FALLBACK_CHANNEL_TYPECLASS'}), '(settings.BASE_CHANNEL_TYPECLASS, fallback=settings.\n FALLBACK_CHANNEL_TYPECLASS)\n', (507, 591), False, 'from evennia.utils.utils import class_fro...
from django.core.cache import caches from collections import deque from evennia.utils import logger import time from django.utils.translation import gettext as _ class Throttle: """ Keeps a running count of failed actions per IP address. Available methods indicate whether or not the number of failures ex...
[ "evennia.utils.logger.log_trace", "evennia.utils.logger.log_sec" ]
[((681, 760), 'django.utils.translation.gettext', '_', (['"""Too many failed attempts; you must wait a few minutes before trying again."""'], {}), "('Too many failed attempts; you must wait a few minutes before trying again.')\n", (682, 760), True, 'from django.utils.translation import gettext as _\n'), ((6511, 6522), ...
from .models import GeneratedLootFragment, Shardhaven from typeclasses.bauble import Bauble from typeclasses.wearable.wieldable import Wieldable from evennia.utils import create from server.utils.arx_utils import a_or_an from server.utils.picker import WeightedPicker import random class Trinket(Bauble): @propert...
[ "evennia.utils.create.create_object" ]
[((1183, 1199), 'server.utils.picker.WeightedPicker', 'WeightedPicker', ([], {}), '()\n', (1197, 1199), False, 'from server.utils.picker import WeightedPicker\n'), ((1351, 1367), 'server.utils.picker.WeightedPicker', 'WeightedPicker', ([], {}), '()\n', (1365, 1367), False, 'from server.utils.picker import WeightedPicke...
from typeclasses.scripts.scripts import Script from . import utils from evennia.utils import create class WeatherScript(Script): def at_script_creation(self): self.key = "Weather Patterns" self.desc = "Keeps weather moving on the game." self.interval = 3600 self.persistent = True ...
[ "evennia.utils.create.create_script" ]
[((630, 665), 'evennia.utils.create.create_script', 'create.create_script', (['WeatherScript'], {}), '(WeatherScript)\n', (650, 665), False, 'from evennia.utils import create\n')]
""" Room Rooms are simple containers that has no location of their own. """ from collections import defaultdict, OrderedDict from evennia import DefaultRoom from evennia.utils.utils import is_iter, make_iter from server.utils.utils import get_sw, list_to_string, wrap class Room(DefaultRoom): """ Rooms are ...
[ "evennia.utils.utils.is_iter", "evennia.utils.utils.make_iter" ]
[((3395, 3408), 'evennia.utils.utils.is_iter', 'is_iter', (['text'], {}), '(text)\n', (3402, 3408), False, 'from evennia.utils.utils import is_iter, make_iter\n'), ((3603, 3621), 'evennia.utils.utils.make_iter', 'make_iter', (['exclude'], {}), '(exclude)\n', (3612, 3621), False, 'from evennia.utils.utils import is_iter...
""" Unit tests for the utilities of the evennia.utils.gametime module. """ from datetime import datetime import time import unittest from unittest.mock import Mock from django.conf import settings from django.test import TestCase from evennia.utils import gametime class TestGametime(TestCase): def setUp(self) ...
[ "evennia.utils.gametime.runtime", "evennia.utils.gametime.schedule", "evennia.utils.gametime.real_seconds_until", "evennia.utils.gametime.gametime", "evennia.utils.gametime.uptime", "evennia.utils.gametime.game_epoch", "evennia.utils.gametime.server_epoch" ]
[((3360, 3366), 'unittest.mock.Mock', 'Mock', ([], {}), '()\n', (3364, 3366), False, 'from unittest.mock import Mock\n'), ((3384, 3419), 'evennia.utils.gametime.schedule', 'gametime.schedule', (['callback'], {'day': '(19)'}), '(callback, day=19)\n', (3401, 3419), False, 'from evennia.utils import gametime\n'), ((3674, ...
""" This defines how Comm models are displayed in the web admin interface. """ from django import forms from django.contrib import admin from evennia.comms.models import ChannelDB, Msg from django.conf import settings from .attributes import AttributeInline from .tags import TagInline class MsgTagInline(TagInline)...
[ "evennia.utils.dbserialize.pack_dbobj" ]
[((1216, 1235), 'django.contrib.admin.register', 'admin.register', (['Msg'], {}), '(Msg)\n', (1230, 1235), False, 'from django.contrib import admin\n'), ((5134, 5159), 'django.contrib.admin.register', 'admin.register', (['ChannelDB'], {}), '(ChannelDB)\n', (5148, 5159), False, 'from django.contrib import admin\n'), ((6...
""" Tests of create functions """ from evennia.utils.test_resources import EvenniaTest from evennia.scripts.scripts import DefaultScript from evennia.utils import create class TestCreateScript(EvenniaTest): def test_create_script(self): class TestScriptA(DefaultScript): def at_script_creatio...
[ "evennia.utils.create.create_script" ]
[((463, 515), 'evennia.utils.create.create_script', 'create.create_script', (['TestScriptA'], {'key': '"""test_script"""'}), "(TestScriptA, key='test_script')\n", (483, 515), False, 'from evennia.utils import create\n'), ((1024, 1076), 'evennia.utils.create.create_script', 'create.create_script', (['TestScriptB'], {'ke...
""" This module implements the telnet protocol. This depends on a generic session module that implements the actual login procedure of the game, tracks sessions etc. """ import re from twisted.internet import protocol from twisted.internet.task import LoopingCall from twisted.conch.telnet import Telnet, StatefulTeln...
[ "evennia.server.portal.suppress_ga.SuppressGA", "evennia.utils.ansi.parse_ansi", "evennia.server.portal.naws.Naws", "evennia.server.portal.telnet_oob.TelnetOOB", "evennia.server.portal.mccp.Mccp", "evennia.server.portal.ttype.Ttype", "evennia.utils.utils.to_str", "evennia.server.portal.mccp.mccp_compr...
[((761, 780), 're.compile', 're.compile', (['"""\\\\|n$"""'], {}), "('\\\\|n$')\n", (771, 780), False, 'import re\n'), ((792, 848), 're.compile', 're.compile', (['"""\\\\n$|\\\\r$|\\\\r\\\\n$|\\\\r\\\\x00$|"""', 're.MULTILINE'], {}), "('\\\\n$|\\\\r$|\\\\r\\\\n$|\\\\r\\\\x00$|', re.MULTILINE)\n", (802, 848), False, 'im...
""" Comsystem command module. Comm commands are OOC commands and intended to be made available to the Account at all times (they go into the AccountCmdSet). So we make sure to homogenize self.caller to always be the account object for easy handling. """ import hashlib import time from django.conf import settings from...
[ "evennia.comms.channelhandler.CHANNELHANDLER.update", "evennia.comms.models.Msg.objects.get_messages_by_receiver", "evennia.accounts.models.AccountDB.objects.filter", "evennia.utils.create.create_message", "evennia.comms.models.Msg.objects.get_messages_by_sender", "evennia.utils.utils.class_from_module", ...
[((695, 744), 'evennia.utils.utils.class_from_module', 'class_from_module', (['settings.COMMAND_DEFAULT_CLASS'], {}), '(settings.COMMAND_DEFAULT_CLASS)\n', (712, 744), False, 'from evennia.utils.utils import make_iter, class_from_module\n'), ((773, 823), 'evennia.utils.utils.class_from_module', 'class_from_module', (['...
""" Player The Player represents the game "account" and each login has only one Player object. A Player is what chats on default channels but has no other in-game-world existance. Rather the Player puppets Objects (such as Characters) in order to actually participate in the game world. Guest Guest players are simpl...
[ "evennia.utils.utils.make_iter", "evennia.server.models.ServerConfig.objects.conf" ]
[((19711, 19762), 'evennia.server.models.ServerConfig.objects.conf', 'ServerConfig.objects.conf', ([], {'key': '"""MESSAGE_OF_THE_DAY"""'}), "(key='MESSAGE_OF_THE_DAY')\n", (19736, 19762), False, 'from evennia.server.models import ServerConfig\n'), ((5720, 5742), 'commands.commands.bboards.get_unread_posts', 'get_unrea...
""" Characters Characters are (by default) Objects setup to be puppeted by Accounts. They are what you "see" in game. The Character class in this module is setup to be the "default" character type created by the default creation commands. """ # from evennia import DefaultCharacter from evennia import DefaultRoom, Def...
[ "evennia.utils.utils.inherits_from", "evennia.utils.create.create_object" ]
[((7286, 7648), 'evennia.utils.create.create_object', 'create_object', ([], {'typeclass': '"""typeclasses.latin_clothing.Clothing"""', 'key': '"""subligaculum"""', 'location': 'self.dbref', 'attributes': "[('gender', '3'), ('clothing_type', 'underpants'), ('nom_sg', [\n 'subligaculum']), ('gen_sg', ['subligaculi']),...
""" Spawner The spawner takes input files containing object definitions in dictionary forms. These use a prototype architecture to define unique objects without having to make a Typeclass for each. There main function is `spawn(*prototype)`, where the `prototype` is a dictionary like this: ```python from evennia.pr...
[ "evennia.prototypes.prototypes.homogenize_prototype", "evennia.utils.utils.is_iter", "evennia.utils.logger.log_trace", "evennia.utils.utils.make_iter", "evennia.prototypes.prototypes.validate_prototype", "evennia.objects.models.ObjectDB.objects.get_by_tag", "evennia.prototypes.prototypes.search_prototyp...
[((24382, 24421), 'evennia.prototypes.prototypes.homogenize_prototype', 'protlib.homogenize_prototype', (['prototype'], {}), '(prototype)\n', (24410, 24421), True, 'from evennia.prototypes import prototypes as protlib\n'), ((7803, 7840), 'evennia.utils.utils.make_iter', 'make_iter', (["inprot['prototype_parent']"], {})...
""" Pseudo-random generator and registry Evennia contribution - <NAME> 2017 This contrib can be used to generate pseudo-random strings of information with specific criteria. You could, for instance, use it to generate phone numbers, license plate numbers, validation codes, non-sensivite passwords and so on. The str...
[ "evennia.utils.create.create_script", "evennia.ScriptDB.objects.get" ]
[((5759, 5806), 'evennia.ScriptDB.objects.get', 'ScriptDB.objects.get', ([], {'db_key': '"""generator_script"""'}), "(db_key='generator_script')\n", (5779, 5806), False, 'from evennia import DefaultScript, ScriptDB\n'), ((6341, 6366), 're.sre_parse.parse', 're.sre_parse.parse', (['regex'], {}), '(regex)\n', (6359, 6366...
""" All available event actions. """ from django.conf import settings from evennia.utils import logger from muddery.server.utils.utils import classes_in_path from muddery.server.events.base_event_action import BaseEventAction class EventActionSet(object): """ All available event triggers. """ def __i...
[ "evennia.utils.logger.log_infomsg" ]
[((488, 553), 'muddery.server.utils.utils.classes_in_path', 'classes_in_path', (['settings.PATH_EVENT_ACTION_BASE', 'BaseEventAction'], {}), '(settings.PATH_EVENT_ACTION_BASE, BaseEventAction)\n', (503, 553), False, 'from muddery.server.utils.utils import classes_in_path\n'), ((658, 727), 'evennia.utils.logger.log_info...
""" Commands for agents """ from django.db.models import Q from evennia.objects.models import ObjectDB # noinspection PyProtectedMember from evennia.objects.objects import _AT_SEARCH_RESULT from server.utils.arx_utils import ArxCommand, ArxPlayerCommand from server.utils.arx_utils import validate_name, caller_change_f...
[ "evennia.objects.models.ObjectDB.objects.object_search", "evennia.objects.objects._AT_SEARCH_RESULT", "evennia.objects.models.ObjectDB.objects.filter" ]
[((2439, 2495), 'evennia.objects.models.ObjectDB.objects.filter', 'ObjectDB.objects.filter', ([], {'db_tags__db_key__iexact': 'tagname'}), '(db_tags__db_key__iexact=tagname)\n', (2462, 2495), False, 'from evennia.objects.models import ObjectDB\n'), ((19181, 19200), 'typeclasses.npcs.npc_types.get_npc_type', 'get_npc_ty...
""" Simple turn-based combat system with items and status effects Contrib - <NAME> 2017 This is a version of the 'turnbattle' combat system that includes conditions and usable items, which can instill these conditions, cure them, or do just about anything else. Conditions are stored on characters as a dictionary, wh...
[ "evennia.prototypes.spawner.spawn", "evennia.TICKER_HANDLER.add" ]
[((4950, 4966), 'random.randint', 'randint', (['(1)', '(1000)'], {}), '(1, 1000)\n', (4957, 4966), False, 'from random import randint\n'), ((5644, 5659), 'random.randint', 'randint', (['(1)', '(100)'], {}), '(1, 100)\n', (5651, 5659), False, 'from random import randint\n'), ((7641, 7656), 'random.randint', 'randint', (...
""" Slow Exit typeclass Contribution - Griatch 2014 This is an example of an Exit-type that delays its traversal.This simulates slow movement, common in many different types of games. The contrib also contains two commands, CmdSetSpeed and CmdStop for changing the movement speed and abort an ongoing traversal, respe...
[ "evennia.utils.delay" ]
[((2574, 2621), 'evennia.utils.delay', 'utils.delay', (['move_delay'], {'callback': 'move_callback'}), '(move_delay, callback=move_callback)\n', (2585, 2621), False, 'from evennia import DefaultExit, utils, Command\n')]
""" Commands for flashbacks and other scene management stuff in the Character app. Flashbacks are for the Arx equivalent of play-by-post: players can create a flashback of a scene that happened in the past with a clear summary and end-goal in mind, and then invite others to RP about it. """ from django.db.models impor...
[ "evennia.utils.evtable.EvTable" ]
[((3005, 3075), 'evennia.utils.evtable.EvTable', 'EvTable', (['"""ID"""', '"""Title"""', '"""Owner"""', '"""New Posts"""'], {'width': '(78)', 'border': '"""cells"""'}), "('ID', 'Title', 'Owner', 'New Posts', width=78, border='cells')\n", (3012, 3075), False, 'from evennia.utils.evtable import EvTable\n'), ((3413, 3458)...
from django.db.models import Q, Manager class OrganizationManager(Manager): def get_public_org(self, org_name, caller): org = None try: try: name_or_id = Q(id=int(org_name)) except (ValueError, TypeError): name_or_id = Q(name__iexact=org_name...
[ "evennia.utils.evtable.EvTable" ]
[((1530, 1625), 'evennia.utils.evtable.EvTable', 'EvTable', (['"""{w#{n"""', "('{w%sPlot (owner){n' % alt_header)", '"""{Summary{n"""'], {'width': '(78)', 'border': '"""cells"""'}), "('{w#{n', '{w%sPlot (owner){n' % alt_header, '{Summary{n', width=78,\n border='cells')\n", (1537, 1625), False, 'from evennia.utils.ev...
""" Readable/Writable objects """ from typeclasses.objects import Object from evennia import CmdSet from commands.base import ArxCommand from world.templates.mixins import TemplateMixins class Readable(Object): """ Class for objects that can be written/named """ def at_object_creation(self): ...
[ "evennia.utils.create.create_object" ]
[((1466, 1513), 'typeclasses.objects.Object.return_appearance', 'Object.return_appearance', (['self', '*args'], {}), '(self, *args, **kwargs)\n', (1490, 1513), False, 'from typeclasses.objects import Object\n'), ((6146, 6258), 'evennia.utils.create.create_object', 'create_object', ([], {'typeclass': '"""typeclasses.rea...
import datetime from evennia import logger from evennia.utils.ansi import strip_ansi from evennia.utils.validatorfuncs import _TZ_DICT from evennia.utils.utils import crop from evennia.utils import validatorfuncs class BaseOption(object): """ Abstract Class to deal with encapsulating individual Options. An Op...
[ "evennia.utils.validatorfuncs.unsigned_integer", "evennia.utils.validatorfuncs.datetime", "evennia.utils.validatorfuncs.timezone", "evennia.utils.validatorfuncs.email", "evennia.utils.ansi.strip_ansi", "evennia.utils.validatorfuncs.color", "evennia.utils.validatorfuncs.duration", "evennia.utils.valida...
[((5397, 5454), 'evennia.utils.validatorfuncs.text', 'validatorfuncs.text', (['value'], {'option_key': 'self.key'}), '(value, option_key=self.key, **kwargs)\n', (5416, 5454), False, 'from evennia.utils import validatorfuncs\n'), ((6219, 6277), 'evennia.utils.validatorfuncs.email', 'validatorfuncs.email', (['value'], {'...
""" At_initial_setup module template Custom at_initial_setup method. This allows you to hook special modifications to the initial server startup process. Note that this will only be run once - when the server starts up for the very first time! It is called last in the startup process and can thus be used to overload t...
[ "evennia.utils.search.objects", "evennia.utils.dedent" ]
[((1681, 1932), 'evennia.utils.dedent', 'dedent', (['"""\n Welcome to |mCelestiaMUD|n, a game of crewing spaceships and stations!\n The project is still in early development,\n |YGetting Started|n\n TODO: Character screen here\n """'], {}), '(\n """\n ...
# Generated by Django 2.2.16 on 2021-04-18 17:15 from django.db import migrations, models import django.db.models.deletion from django.core.exceptions import ObjectDoesNotExist from evennia.utils.ansi import parse_ansi from server.utils.arx_utils import sub_old_ansi OLD_BASE_DESC = "Nothing has been written on this ...
[ "evennia.utils.ansi.parse_ansi" ]
[((12767, 12894), 'django.db.migrations.AlterUniqueTogether', 'migrations.AlterUniqueTogether', ([], {'name': '"""bookchapter"""', 'unique_together': "{('objectdb', 'number'), ('objectdb', 'written_work')}"}), "(name='bookchapter', unique_together={(\n 'objectdb', 'number'), ('objectdb', 'written_work')})\n", (12797...
from evennia import create_object from typeclasses import exits, rooms from .ships import * def build_bridge(x, y, **kwargs): # If on anything other than the first iteration - Do nothing. if kwargs["iteration"] > 0: return None room = create_object(rooms.Room, key="bridge" + str(x) + str(y)) ...
[ "evennia.create_object" ]
[((471, 512), 'evennia.create_object', 'create_object', ([], {'key': '"""Chair"""', 'location': 'room'}), "(key='Chair', location=room)\n", (484, 512), False, 'from evennia import create_object\n'), ((1368, 1409), 'evennia.create_object', 'create_object', ([], {'key': '"""Table"""', 'location': 'room'}), "(key='Table',...
""" Turnbattle tests. """ from mock import patch, MagicMock from evennia.commands.default.tests import BaseEvenniaCommandTest from evennia.utils.create import create_object from evennia.utils.test_resources import BaseEvenniaTest from evennia.objects.objects import DefaultRoom from . import tb_basic, tb_equip, tb_ran...
[ "evennia.utils.create.create_object" ]
[((1080, 1132), 'evennia.utils.create.create_object', 'create_object', (['tb_equip.TBEWeapon'], {'key': '"""test weapon"""'}), "(tb_equip.TBEWeapon, key='test weapon')\n", (1093, 1132), False, 'from evennia.utils.create import create_object\n'), ((1158, 1208), 'evennia.utils.create.create_object', 'create_object', (['t...
from django.conf import settings from evennia.utils.utils import class_from_module from athanor.gamedb.characters import AthanorPlayerCharacter from athanor_entity.entities.base import BaseGameEntity MIXINS = [class_from_module(mixin) for mixin in settings.MIXINS["ENTITY_CHARACTER"]] MIXINS.sort(key=lambda x: getattr(...
[ "evennia.utils.utils.class_from_module" ]
[((211, 235), 'evennia.utils.utils.class_from_module', 'class_from_module', (['mixin'], {}), '(mixin)\n', (228, 235), False, 'from evennia.utils.utils import class_from_module\n')]
""" Channel The channel class represents the out-of-character chat-room usable by Players in-game. It is mostly overloaded to change its appearance, but channels can be used to implement many different forms of message distribution systems. Note that sending data to channels are handled via the CMD_CHANNEL syscommand...
[ "evennia.utils.utils.make_iter", "evennia.comms.models.TempMsg" ]
[((4252, 4292), 'evennia.comms.models.TempMsg', 'TempMsg', ([], {'message': 'output', 'channels': '[self]'}), '(message=output, channels=[self])\n', (4259, 4292), False, 'from evennia.comms.models import TempMsg\n'), ((6780, 6798), 'evennia.utils.utils.make_iter', 'make_iter', (['senders'], {}), '(senders)\n', (6789, 6...
""" In-Game Mail system Evennia Contribution - grungies1138 2016 A simple Brandymail style @mail system that uses the Msg class from Evennia Core. It has two Commands, both of which can be used on their own: - CmdMail - this should sit on the Account cmdset and makes the @mail command available both IC and OOC...
[ "evennia.ObjectDB.objects.filter", "evennia.utils.inherits_from", "evennia.utils.make_iter", "evennia.comms.models.Msg.objects.get_by_tag", "evennia.AccountDB.objects.filter", "evennia.utils.datetime_format", "evennia.utils.create.create_message", "evennia.utils.evtable.EvTable" ]
[((3227, 3297), 'evennia.utils.inherits_from', 'inherits_from', (['self.caller', '"""evennia.accounts.accounts.DefaultAccount"""'], {}), "(self.caller, 'evennia.accounts.accounts.DefaultAccount')\n", (3240, 3297), False, 'from evennia.utils import create, evtable, make_iter, inherits_from, datetime_format\n'), ((3854, ...
""" This model translates default strings into localized strings. """ from django.conf import settings from django.contrib.admin.forms import forms from evennia.utils import logger from muddery.server.utils.utils import classes_in_path class FormSet(object): """ All available elements. """ def __init...
[ "evennia.utils.logger.log_infomsg" ]
[((510, 573), 'muddery.server.utils.utils.classes_in_path', 'classes_in_path', (['settings.PATH_DATA_FORMS_BASE', 'forms.ModelForm'], {}), '(settings.PATH_DATA_FORMS_BASE, forms.ModelForm)\n', (525, 573), False, 'from muddery.server.utils.utils import classes_in_path\n'), ((791, 859), 'evennia.utils.logger.log_infomsg'...
""" Tests of create functions """ from django.test import TestCase from evennia.utils.test_resources import EvenniaTest from evennia.scripts.scripts import DefaultScript from evennia.utils import create class TestCreateScript(EvenniaTest): def test_create_script(self): class TestScriptA(DefaultScript): ...
[ "evennia.utils.create.create_script", "evennia.utils.create.create_channel", "evennia.utils.create.create_message", "evennia.utils.create.create_help_entry" ]
[((496, 548), 'evennia.utils.create.create_script', 'create.create_script', (['TestScriptA'], {'key': '"""test_script"""'}), "(TestScriptA, key='test_script')\n", (516, 548), False, 'from evennia.utils import create\n'), ((1066, 1118), 'evennia.utils.create.create_script', 'create.create_script', (['TestScriptB'], {'ke...
""" Special building tools like inside->wilderness connections and tunnel with translated directions. """ from contrib.wilderness import WildernessRoom from evennia.utils import create from evennia import default_cmds class CmdTunnel(default_cmds.CmdTunnel): """ create new rooms in cardinal directions only ...
[ "evennia.utils.create.create_object" ]
[((3440, 3591), 'evennia.utils.create.create_object', 'create.create_object', (['typeclass'], {'key': 'exit_name', 'location': 'location', 'aliases': 'exit_aliases', 'locks': 'lockstring', 'report_to': 'caller', 'attributes': 'attributes'}), '(typeclass, key=exit_name, location=location, aliases=\n exit_aliases, loc...
""" Unit tests for the prototypes and spawner """ from random import randint import mock from anything import Something from django.test.utils import override_settings from evennia.utils.test_resources import EvenniaTest from evennia.utils.tests.test_evmenu import TestEvMenu from evennia.prototypes import spawner, pr...
[ "evennia.prototypes.menus._set_prototype_value", "evennia.prototypes.menus._add_attr", "evennia.prototypes.menus._validate_prototype", "evennia.prototypes.menus._all_typeclasses", "evennia.prototypes.menus._default_parse", "evennia.prototypes.spawner.spawn", "evennia.prototypes.menus._format_option_valu...
[((12359, 12457), 'django.test.utils.override_settings', 'override_settings', ([], {'PROT_FUNC_MODULES': "['evennia.prototypes.protfuncs']", 'CLIENT_DEFAULT_WIDTH': '(20)'}), "(PROT_FUNC_MODULES=['evennia.prototypes.protfuncs'],\n CLIENT_DEFAULT_WIDTH=20)\n", (12376, 12457), False, 'from django.test.utils import ove...
""" Disguises and Masks """ from typeclasses.wearable.wearable import Wearable, EquipError from typeclasses.consumable.consumable import Consumable class Mask(Wearable): """ Wearable mask that replaces name with 'Someone wearing <short desc> mask'. Also grants a temp_desc. Charges equal to quality, loses ...
[ "evennia.utils.utils.inherits_from" ]
[((2389, 2437), 'evennia.utils.utils.inherits_from', 'inherits_from', (['target', 'self.valid_typeclass_path'], {}), '(target, self.valid_typeclass_path)\n', (2402, 2437), False, 'from evennia.utils.utils import inherits_from\n'), ((837, 863), 'typeclasses.wearable.wearable.EquipError', 'EquipError', (['"""needs repair...
""" Test eveditor """ from mock import MagicMock from django.test import TestCase from evennia.utils import eveditor from evennia.commands.default.tests import CommandTest class TestEvEditor(CommandTest): def test_eveditor_view_cmd(self): eveditor.EvEditor(self.char1) self.call( eved...
[ "evennia.utils.eveditor.CmdEditorGroup", "evennia.utils.eveditor.EvEditor", "evennia.utils.eveditor.CmdLineInput" ]
[((255, 284), 'evennia.utils.eveditor.EvEditor', 'eveditor.EvEditor', (['self.char1'], {}), '(self.char1)\n', (272, 284), False, 'from evennia.utils import eveditor\n'), ((5525, 5554), 'evennia.utils.eveditor.EvEditor', 'eveditor.EvEditor', (['self.char1'], {}), '(self.char1)\n', (5542, 5554), False, 'from evennia.util...
""" All available requests. """ from django.conf import settings from evennia.utils import logger from muddery.server.utils.exception import MudderyError from muddery.server.utils.utils import classes_in_path from muddery.worldeditor.controllers.base_request_processer import BaseRequestProcesser class RequestSet(obj...
[ "evennia.utils.logger.log_errmsg", "evennia.utils.logger.log_infomsg" ]
[((566, 642), 'muddery.server.utils.utils.classes_in_path', 'classes_in_path', (['settings.PATH_REQUEST_PROCESSERS_BASE', 'BaseRequestProcesser'], {}), '(settings.PATH_REQUEST_PROCESSERS_BASE, BaseRequestProcesser)\n', (581, 642), False, 'from muddery.server.utils.utils import classes_in_path\n'), ((755, 808), 'evennia...
import math, datetime from django.conf import settings import evennia from evennia.utils.utils import time_format, class_from_module COMMAND_DEFAULT_CLASS = class_from_module(settings.COMMAND_DEFAULT_CLASS) JOB_COLUMNS = f"* ID Submitter Title Claimed Due Lst" class JobCmd(...
[ "evennia.utils.utils.class_from_module", "evennia.GLOBAL_SCRIPTS.jobs.rename_bucket", "evennia.GLOBAL_SCRIPTS.jobs.promote_account", "evennia.GLOBAL_SCRIPTS.jobs.move_job", "evennia.GLOBAL_SCRIPTS.jobs.due_bucket", "evennia.GLOBAL_SCRIPTS.jobs.create_job", "evennia.GLOBAL_SCRIPTS.jobs.demote_account", ...
[((158, 207), 'evennia.utils.utils.class_from_module', 'class_from_module', (['settings.COMMAND_DEFAULT_CLASS'], {}), '(settings.COMMAND_DEFAULT_CLASS)\n', (175, 207), False, 'from evennia.utils.utils import time_format, class_from_module\n'), ((513, 573), 'evennia.GLOBAL_SCRIPTS.jobs.find_job', 'evennia.GLOBAL_SCRIPTS...
# Test weapons (and weapon racks). from evennia import create_object from evennia.commands.default.tests import CommandTest from typeclasses.weapons import edged as druedged from typeclasses.weapons import rack as drurack from twisted.trial.unittest import TestCase as TwistedTestCase class TestWeapons(TwistedTest...
[ "evennia.create_object" ]
[((384, 448), 'evennia.create_object', 'create_object', (['druedged.Weapon'], {'key': '"""sword"""', 'location': 'self.char1'}), "(druedged.Weapon, key='sword', location=self.char1)\n", (397, 448), False, 'from evennia import create_object\n'), ((746, 812), 'evennia.create_object', 'create_object', (['drurack.WeaponRac...
from evennia.prototypes.spawner import spawn from evennia.utils.create import create_object from evennia.utils.utils import variable_from_module from misc import general_mechanics as gen_mec from misc import coin ''' This handler decides functions related to items, such as get, put, stacking, etc. ''' class ItemHand...
[ "evennia.utils.create.create_object", "evennia.utils.utils.variable_from_module" ]
[((411, 464), 'evennia.utils.utils.variable_from_module', 'variable_from_module', (['"""items.items"""'], {'variable': '"""items"""'}), "('items.items', variable='items')\n", (431, 464), False, 'from evennia.utils.utils import variable_from_module\n'), ((5066, 5112), 'misc.coin.generate_coin_object', 'coin.generate_coi...
""" I'm slowly replacing Attributes as the primary form of data storage of the game with real tables. Occasionally I'm finding places where the attributes aren't being used at all but were still having rows populated, so I wanted to wipe them without creating a one-off migration that would then need to be deleted right...
[ "evennia.typeclasses.attributes.Attribute.objects.filter" ]
[((836, 883), 'evennia.typeclasses.attributes.Attribute.objects.filter', 'Attribute.objects.filter', ([], {'db_key__in': 'attr_names'}), '(db_key__in=attr_names)\n', (860, 883), False, 'from evennia.typeclasses.attributes import Attribute\n')]
""" At_initial_setup module template Custom at_initial_setup method. This allows you to hook special modifications to the initial server startup process. Note that this will only be run once - when the server starts up for the very first time! It is called last in the startup process and can thus be used to overload t...
[ "evennia.utils.search.object_search", "evennia.utils.create.create_object" ]
[((805, 1377), 'AU_Modules.AU_RPGSystem.AU_RPGLanguages.add_language', 'AU_RPGLanguages.add_language', ([], {'key': 'AU_Languages.english_key', 'phonemes': 'AU_Languages.english_phonemes', 'grammar': 'AU_Languages.english_grammar', 'word_length_variance': 'AU_Languages.english_word_length_variance', 'noun_translate': '...
""" Various helper resources for writing unittests. Classes for testing Evennia core: - `BaseEvenniaTestCase` - no default objects, only enforced default settings - `BaseEvenniaTest` - all default objects, enforced default settings - `BaseEvenniaCommandTest` - for testing Commands, enforced default settings Classes ...
[ "evennia.server.sessionhandler.SESSIONS.session_from_sessid", "evennia.utils.utils.to_str", "evennia.utils.ansi.parse_ansi", "evennia.utils.idmapper.models.flush_cache", "evennia.utils.utils.all_from_module", "evennia.server.sessionhandler.SESSIONS.login", "evennia.utils.create.create_script", "evenni...
[((1766, 1827), 're.compile', 're.compile', (['"""^\\\\+|-+\\\\+|\\\\+-+|--+|\\\\|(?:\\\\s|$)"""', 're.MULTILINE'], {}), "('^\\\\+|-+\\\\+|\\\\+-+|--+|\\\\|(?:\\\\s|$)', re.MULTILINE)\n", (1776, 1827), False, 'import re\n'), ((22349, 22386), 'django.test.override_settings', 'override_settings', ([], {}), '(**DEFAULT_SE...
""" The custom manager for Scripts. """ from django.db.models import Q from evennia.typeclasses.managers import TypedObjectManager, TypeclassManager from evennia.utils.utils import make_iter __all__ = ("ScriptManager", "ScriptDBManager") _GA = object.__getattribute__ VALIDATE_ITERATION = 0 class ScriptDBManager(Ty...
[ "evennia.utils.create.create_script", "evennia.utils.utils.make_iter" ]
[((3020, 3038), 'evennia.utils.utils.make_iter', 'make_iter', (['scripts'], {}), '(scripts)\n', (3029, 3038), False, 'from evennia.utils.utils import make_iter\n'), ((6087, 6181), 'evennia.utils.create.create_script', 'create.create_script', (['typeclass'], {'key': 'new_key', 'obj': 'new_obj', 'locks': 'new_locks', 'au...
from django.conf import settings from evennia.utils.utils import class_from_module from athanor_entity.entities.base import AthanorGameEntity MIXINS = [] for mixin in settings.MIXINS["ENTITY_MOBILE"]: MIXINS.append(class_from_module(mixin)) MIXINS.sort(key=lambda x: getattr(x, "mixin_priority", 0)) class Athano...
[ "evennia.utils.utils.class_from_module" ]
[((221, 245), 'evennia.utils.utils.class_from_module', 'class_from_module', (['mixin'], {}), '(mixin)\n', (238, 245), False, 'from evennia.utils.utils import class_from_module\n')]
""" Unit tests for the EvForm text form generator """ from django.test import TestCase from evennia.utils import evform class TestEvForm(TestCase): def test_form(self): self.maxDiff = None form1 = evform._test() form2 = evform._test() self.assertEqual(form1, form2) # self...
[ "evennia.utils.evform._test", "evennia.utils.evform.EvForm" ]
[((220, 234), 'evennia.utils.evform._test', 'evform._test', ([], {}), '()\n', (232, 234), False, 'from evennia.utils import evform\n'), ((251, 265), 'evennia.utils.evform._test', 'evform._test', ([], {}), '()\n', (263, 265), False, 'from evennia.utils import evform\n'), ((3340, 3381), 'evennia.utils.evform.EvForm', 'ev...
# file mygame/typeclasses/latin_noun.py from evennia import DefaultObject # adding the following for colors in names for pluralization from evennia.utils import ansi # adding the following for redefinition of 'return_appearance' from collections import defaultdict # from evennia.utils.utils import list_to_string clas...
[ "evennia.utils.ansi.ANSIString" ]
[((5866, 5886), 'evennia.utils.ansi.ANSIString', 'ansi.ANSIString', (['key'], {}), '(key)\n', (5881, 5886), False, 'from evennia.utils import ansi\n'), ((7373, 7390), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (7384, 7390), False, 'from collections import defaultdict\n')]
from evennia.utils.test_resources import BaseEvenniaTest from evennia import DefaultObject, DefaultCharacter, DefaultRoom, DefaultExit from evennia.objects.models import ObjectDB from evennia.utils import create class DefaultObjectTest(BaseEvenniaTest): ip = "192.168.127.12" def test_object_create(self): ...
[ "evennia.objects.models.ObjectDB.objects.get_object_with_account", "evennia.objects.models.ObjectDB.objects.get_objs_with_key_and_typeclass", "evennia.DefaultRoom.create", "evennia.DefaultExit.create", "evennia.DefaultCharacter.create", "evennia.utils.create.create_object", "evennia.objects.models.Objec...
[((418, 517), 'evennia.DefaultObject.create', 'DefaultObject.create', (['"""trashcan"""', 'self.account'], {'description': 'description', 'ip': 'self.ip', 'home': 'home'}), "('trashcan', self.account, description=description, ip=\n self.ip, home=home)\n", (438, 517), False, 'from evennia import DefaultObject, Defaul...
""" Skill handler handles a character's skills. """ import time import random from django.conf import settings from evennia import TICKER_HANDLER from evennia.utils import logger from muddery.utils.builder import build_object from muddery.utils.localized_strings_handler import _ from muddery.utils.game_settings impor...
[ "evennia.TICKER_HANDLER.add", "evennia.TICKER_HANDLER.remove" ]
[((647, 677), 'muddery.utils.game_settings.GAME_SETTINGS.get', 'GAME_SETTINGS.get', (['"""global_cd"""'], {}), "('global_cd')\n", (664, 677), False, 'from muddery.utils.game_settings import GAME_SETTINGS\n'), ((712, 751), 'muddery.utils.game_settings.GAME_SETTINGS.get', 'GAME_SETTINGS.get', (['"""auto_cast_skill_cd"""'...
""" Utility functions to help with our message handlers. """ _cached_lazy_imports = {} def lazy_import_from_str(clsname): """ Fetches a class from world.msgs.models by name and caches the reference. The idea here is mostly for preventing circular references with lazy imports. Args: clsname: T...
[ "evennia.utils.utils.class_from_module" ]
[((605, 654), 'evennia.utils.utils.class_from_module', 'class_from_module', (["('world.msgs.models.' + clsname)"], {}), "('world.msgs.models.' + clsname)\n", (622, 654), False, 'from evennia.utils.utils import class_from_module\n')]
""" Upgrade custom's game dir to the latest version. """ import traceback import os import django.core.management from evennia.server.evennia_launcher import init_game_directory from muddery.launcher.upgrader.base_upgrader import BaseUpgrader from muddery.launcher.upgrader.utils import file_append from muddery.launche...
[ "evennia.server.evennia_launcher.init_game_directory" ]
[((1121, 1139), 'os.chdir', 'os.chdir', (['game_dir'], {}), '(game_dir)\n', (1129, 1139), False, 'import os\n'), ((1220, 1268), 'os.path.join', 'os.path.join', (['game_dir', '"""worlddata"""', '"""models.py"""'], {}), "(game_dir, 'worlddata', 'models.py')\n", (1232, 1268), False, 'import os\n'), ((1277, 1392), 'muddery...
""" The script handler makes sure to check through all stored scripts to make sure they are still relevant. A scripthandler is automatically added to all game objects. You access it through the property `scripts` on the game object. """ from evennia.scripts.models import ScriptDB from evennia.utils import create from ...
[ "evennia.utils.logger.log_err", "evennia.utils.logger.log_info", "evennia.utils.create.create_script", "evennia.scripts.models.ScriptDB.objects.get_all_scripts_on_obj" ]
[((841, 890), 'evennia.scripts.models.ScriptDB.objects.get_all_scripts_on_obj', 'ScriptDB.objects.get_all_scripts_on_obj', (['self.obj'], {}), '(self.obj)\n', (880, 890), False, 'from evennia.scripts.models import ScriptDB\n'), ((3457, 3515), 'evennia.scripts.models.ScriptDB.objects.get_all_scripts_on_obj', 'ScriptDB.o...
""" These managers define helper methods for accessing the database from Comm system components. """ from django.conf import settings from django.db.models import Q from evennia.typeclasses.managers import TypedObjectManager, TypeclassManager from evennia.server import signals from evennia.utils import logger from e...
[ "evennia.utils.utils.class_from_module", "evennia.utils.utils.dbref", "evennia.utils.utils.make_iter", "evennia.server.signals.SIGNAL_CHANNEL_POST_CREATE.send" ]
[((1484, 1494), 'evennia.utils.utils.dbref', 'dbref', (['inp'], {}), '(inp)\n', (1489, 1494), False, 'from evennia.utils.utils import dbref, make_iter, class_from_module\n'), ((11081, 11101), 'evennia.utils.utils.make_iter', 'make_iter', (['senderobj'], {}), '(senderobj)\n', (11090, 11101), False, 'from evennia.utils.u...
""" Unit tests for the utilities of the evennia.utils.utils module. TODO: Not nearly all utilities are covered yet. """ import os.path import random from parameterized import parameterized import mock from datetime import datetime, timedelta from django.test import TestCase from datetime import datetime from twiste...
[ "evennia.utils.utils.time_format", "evennia.utils.utils.latinify", "evennia.utils.ansi.ANSIString", "evennia.objects.models.ObjectDB.objects.object_search", "evennia.utils.utils.list_to_string", "evennia.scripts.taskhandler.TASK_HANDLER.clock.advance", "evennia.utils.utils.format_grid", "evennia.utils...
[((15150, 15495), 'parameterized.parameterized.expand', 'parameterized.expand', (["[(('1', '2', 3, 4, '5'), {'a': 1, 'b': '2', 'c': 3}, ((int, float, str, int\n ), {'a': int, 'b': float}), (1, 2.0, '3', 4, '5'), {'a': 1, 'b': 2.0,\n 'c': 3}), (('1 + 2', '[1, 2, 3]', [3, 4, 5]), {'a': '3 + 4', 'b': 5}, (\n ('py...
""" General Character commands usually available to all characters """ import re from django.conf import settings from evennia.utils import utils, evtable from evennia.typeclasses.attributes import NickTemplateInvalid # adding the following for adaptions to commands based on the # addition of the clothing module from c...
[ "evennia.utils.utils.class_from_module" ]
[((437, 492), 'evennia.utils.utils.class_from_module', 'utils.class_from_module', (['settings.COMMAND_DEFAULT_CLASS'], {}), '(settings.COMMAND_DEFAULT_CLASS)\n', (460, 492), False, 'from evennia.utils import utils, evtable\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-01-28 23:11 from base64 import b64encode from django.db import migrations import evennia.utils.picklefield from pickle import dumps, loads from evennia.utils.utils import to_bytes from copy import deepcopy def forwards(apps, schema_editor): ServerConf...
[ "evennia.utils.utils.to_bytes" ]
[((791, 848), 'django.db.migrations.RunPython', 'migrations.RunPython', (['forwards', 'migrations.RunPython.noop'], {}), '(forwards, migrations.RunPython.noop)\n', (811, 848), False, 'from django.db import migrations\n'), ((479, 502), 'evennia.utils.utils.to_bytes', 'to_bytes', (['conf.db_value'], {}), '(conf.db_value)...
""" Attributes are arbitrary data stored on objects. Attributes supports both pure-string values and pickled arbitrary data. Attributes are also used to implement Nicks. This module also contains the Attribute- and NickHandlers as well as the `NAttributeHandler`, which is a non-db version of Attributes. """ import r...
[ "evennia.utils.dbserialize.from_pickle", "evennia.utils.utils.to_str", "evennia.utils.picklefield.PickledObjectField", "evennia.utils.dbserialize.to_pickle", "evennia.utils.utils.is_iter", "evennia.utils.utils.make_iter", "evennia.locks.lockhandler.LockHandler" ]
[((31192, 31228), 're.compile', 're.compile', (['"""\\\\\\\\(\\\\$)([1-9][0-9]?)"""'], {}), "('\\\\\\\\(\\\\$)([1-9][0-9]?)')\n", (31202, 31228), False, 'import re\n'), ((31251, 31283), 're.compile', 're.compile', (['"""(\\\\$)([1-9][0-9]?)"""'], {}), "('(\\\\$)([1-9][0-9]?)')\n", (31261, 31283), False, 'import re\n'),...
""" MudderyNPC is NPC's base class. """ import json import traceback from evennia import TICKER_HANDLER from evennia.utils import logger from muddery.typeclasses.characters import MudderyCharacter from muddery.utils.localized_strings_handler import _ from muddery.utils.dialogue_handler import DIALOGUE_HANDLER from mu...
[ "evennia.utils.logger.log_errmsg" ]
[((1401, 1452), 'muddery.worlddata.data_sets.DATA_SETS.npc_dialogues.objects.filter', 'DATA_SETS.npc_dialogues.objects.filter', ([], {'npc': 'npc_key'}), '(npc=npc_key)\n', (1439, 1452), False, 'from muddery.worlddata.data_sets import DATA_SETS\n'), ((3487, 3528), 'muddery.utils.dialogue_handler.DIALOGUE_HANDLER.have_q...
# file mygame/commands/make_npcs.py import time from evennia.utils import utils, create, logger, search from evennia.objects.models import ObjectDB from django.conf import settings from commands.make_crustumerians import Citizen self = Citizen() typeclass = settings.BASE_CHARACTER_TYPECLASS start_location = ObjectDB...
[ "evennia.objects.models.ObjectDB.objects.get_id", "evennia.utils.create.create_object" ]
[((238, 247), 'commands.make_crustumerians.Citizen', 'Citizen', ([], {}), '()\n', (245, 247), False, 'from commands.make_crustumerians import Citizen\n'), ((312, 360), 'evennia.objects.models.ObjectDB.objects.get_id', 'ObjectDB.objects.get_id', (['settings.START_LOCATION'], {}), '(settings.START_LOCATION)\n', (335, 360...
""" Room Rooms are simple containers that are to gps metadata of their own. """ from evennia import DefaultRoom, utils from characters import Character from npc import Npc from mob import Mob from evennia import TICKER_HANDLER as tickerhandler class Room(DefaultRoom): """ Rooms are like any Object, except t...
[ "evennia.TICKER_HANDLER.add", "evennia.TICKER_HANDLER.remove", "evennia.utils.inherits_from" ]
[((1055, 1084), 'evennia.utils.inherits_from', 'utils.inherits_from', (['obj', 'Npc'], {}), '(obj, Npc)\n', (1074, 1084), False, 'from evennia import DefaultRoom, utils\n'), ((2634, 2669), 'evennia.utils.inherits_from', 'utils.inherits_from', (['obj', 'Character'], {}), '(obj, Character)\n', (2653, 2669), False, 'from ...
""" Different classes for running Arx-specific tests, mostly configuring evennia's built-in test framework to work for us. Some minor changes, like having their command tests print out raw strings so we don't need to guess what whitespace characters don't match. """ import re from mock import Mock from evennia.comman...
[ "evennia.server.sessionhandler.SESSIONS.session_from_sessid", "evennia.utils.utils.to_str", "evennia.utils.ansi.parse_ansi", "evennia.utils.create.create_object", "evennia.utils.create.create_account" ]
[((763, 824), 're.compile', 're.compile', (['"""^\\\\+|-+\\\\+|\\\\+-+|--+|\\\\|(?:\\\\s|$)"""', 're.MULTILINE'], {}), "('^\\\\+|-+\\\\+|\\\\+-+|--+|\\\\|(?:\\\\s|$)', re.MULTILINE)\n", (773, 824), False, 'import re\n'), ((2037, 2073), 'web.character.models.Roster.objects.create', 'Roster.objects.create', ([], {'name':...
# this is an optimized version only available in later Django versions from unittest import TestCase from evennia.scripts.models import ScriptDB, ObjectDoesNotExist from evennia.utils.create import create_script from evennia.scripts.scripts import DoNothing class TestScriptDB(TestCase): "Check the singleton/stati...
[ "evennia.utils.create.create_script", "evennia.scripts.models.ScriptDB.objects.get_all_scripts" ]
[((395, 419), 'evennia.utils.create.create_script', 'create_script', (['DoNothing'], {}), '(DoNothing)\n', (408, 419), False, 'from evennia.utils.create import create_script\n'), ((708, 742), 'evennia.scripts.models.ScriptDB.objects.get_all_scripts', 'ScriptDB.objects.get_all_scripts', ([], {}), '()\n', (740, 742), Fal...
""" Account (OOC) commands. These are stored on the Account object and self.caller is thus always an Account, not a Character. """ import datetime, re from django.conf import settings from evennia.commands.default.account import CmdOption as DefaultOption from evennia.server.sessionhandler import SESSIONS from evennia....
[ "evennia.utils.logger.log_sec", "evennia.server.sessionhandler.SESSIONS.get_sessions" ]
[((2112, 2147), 're.match', 're.match', (['"""^(\\\\S+)(.*)$"""', 'self.args'], {}), "('^(\\\\S+)(.*)$', self.args)\n", (2120, 2147), False, 'import datetime, re\n'), ((10504, 10519), 'server.utils.utils.get_sw', 'get_sw', (['account'], {}), '(account)\n', (10510, 10519), False, 'from server.utils.utils import get_sw\n...
from django import template from django.utils.safestring import mark_safe from evennia.utils.ansi import parse_ansi register = template.Library() @register.filter def mush_to_html(value): if not value: return value value = value.replace("&", "&amp") value = value.replace("<", "&lt") ...
[ "evennia.utils.ansi.parse_ansi" ]
[((132, 150), 'django.template.Library', 'template.Library', ([], {}), '()\n', (148, 150), False, 'from django import template\n'), ((671, 705), 'evennia.utils.ansi.parse_ansi', 'parse_ansi', (['value'], {'strip_ansi': '(True)'}), '(value, strip_ansi=True)\n', (681, 705), False, 'from evennia.utils.ansi import parse_an...
""" TutorialWorld - basic objects - Griatch 2011 This module holds all "dead" object definitions for the tutorial world. Object-commands and -cmdsets are also defined here, together with the object. Objects: TutorialObject Readable Climbable Obelisk LightSource CrumblingWall Weapon WeaponRack """ import random f...
[ "evennia.utils.spawner.spawn", "evennia.utils.search.search_object", "evennia.utils.delay" ]
[((23234, 23275), 'evennia.utils.search.search_object', 'search.search_object', (['self.db.destination'], {}), '(self.db.destination)\n', (23254, 23275), False, 'from evennia.utils import search\n'), ((23536, 23563), 'evennia.utils.delay', 'utils.delay', (['(45)', 'self.reset'], {}), '(45, self.reset)\n', (23547, 23563...
"""Tests for validatorfuncs """ from django.test import TestCase from evennia.utils import validatorfuncs import mock import datetime import pytz class TestValidatorFuncs(TestCase): def test_text_ok(self): for val in [None, -123, "abc", 1.234, {1: True, 2: False}, ["a", 1]]: self.assertEqual(...
[ "evennia.utils.validatorfuncs.signed_integer", "evennia.utils.validatorfuncs.text", "evennia.utils.validatorfuncs.future", "evennia.utils.validatorfuncs.positive_integer", "evennia.utils.validatorfuncs.boolean", "evennia.utils.validatorfuncs.timezone", "evennia.utils.validatorfuncs.duration", "evennia...
[((362, 388), 'mock.patch', 'mock.patch', (['"""builtins.str"""'], {}), "('builtins.str')\n", (372, 388), False, 'import mock\n'), ((2905, 2931), 'mock.patch', 'mock.patch', (['"""builtins.int"""'], {}), "('builtins.int')\n", (2915, 2931), False, 'import mock\n'), ((3348, 3374), 'mock.patch', 'mock.patch', (['"""builti...
import re try: from django.utils.unittest import TestCase except ImportError: from django.test import TestCase from .ansi import ANSIString from evennia import utils class ANSIStringTestCase(TestCase): def checker(self, ansi, raw, clean): """ Verifies the raw and clean strings of an ANSI...
[ "evennia.utils.m_len", "evennia.utils.crop", "evennia.utils.dedent", "evennia.utils.list_to_string", "evennia.utils.is_iter" ]
[((3075, 3096), 're.split', 're.split', (['"""A"""', 'target'], {}), "('A', target)\n", (3083, 3096), False, 'import re\n'), ((5856, 5883), 'evennia.utils.is_iter', 'utils.is_iter', (['[1, 2, 3, 4]'], {}), '([1, 2, 3, 4])\n', (5869, 5883), False, 'from evennia import utils\n'), ((5914, 5954), 'evennia.utils.is_iter', '...
from django.conf import settings from evennia.utils.ansi import strip_ansi screen_width = settings.CLIENT_DEFAULT_WIDTH def pick_color(caller, color): code = None string = "" try: if color.isnumeric(): #Grab RGB values from string. r, g, b = color[0], color[1], color[2] ...
[ "evennia.utils.ansi.strip_ansi" ]
[((2356, 2372), 'evennia.utils.ansi.strip_ansi', 'strip_ansi', (['text'], {}), '(text)\n', (2366, 2372), False, 'from evennia.utils.ansi import strip_ansi\n')]
from evennia.utils.utils import class_from_module from evennia.utils.logger import log_trace import athanor.messages.themes as tmsg from athanor.gamedb.scripts import AthanorGlobalScript from athanor.utils.text import partial_match from athanor.gamedb.models import ThemeBridge from athanor.gamedb.themes import Athanor...
[ "evennia.utils.utils.class_from_module", "evennia.utils.logger.log_trace" ]
[((2852, 2915), 'athanor.gamedb.themes.AthanorTheme.validate_unique_key', 'AthanorTheme.validate_unique_key', (['new_name'], {'rename_target': 'theme'}), '(new_name, rename_target=theme)\n', (2884, 2915), False, 'from athanor.gamedb.themes import AthanorTheme\n'), ((6313, 6353), 'athanor.utils.text.partial_match', 'par...
# -*- coding: utf-8 -*- """ EvMore - pager mechanism This is a pager for displaying long texts and allows stepping up and down in the text (the name comes from the traditional 'more' unix command). To use, simply pass the text through the EvMore object: from evennia.utils.evmore import EvMore text = some_lo...
[ "evennia.utils.utils.justify", "evennia.utils.utils.make_iter" ]
[((7791, 7806), 'evennia.utils.utils.make_iter', 'make_iter', (['text'], {}), '(text)\n', (7800, 7806), False, 'from evennia.utils.utils import justify, make_iter\n'), ((8746, 8777), 'evennia.utils.utils.justify', 'justify', (['line'], {}), '(line, **justify_kwargs)\n', (8753, 8777), False, 'from evennia.utils.utils im...
""" Tutorial - talking NPC tests. """ from evennia.commands.default.tests import BaseEvenniaCommandTest from evennia.utils.create import create_object from . import talking_npc class TestTalkingNPC(BaseEvenniaCommandTest): def test_talkingnpc(self): npc = create_object(talking_npc.TalkingNPC, key="npctal...
[ "evennia.utils.create.create_object" ]
[((271, 346), 'evennia.utils.create.create_object', 'create_object', (['talking_npc.TalkingNPC'], {'key': '"""npctalker"""', 'location': 'self.room1'}), "(talking_npc.TalkingNPC, key='npctalker', location=self.room1)\n", (284, 346), False, 'from evennia.utils.create import create_object\n')]
""" MIT License Copyright (c) 2021 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
[ "evennia.utils.ansi.raw" ]
[((7600, 7646), 'typeclasses.characters.calculate_ability_modifier', 'calculate_ability_modifier', (['caller.db.strength'], {}), '(caller.db.strength)\n', (7626, 7646), False, 'from typeclasses.characters import calculate_ability_modifier\n'), ((7717, 7762), 'typeclasses.characters.calculate_ability_modifier', 'calcula...
# # This sets up how models are displayed # in the web admin interface. # from django.conf import settings from django import forms from django.urls import reverse from django.http import HttpResponseRedirect from django.conf import settings from django.conf.urls import url from django.contrib import admin, messages fr...
[ "evennia.accounts.models.AccountDB.objects.all", "evennia.objects.models.ObjectDB.objects.filter", "evennia.objects.models.ObjectDB.objects.all", "evennia.utils.dbserialize.pack_dbobj", "evennia.objects.models.ObjectDB._meta.get_field" ]
[((5747, 5771), 'django.contrib.admin.register', 'admin.register', (['ObjectDB'], {}), '(ObjectDB)\n', (5761, 5771), False, 'from django.contrib import admin, messages\n'), ((3105, 3127), 'evennia.objects.models.ObjectDB.objects.all', 'ObjectDB.objects.all', ([], {}), '()\n', (3125, 3127), False, 'from evennia.objects....
# Views for our help topics app from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import render, get_object_or_404 from evennia.help.models import HelpEntry from world.dominion.models import ( CraftingRecipe, CraftingMaterialType, Organization, Me...
[ "evennia.help.models.HelpEntry.objects.all" ]
[((456, 511), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['HelpEntry'], {'db_key__iexact': 'object_key'}), '(HelpEntry, db_key__iexact=object_key)\n', (473, 511), False, 'from django.shortcuts import render, get_object_or_404\n'), ((713, 805), 'django.shortcuts.render', 'render', (['request', '"""help_...
""" Various helper resources for writing unittests. """ import sys from twisted.internet.defer import Deferred from django.conf import settings from django.test import TestCase from mock import Mock, patch from evennia.objects.objects import DefaultObject, DefaultCharacter, DefaultRoom, DefaultExit from evennia.accoun...
[ "evennia.server.sessionhandler.SESSIONS.session_from_sessid", "evennia.utils.idmapper.models.flush_cache", "evennia.server.sessionhandler.SESSIONS.login", "evennia.utils.create.create_script", "evennia.utils.create.create_object", "evennia.server.serversession.ServerSession", "evennia.utils.create.creat...
[((732, 742), 'twisted.internet.defer.Deferred', 'Deferred', ([], {}), '()\n', (740, 742), False, 'from twisted.internet.defer import Deferred\n'), ((887, 897), 'twisted.internet.defer.Deferred', 'Deferred', ([], {}), '()\n', (895, 897), False, 'from twisted.internet.defer import Deferred\n'), ((2023, 2033), 'twisted.i...
""" Typeclasses for the in-game Python system. To use thm, one should inherit from these classes (EventObject, EventRoom, EventCharacter and EventExit). """ from evennia import DefaultCharacter, DefaultExit, DefaultObject, DefaultRoom from evennia import ScriptDB from evennia.utils.utils import delay, inherits_from,...
[ "evennia.contrib.ingame_python.callbackhandler.CallbackHandler", "evennia.utils.utils.delay", "evennia.utils.utils.inherits_from" ]
[((20605, 20655), 'evennia.utils.utils.inherits_from', 'inherits_from', (['traversing_object', 'DefaultCharacter'], {}), '(traversing_object, DefaultCharacter)\n', (20618, 20655), False, 'from evennia.utils.utils import delay, inherits_from, lazy_property\n'), ((23001, 23022), 'evennia.contrib.ingame_python.callbackhan...
""" This file contains the generic, assorted views that don't fall under one of the other applications. Views are django's way of processing e.g. html templates on the fly. """ from django.contrib.admin.sites import site from django.conf import settings from django.contrib.auth import authenticate from django.contrib...
[ "evennia.objects.models.ObjectDB.objects.filter", "evennia.utils.logger.log_trace", "evennia.SESSION_HANDLER.account_count", "evennia.accounts.models.AccountDB.objects.get", "evennia.accounts.models.AccountDB.objects.num_total_accounts", "evennia.accounts.models.AccountDB.objects.get_recently_connected_ac...
[((2449, 2480), 'evennia.SESSION_HANDLER.account_count', 'SESSION_HANDLER.account_count', ([], {}), '()\n', (2478, 2480), False, 'from evennia import SESSION_HANDLER\n'), ((3725, 3764), 'django.shortcuts.render', 'render', (['request', '"""index.html"""', 'pagevars'], {}), "(request, 'index.html', pagevars)\n", (3731, ...
# -*- coding: utf-8 -*- from datetime import datetime import re from django.db import models from django.conf import settings from django.utils.timezone import now from evennia.accounts.models import AccountDB from evennia.utils.utils import time_format from evennia_wiki.markdown_engine import ENGINE from evennia_wik...
[ "evennia.utils.utils.time_format" ]
[((467, 498), 're.compile', 're.compile', (['"""^[A-Za-z0-9_/-]*$"""'], {}), "('^[A-Za-z0-9_/-]*$')\n", (477, 498), False, 'import re\n'), ((595, 608), 'evennia_wiki.managers.PageManager', 'PageManager', ([], {}), '()\n', (606, 608), False, 'from evennia_wiki.managers import PageManager\n'), ((623, 684), 'django.db.mod...
""" Test map builder. """ from evennia.commands.default.tests import BaseEvenniaCommandTest from . import mapbuilder # -*- coding: utf-8 -*- # Add the necessary imports for your instructions here. from evennia import create_object from typeclasses import rooms, exits from random import randint import random # A m...
[ "evennia.create_object" ]
[((1551, 1575), 'random.choice', 'random.choice', (['room_desc'], {}), '(room_desc)\n', (1564, 1575), False, 'import random\n'), ((4394, 4496), 'evennia.create_object', 'create_object', (['exits.Exit'], {'key': '"""south"""', 'aliases': "['s']", 'location': 'north_room', 'destination': 'south_room'}), "(exits.Exit, key...
from evennia.utils.ansi import ANSIString from athanor.gamedb.scripts import AthanorOptionScript from athanor.gamedb.models import ThemeBridge, ThemeParticipant class AthanorTheme(AthanorOptionScript): re_name = re.compile(r"") def create_bridge(self, key, clean_key): if hasattr(self, 'theme_bridge...
[ "evennia.utils.ansi.ANSIString" ]
[((543, 559), 'evennia.utils.ansi.ANSIString', 'ANSIString', (['name'], {}), '(name)\n', (553, 559), False, 'from evennia.utils.ansi import ANSIString\n'), ((1121, 1230), 'athanor.gamedb.models.ThemeParticipant.objects.create', 'ThemeParticipant.objects.create', ([], {'db_theme': 'self.theme_bridge', 'db_object': 'char...
""" Service for integrating the Evennia Game Index client into Evennia. """ from twisted.internet import reactor from twisted.internet.task import LoopingCall from twisted.application.service import Service from evennia.utils import logger from .client import EvenniaGameIndexClient # How many seconds to wait before ...
[ "evennia.utils.logger.log_infomsg" ]
[((883, 925), 'twisted.internet.task.LoopingCall', 'LoopingCall', (['self.client.send_game_details'], {}), '(self.client.send_game_details)\n', (894, 925), False, 'from twisted.internet.task import LoopingCall\n'), ((1255, 1331), 'twisted.internet.reactor.callLater', 'reactor.callLater', (['_FIRST_UPDATE_DELAY', 'self....
""" The Evennia Portal service acts as an AMP-server, handling AMP communication to the AMP clients connecting to it (by default these are the Evennia Server and the evennia launcher). """ import os import sys from twisted.internet import protocol from evennia.server.portal import amp from django.conf import settings ...
[ "evennia.utils.utils.class_from_module", "evennia.server.portal.amp.loads", "evennia.utils.logger.log_trace", "evennia.server.portal.amp.dumps" ]
[((678, 695), 'os.environ.copy', 'os.environ.copy', ([], {}), '()\n', (693, 695), False, 'import os\n'), ((1434, 1487), 'evennia.utils.utils.class_from_module', 'class_from_module', (['settings.AMP_SERVER_PROTOCOL_CLASS'], {}), '(settings.AMP_SERVER_PROTOCOL_CLASS)\n', (1451, 1487), False, 'from evennia.utils.utils imp...
""" Simple turn-based combat system with spell casting Contrib - <NAME> 2017 This is a version of the 'turnbattle' contrib that includes a basic, expandable framework for a 'magic system', whereby players can spend a limited resource (MP) to achieve a wide variety of effects, both in and out of combat. This does not ...
[ "evennia.create_object" ]
[((4421, 4437), 'random.randint', 'randint', (['(1)', '(1000)'], {}), '(1, 1000)\n', (4428, 4437), False, 'from random import randint\n'), ((5281, 5296), 'random.randint', 'randint', (['(1)', '(100)'], {}), '(1, 100)\n', (5288, 5296), False, 'from random import randint\n'), ((6748, 6763), 'random.randint', 'randint', (...
""" The Evennia Server service acts as an AMP-client when talking to the Portal. This module sets up the Client-side communication. """ import os from evennia.server.portal import amp from twisted.internet import protocol from evennia.utils import logger class AMPClientFactory(protocol.ReconnectingClientFactory): ...
[ "evennia.utils.logger.log_msg", "evennia.utils.logger.log_trace", "evennia.server.portal.amp.dumps", "evennia.utils.logger.log_info" ]
[((2105, 2160), 'evennia.utils.logger.log_info', 'logger.log_info', (['"""Server disconnected from the portal."""'], {}), "('Server disconnected from the portal.')\n", (2120, 2160), False, 'from evennia.utils import logger\n'), ((2169, 2254), 'twisted.internet.protocol.ReconnectingClientFactory.clientConnectionLost', '...
""" Head - Crown/Helmet/Hat Neck - Necklace/Amulet Shoulders - Shoulder Pads Chest - Chest Armor Arms - Sleeves Hands - Pair of Gloves Fingers - Up to 4 Rings Waist - Belt/Sash Thighs - Greaves Calves - Greaves Feet - Boots/Shoes/Sandals Bag - Satchel/Backpack/Sack/Bag - Determines maximum inventory slots. Weapons - ...
[ "evennia.utils.evtable.EvTable", "evennia.prototypes.spawner.spawn", "evennia.utils.evtable.EvCell" ]
[((2589, 2622), 'misc.generic_str.possessive', 'generic_str.possessive', (['owner.key'], {}), '(owner.key)\n', (2611, 2622), False, 'from misc import generic_str\n'), ((2688, 2748), 'evennia.utils.evtable.EvCell', 'EvCell', (['f"""{owner_possessive} Equipment"""'], {'align': '"""c"""', 'width': '(25)'}), "(f'{owner_pos...
""" Places for tabletalk """ from typeclasses.objects import Object from typeclasses.places.cmdset_places import DefaultCmdSet, SittingCmdSet from evennia.utils.utils import make_iter from world.crafting.craft_data_handlers import PlaceDataHandler class Place(Object): """ Class for placed objects that allow ...
[ "evennia.utils.utils.make_iter" ]
[((4456, 4474), 'evennia.utils.utils.make_iter', 'make_iter', (['exclude'], {}), '(exclude)\n', (4465, 4474), False, 'from evennia.utils.utils import make_iter\n')]
""" Channel The channel class represents the out-of-character chat-room usable by Accounts in-game. It is mostly overloaded to change its appearance, but channels can be used to implement many different forms of message distribution systems. Note that sending data to channels are handled via the CMD_CHANNEL syscomman...
[ "evennia.utils.logger.log_trace", "evennia.utils.ansi.strip_ansi" ]
[((5060, 5079), 'evennia.utils.ansi.strip_ansi', 'strip_ansi', (['message'], {}), '(message)\n', (5070, 5079), False, 'from evennia.utils.ansi import strip_ansi\n'), ((6667, 6681), 'server.utils.utils.get_sw', 'get_sw', (['entity'], {}), '(entity)\n', (6673, 6681), False, 'from server.utils.utils import get_sw, wrap\n'...
"""Tests for text2html """ import unittest from django.test import TestCase from evennia.utils import ansi, text2html import mock class TestText2Html(TestCase): def test_re_color(self): parser = text2html.HTML_PARSER self.assertEqual("foo", parser.re_color("foo")) self.assertEqual( ...
[ "evennia.utils.text2html.parse_html" ]
[((1013, 1043), 'unittest.skip', 'unittest.skip', (['"""parser issues"""'], {}), "('parser issues')\n", (1026, 1043), False, 'import unittest\n'), ((1400, 1430), 'unittest.skip', 'unittest.skip', (['"""parser issues"""'], {}), "('parser issues')\n", (1413, 1430), False, 'import unittest\n'), ((1904, 1934), 'unittest.sk...