Add role playing to this role playing game
This commit is contained in:
parent
518c691dee
commit
04aa677fb7
6 changed files with 12 additions and 6 deletions
|
|
@ -17,6 +17,7 @@ own cmdsets by inheriting from them or directly from `evennia.CmdSet`.
|
||||||
from evennia import default_cmds
|
from evennia import default_cmds
|
||||||
from evennia.contrib.grid import extended_room
|
from evennia.contrib.grid import extended_room
|
||||||
from evennia.contrib.game_systems.gendersub import SetGender
|
from evennia.contrib.game_systems.gendersub import SetGender
|
||||||
|
from evennia.contrib.rpg.rpsystem import RPSystemCmdSet
|
||||||
from commands.sittables import CmdNoSitStand
|
from commands.sittables import CmdNoSitStand
|
||||||
from commands.everyone import CmdTake, CmdThink
|
from commands.everyone import CmdTake, CmdThink
|
||||||
|
|
||||||
|
|
@ -38,10 +39,8 @@ class CharacterCmdSet(default_cmds.CharacterCmdSet):
|
||||||
self.add(CmdTake())
|
self.add(CmdTake())
|
||||||
self.add(CmdThink())
|
self.add(CmdThink())
|
||||||
self.add(SetGender())
|
self.add(SetGender())
|
||||||
|
self.add(RPSystemCmdSet())
|
||||||
self.add(extended_room.ExtendedRoomCmdSet)
|
self.add(extended_room.ExtendedRoomCmdSet)
|
||||||
#
|
|
||||||
# any commands you add below will overload the default ones.
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
class AccountCmdSet(default_cmds.AccountCmdSet):
|
class AccountCmdSet(default_cmds.AccountCmdSet):
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,5 @@ class CmdFly(Command):
|
||||||
|
|
||||||
class CmdSetWizardSpells(CmdSet):
|
class CmdSetWizardSpells(CmdSet):
|
||||||
def at_cmdset_creation(self):
|
def at_cmdset_creation(self):
|
||||||
|
super().at_cmdset_creation()
|
||||||
self.add(CmdFly)
|
self.add(CmdFly)
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,9 @@ STATIC_URL = "/cozy/static/"
|
||||||
SSH_ENABLED = True
|
SSH_ENABLED = True
|
||||||
# SSL_ENABLED = True
|
# SSL_ENABLED = True
|
||||||
|
|
||||||
|
SEARCH_MULTIMATCH_REGEX = r"(?P<number>[0-9]+)-(?P<name>[^-]*)(?P<args>.*)"
|
||||||
|
SEARCH_MULTIMATCH_TEMPLATE = " {number}-{name}{aliases}{info}\n"
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Settings given in secret_settings.py override those in this file.
|
# Settings given in secret_settings.py override those in this file.
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ from re import match
|
||||||
|
|
||||||
from evennia.objects.objects import DefaultCharacter
|
from evennia.objects.objects import DefaultCharacter
|
||||||
from evennia.contrib.game_systems.gendersub import GenderCharacter
|
from evennia.contrib.game_systems.gendersub import GenderCharacter
|
||||||
|
from evennia.contrib.rpg.rpsystem import ContribRPCharacter
|
||||||
from evennia.prototypes.spawner import spawn
|
from evennia.prototypes.spawner import spawn
|
||||||
from evennia.utils import delay, logger
|
from evennia.utils import delay, logger
|
||||||
|
|
||||||
|
|
@ -49,7 +50,7 @@ READ_LETTER = """You read a letter with an oddly familiar penmanship:
|
||||||
(Type 'help start' for details on playing this game)"""
|
(Type 'help start' for details on playing this game)"""
|
||||||
|
|
||||||
|
|
||||||
class Character(Object, GenderCharacter):
|
class Character(Object, GenderCharacter, ContribRPCharacter):
|
||||||
"""
|
"""
|
||||||
The Character just re-implements some of the Object's methods and hooks
|
The Character just re-implements some of the Object's methods and hooks
|
||||||
to represent a Character entity in-game.
|
to represent a Character entity in-game.
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import datetime
|
||||||
|
|
||||||
from evennia import gametime
|
from evennia import gametime
|
||||||
from evennia.utils import delay, logger
|
from evennia.utils import delay, logger
|
||||||
|
from evennia.contrib.rpg.rpsystem import ContribRPObject
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Object
|
Object
|
||||||
|
|
@ -31,7 +32,7 @@ class ObjectParent:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class Object(ObjectParent, DefaultObject):
|
class Object(ObjectParent, ContribRPObject):
|
||||||
"""
|
"""
|
||||||
This is the root Object typeclass, representing all entities that
|
This is the root Object typeclass, representing all entities that
|
||||||
have an actual presence in-game. DefaultObjects generally have a
|
have an actual presence in-game. DefaultObjects generally have a
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ from datetime import datetime
|
||||||
from evennia import utils
|
from evennia import utils
|
||||||
from evennia.utils import gametime
|
from evennia.utils import gametime
|
||||||
from evennia.contrib.grid.extended_room import ExtendedRoom
|
from evennia.contrib.grid.extended_room import ExtendedRoom
|
||||||
|
from evennia.contrib.rpg.rpsystem import ContribRPRoom
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
@ -20,7 +21,7 @@ from .objects import ObjectParent
|
||||||
_SEARCH_AT_RESULT = utils.object_from_module(settings.SEARCH_AT_RESULT)
|
_SEARCH_AT_RESULT = utils.object_from_module(settings.SEARCH_AT_RESULT)
|
||||||
|
|
||||||
|
|
||||||
class Room(ObjectParent, ExtendedRoom):
|
class Room(ObjectParent, ExtendedRoom, ContribRPRoom):
|
||||||
"""
|
"""
|
||||||
Rooms are like any Object, except their location is None
|
Rooms are like any Object, except their location is None
|
||||||
(which is default). They also use basetype_setup() to
|
(which is default). They also use basetype_setup() to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue