Dataset Viewer
Auto-converted to Parquet Duplicate
code
stringlengths
321
95.4k
apis
sequence
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...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
3