Update links/paths to new contrib locations
This commit is contained in:
parent
7f2b8c81d7
commit
8139fd79c7
61 changed files with 171 additions and 248 deletions
4
evennia/contrib/tutorials/__init__.py
Normal file
4
evennia/contrib/tutorials/__init__.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
"""
|
||||
Contribs acting as tutorials, examples or supporting the documentation.
|
||||
|
||||
"""
|
||||
|
|
@ -7,7 +7,7 @@ from evennia.utils.test_resources import EvenniaTest
|
|||
from .bodyfunctions import BodyFunctions
|
||||
|
||||
|
||||
@patch("evennia.contrib.tutorial_examples.bodyfunctions.random")
|
||||
@patch("evennia.contrib.tutorials.bodyfunctions.random")
|
||||
class TestBodyFunctions(EvenniaTest):
|
||||
script_typeclass = BodyFunctions
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class CmdTalk(default_cmds.MuxCommand):
|
|||
|
||||
# Initiate the menu. Change this if you are putting this on
|
||||
# some other custom NPC class.
|
||||
EvMenu(self.caller, "evennia.contrib.talking_npc", startnode="menu_start_node")
|
||||
EvMenu(self.caller, "evennia.contrib.tutorials.talking_npc", startnode="menu_start_node")
|
||||
|
||||
|
||||
class TalkingCmdSet(CmdSet):
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from evennia import TICKER_HANDLER
|
|||
from evennia import search_object
|
||||
from evennia import Command, CmdSet
|
||||
from evennia import logger
|
||||
from evennia.contrib.tutorial_world import objects as tut_objects
|
||||
from . import objects as tut_objects
|
||||
|
||||
|
||||
class CmdMobOnOff(Command):
|
||||
|
|
|
|||
|
|
@ -982,7 +982,7 @@ class TutorialWeapon(TutorialObject):
|
|||
|
||||
WEAPON_PROTOTYPES = {
|
||||
"weapon": {
|
||||
"typeclass": "evennia.contrib.tutorial_world.objects.TutorialWeapon",
|
||||
"typeclass": "evennia.contrib.tutorials.tutorial_world.objects.TutorialWeapon",
|
||||
"key": "Weapon",
|
||||
"hit": 0.2,
|
||||
"parry": 0.2,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ from evennia import TICKER_HANDLER
|
|||
from evennia import CmdSet, Command, DefaultRoom
|
||||
from evennia import utils, create_object, search_object
|
||||
from evennia import syscmdkeys, default_cmds
|
||||
from evennia.contrib.tutorial_world.objects import LightSource
|
||||
from .objects import LightSource
|
||||
|
||||
# the system error-handling module is defined in the settings. We load the
|
||||
# given setting here using utils.object_from_module. This way we can use
|
||||
|
|
@ -1158,7 +1158,7 @@ class OutroRoom(TutorialRoom):
|
|||
del character.db.combat_parry_mode
|
||||
del character.db.tutorial_bridge_position
|
||||
for obj in character.contents:
|
||||
if obj.typeclass_path.startswith("evennia.contrib.tutorial_world"):
|
||||
if obj.typeclass_path.startswith("evennia.contrib.tutorials.tutorial_world"):
|
||||
obj.delete()
|
||||
character.tags.clear(category="tutorial_world")
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,8 @@ from twisted.trial.unittest import TestCase as TwistedTestCase
|
|||
from twisted.internet.base import DelayedCall
|
||||
from evennia.commands.default.tests import CommandTest
|
||||
from evennia.utils.create import create_object
|
||||
from evennia.contrib.tutorial_world import mob, objects as tutobjects
|
||||
from evennia.utils.test_resources import EvenniaTest, mockdelay, mockdeferLater
|
||||
from evennia.contrib.tutorial_world import rooms as tutrooms
|
||||
from . import mob, objects as tutobjects, rooms as tutrooms
|
||||
|
||||
|
||||
class TestTutorialWorldMob(EvenniaTest):
|
||||
|
|
@ -59,7 +58,7 @@ class TestTutorialWorldObjects(TwistedTestCase, CommandTest):
|
|||
obelisk = create_object(tutobjects.Obelisk, key="obelisk", location=self.room1)
|
||||
self.assertEqual(obelisk.return_appearance(self.char1).startswith("|cobelisk("), True)
|
||||
|
||||
@patch("evennia.contrib.tutorial_world.objects.delay", mockdelay)
|
||||
@patch("evennia.contrib.tutorials.tutorial_world.objects.delay", mockdelay)
|
||||
@patch("evennia.scripts.taskhandler.deferLater", mockdeferLater)
|
||||
def test_lightsource(self):
|
||||
light = create_object(tutobjects.LightSource, key="torch", location=self.room1)
|
||||
|
|
@ -71,7 +70,7 @@ class TestTutorialWorldObjects(TwistedTestCase, CommandTest):
|
|||
)
|
||||
self.assertFalse(light.pk)
|
||||
|
||||
@patch("evennia.contrib.tutorial_world.objects.delay", mockdelay)
|
||||
@patch("evennia.contrib.tutorials.tutorial_world.objects.delay", mockdelay)
|
||||
@patch("evennia.scripts.taskhandler.deferLater", mockdeferLater)
|
||||
def test_crumblingwall(self):
|
||||
wall = create_object(tutobjects.CrumblingWall, key="wall", location=self.room1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue