Fix tutorial world build and intro
This commit is contained in:
parent
ca7bee9d99
commit
a980ed617d
9 changed files with 57 additions and 50 deletions
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.10]
|
python-version: ['3.10']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout 0.9.5 branch
|
- name: Checkout 0.9.5 branch
|
||||||
|
|
|
||||||
16
.github/workflows/github_action_test_suite.yml
vendored
16
.github/workflows/github_action_test_suite.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.9", "3.10"]
|
python-version: ['3.9', '3.10']
|
||||||
TESTING_DB: ['sqlite3', 'postgresql', 'mysql']
|
TESTING_DB: ['sqlite3', 'postgresql', 'mysql']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -94,7 +94,7 @@ jobs:
|
||||||
# it's also not critical if pushing to either service fails (happens for PRs since env is not
|
# it's also not critical if pushing to either service fails (happens for PRs since env is not
|
||||||
# available outside of the evennia org)
|
# available outside of the evennia org)
|
||||||
- name: Send data to Coveralls
|
- name: Send data to Coveralls
|
||||||
if: ${{ matrix.TESTING_DB == 'sqlite3' && matrix.python-version == "3.10" }}
|
if: ${{ matrix.TESTING_DB == 'sqlite3' && matrix.python-version == '3.10' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||||
|
|
@ -103,7 +103,7 @@ jobs:
|
||||||
coveralls
|
coveralls
|
||||||
|
|
||||||
- name: Send data to Codacy
|
- name: Send data to Codacy
|
||||||
if: ${{ matrix.TESTING_DB == 'sqlite3' && matrix.python-version == "3.10" }}
|
if: ${{ matrix.TESTING_DB == 'sqlite3' && matrix.python-version == '3.10' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: codacy/codacy-coverage-reporter-action@master
|
uses: codacy/codacy-coverage-reporter-action@master
|
||||||
with:
|
with:
|
||||||
|
|
@ -113,22 +113,22 @@ jobs:
|
||||||
# docker setup and push
|
# docker setup and push
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == "3.10"
|
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == '3.10'
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == "3.10"
|
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == '3.10'
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
-
|
-
|
||||||
name: Login to DockerHub
|
name: Login to DockerHub
|
||||||
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == "3.10" && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
|
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == '3.10' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Build and push for master
|
name: Build and push for master
|
||||||
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == "3.10" && github.ref == 'refs/heads/master'
|
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == '3.10' && github.ref == 'refs/heads/master'
|
||||||
id: docker_build_master
|
id: docker_build_master
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -136,7 +136,7 @@ jobs:
|
||||||
tags: evennia/evennia:latest
|
tags: evennia/evennia:latest
|
||||||
-
|
-
|
||||||
name: Build and push for develop
|
name: Build and push for develop
|
||||||
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == "3.10" && github.ref == 'refs/heads/develop'
|
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == '3.10' && github.ref == 'refs/heads/develop'
|
||||||
id: docker_build_develop
|
id: docker_build_develop
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
SOURCEDIR = source
|
SOURCEDIR = source
|
||||||
BUILDDIR = build
|
BUILDDIR = build
|
||||||
AUTODOCDIR = $(SOURCEDIR)/api
|
AUTODOCDIR = $(SOURCEDIR)/api
|
||||||
|
|
||||||
# You can set these variables from the command line, and also
|
# You can set these variables from the command line, and also
|
||||||
# from the environment for the first two.
|
# from the environment for the first two.
|
||||||
SPHINXOPTS ?=
|
SPHINXOPTS ?=
|
||||||
|
|
|
||||||
|
|
@ -2572,15 +2572,16 @@ class CmdExamine(ObjManipCommand):
|
||||||
if value:
|
if value:
|
||||||
return f"{string}: T"
|
return f"{string}: T"
|
||||||
return f"{string}: F"
|
return f"{string}: F"
|
||||||
return ", ".join(
|
txt = ", ".join(
|
||||||
_truefalse(opt, getattr(cmdset, opt))
|
_truefalse(opt, getattr(cmdset, opt))
|
||||||
for opt in ("no_exits", "no_objs", "no_channels", "duplicates")
|
for opt in ("no_exits", "no_objs", "no_channels", "duplicates")
|
||||||
if getattr(cmdset, opt) is not None
|
if getattr(cmdset, opt) is not None
|
||||||
)
|
)
|
||||||
|
return ", " + txt if txt else ""
|
||||||
|
|
||||||
def format_single_cmdset(self, cmdset):
|
def format_single_cmdset(self, cmdset):
|
||||||
options = self.format_single_cmdset_options(cmdset)
|
options = self.format_single_cmdset_options(cmdset)
|
||||||
return f"{cmdset.path} [{cmdset.key}] ({cmdset.mergetype}, prio {cmdset.priority}{options}"
|
return f"{cmdset.path} [{cmdset.key}] ({cmdset.mergetype}, prio {cmdset.priority}{options})"
|
||||||
|
|
||||||
def format_stored_cmdsets(self, obj):
|
def format_stored_cmdsets(self, obj):
|
||||||
if hasattr(obj, "cmdset"):
|
if hasattr(obj, "cmdset"):
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,14 @@
|
||||||
# Open an exit to tutorial. We don't do this in the @dig
|
# Open an exit to tutorial. We don't do this in the @dig
|
||||||
# command since we want to describe the exit.
|
# command since we want to describe the exit.
|
||||||
#
|
#
|
||||||
@open tutorial;tut;intro = tut#01
|
@open tutorial;tut : tutorial_world.rooms.TutorialStartExit = tut#01
|
||||||
#
|
#
|
||||||
# describe the tutorial exit
|
# describe the tutorial exit
|
||||||
#
|
#
|
||||||
@desc tutorial =
|
@desc tutorial =
|
||||||
This starts the |gEvennia tutorial|n, using a small solo game to show off
|
This exit leads to the |gEvennia tutorial|n, a small solo game to examine.
|
||||||
some of the server's possibilities.
|
Before going there, you may want to enter |wintro|n to get some general help
|
||||||
|
on using the default commands.
|
||||||
#
|
#
|
||||||
# now we actually go to the tutorial
|
# now we actually go to the tutorial
|
||||||
#
|
#
|
||||||
|
|
@ -108,9 +109,6 @@ tutorial
|
||||||
|
|
||||||
This small quest shows some examples of Evennia usage.
|
This small quest shows some examples of Evennia usage.
|
||||||
|
|
||||||
|gDo you want help with how to play? Write |yintro|g to get an introduction to
|
|
||||||
Evennia and the basics of playing!|n
|
|
||||||
|
|
||||||
To get into the mood of this miniature quest, imagine you are an adventurer
|
To get into the mood of this miniature quest, imagine you are an adventurer
|
||||||
out to find fame and fortune. You have heard rumours of an old castle ruin by
|
out to find fame and fortune. You have heard rumours of an old castle ruin by
|
||||||
the coast. In its depth a warrior princess was buried together with her
|
the coast. In its depth a warrior princess was buried together with her
|
||||||
|
|
@ -121,12 +119,8 @@ tutorial
|
||||||
screaming in your face you stand where the moor meet the sea along a high,
|
screaming in your face you stand where the moor meet the sea along a high,
|
||||||
rocky coast ...
|
rocky coast ...
|
||||||
|
|
||||||
Try '|yintro|n' for usage help. During the quest, write '|ytutorial|n' to get
|
|
||||||
behind-the-scenes help anywhere, and '|ygive up|n' to abandon the quest.
|
|
||||||
|
|
||||||
|gwrite 'begin' to start your quest!|n
|
|gwrite 'begin' to start your quest!|n
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Show that the tutorial command works ...
|
# Show that the tutorial command works ...
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ class DemoCommandSetHelp(CmdSet):
|
||||||
from evennia import default_cmds
|
from evennia import default_cmds
|
||||||
|
|
||||||
self.add(default_cmds.CmdHelp())
|
self.add(default_cmds.CmdHelp())
|
||||||
|
self.add(default_cmds.CmdChannel())
|
||||||
|
|
||||||
|
|
||||||
def goto_command_demo_help(caller, raw_string, **kwargs):
|
def goto_command_demo_help(caller, raw_string, **kwargs):
|
||||||
|
|
@ -124,11 +125,11 @@ The small sign reads:
|
||||||
of their name (like '|ylook cozy|n') or use the number in the list to pick
|
of their name (like '|ylook cozy|n') or use the number in the list to pick
|
||||||
the one you want, like this:
|
the one you want, like this:
|
||||||
|
|
||||||
|ylook 2-small|n
|
|ylook small-2|n
|
||||||
|
|
||||||
As long as what you write is uniquely identifying you can be lazy and not
|
As long as what you write is uniquely identifying you can be lazy and not
|
||||||
write the full name of the thing you want to look at. Try '|ylook bo|n',
|
write the full name of the thing you want to look at. Try '|ylook bo|n',
|
||||||
'|yl co|n' or '|yl 1-sm|n'!
|
'|yl co|n' or '|yl sm-1|n'!
|
||||||
|
|
||||||
... Oh, and if you see database-ids like (#1245) by the name of objects,
|
... Oh, and if you see database-ids like (#1245) by the name of objects,
|
||||||
it's because you are playing with Builder-privileges or higher. Regular
|
it's because you are playing with Builder-privileges or higher. Regular
|
||||||
|
|
@ -357,7 +358,7 @@ graphical game is like comparing a book to a movie - it's just a different
|
||||||
experience altogether.
|
experience altogether.
|
||||||
|
|
||||||
MUDs are |wdifferent|n from Interactive Fiction (IF) in that they are multiplayer
|
MUDs are |wdifferent|n from Interactive Fiction (IF) in that they are multiplayer
|
||||||
and usually has a consistent game world with many stories and protagonists
|
and usually have a consistent game world with many stories and protagonists
|
||||||
acting at the same time.
|
acting at the same time.
|
||||||
|
|
||||||
Like there are many different styles of graphical MMOs, there are |wmany
|
Like there are many different styles of graphical MMOs, there are |wmany
|
||||||
|
|
@ -499,8 +500,8 @@ Use |yhelp <topic>|n to get specific help. Try |yhelp help|n to get help on usin
|
||||||
the help command. For your game you could add help about your game, lore, rules etc
|
the help command. For your game you could add help about your game, lore, rules etc
|
||||||
as well.
|
as well.
|
||||||
|
|
||||||
At the moment you only have |whelp|n and some |wChannel Names|n (the '<menu commands>'
|
At the moment you probably only have |whelp|n and a |wchannel|n command
|
||||||
is just a placeholder to indicate you are using this menu).
|
(the '<menu commands>' is just a placeholder to indicate you are using this menu).
|
||||||
|
|
||||||
We'll add more commands as we get to them in this tutorial - but we'll only
|
We'll add more commands as we get to them in this tutorial - but we'll only
|
||||||
cover a small handful. Once you exit you'll find a lot more! Now let's try
|
cover a small handful. Once you exit you'll find a lot more! Now let's try
|
||||||
|
|
@ -529,9 +530,7 @@ This will send a message to the |wpublic|n channel where everyone on that
|
||||||
channel can see it. If someone else is on your server, you may get a reply!
|
channel can see it. If someone else is on your server, you may get a reply!
|
||||||
|
|
||||||
Evennia can link its in-game channels to external chat networks. This allows
|
Evennia can link its in-game channels to external chat networks. This allows
|
||||||
you to talk with people not actually logged into the game. For
|
you to talk with people not actually logged into the game.
|
||||||
example, the online Evennia-demo links its |wpublic|n channel to the #evennia
|
|
||||||
IRC support channel.
|
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
|
|
@ -578,19 +577,13 @@ include other people/objects in the emote, reference things by a short-descripti
|
||||||
|g** Paging people **|n
|
|g** Paging people **|n
|
||||||
|
|
||||||
Halfway between talking on a |wChannel|n and chatting in your current location
|
Halfway between talking on a |wChannel|n and chatting in your current location
|
||||||
with |wsay|n and |wpose|n, you can also |wpage|n people. This is like a private
|
with |wsay|n and |wpose|n, you can also send private messages with |wpage|n:
|
||||||
message only they can see.
|
|
||||||
|
|
||||||
|ypage <name> = Hello there!
|
|ypage <name> Hello there!|n
|
||||||
page <name1>, <name2> = Hello both of you!|n
|
|
||||||
|
|
||||||
If you are alone on the server, put your own name as |w<name>|n to test it and
|
Put your own name as |y<name>|n to page yourself as a test. Write just |ypage|n
|
||||||
page yourself. Write just |ypage|n to see your latest pages. This will also show
|
to see your latest pages. This will also show you if anyone paged you while you
|
||||||
you if anyone paged you while you were offline.
|
were offline.
|
||||||
|
|
||||||
(By the way - depending on which games you are used to, you may think that the
|
|
||||||
use of |y=|n above is strange. This is a MUSH/MUX-style of syntax. For your own
|
|
||||||
game you can change the |wpose|n command to work however you prefer).
|
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
|
|
@ -675,8 +668,8 @@ That concludes this little quick-intro to using the base game commands of
|
||||||
Evennia. With this you should be able to continue exploring and also find help
|
Evennia. With this you should be able to continue exploring and also find help
|
||||||
if you get stuck!
|
if you get stuck!
|
||||||
|
|
||||||
Write |ynext|n to end this wizard and continue to the tutorial-world quest!
|
Write |ynext|n to end this wizard. If you want there is also some |wextra|n info
|
||||||
If you want there is also some |wextra|n info for where to go beyond that.
|
for where to go beyond that.
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
|
|
@ -704,12 +697,12 @@ Evennia you are wise to take a look at the |wEvennia documentation|n at
|
||||||
- The tutorial-world may or may not be your cup of tea, but it does show off
|
- The tutorial-world may or may not be your cup of tea, but it does show off
|
||||||
several |wuseful tools|n of Evennia. You may want to check out how it works:
|
several |wuseful tools|n of Evennia. You may want to check out how it works:
|
||||||
|
|
||||||
|yhttps://www.evennia.com/docs/latest/Tutorial-World-Introduction|n
|
|yhttps://www.evennia.com/docs/latest/Howto/Starting/Part1/Tutorial-World|n
|
||||||
|
|
||||||
- You can then continue looking through the |wTutorials|n and pick one that
|
- You can then continue looking through the |wTutorials|n and pick one that
|
||||||
fits your level of understanding.
|
fits your level of understanding.
|
||||||
|
|
||||||
|yhttps://www.evennia.com/docs/latest/Tutorials|n
|
|yhttps://www.evennia.com/docs/latest/Howto/Howto-Overview|n
|
||||||
|
|
||||||
- Make sure to |wjoin our forum|n and connect to our |wsupport chat|n! The
|
- Make sure to |wjoin our forum|n and connect to our |wsupport chat|n! The
|
||||||
Evennia community is very active and friendly and no question is too simple.
|
Evennia community is very active and friendly and no question is too simple.
|
||||||
|
|
@ -751,6 +744,9 @@ class TutorialEvMenu(EvMenu):
|
||||||
self.caller.cmdset.remove(DemoCommandSetComms)
|
self.caller.cmdset.remove(DemoCommandSetComms)
|
||||||
_maintain_demo_room(self.caller, delete=True)
|
_maintain_demo_room(self.caller, delete=True)
|
||||||
super().close_menu()
|
super().close_menu()
|
||||||
|
if self.caller.account:
|
||||||
|
self.caller.msg("Restoring permissions ...")
|
||||||
|
self.caller.account.execute_cmd("unquell")
|
||||||
|
|
||||||
def options_formatter(self, optionslist):
|
def options_formatter(self, optionslist):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ in a separate module (e.g. if they could have been re-used elsewhere.)
|
||||||
|
|
||||||
import random
|
import random
|
||||||
from evennia import TICKER_HANDLER
|
from evennia import TICKER_HANDLER
|
||||||
from evennia import CmdSet, Command, DefaultRoom
|
from evennia import CmdSet, Command, DefaultRoom, DefaultExit
|
||||||
from evennia import utils, create_object, search_object
|
from evennia import utils, create_object, search_object
|
||||||
from evennia import syscmdkeys, default_cmds
|
from evennia import syscmdkeys, default_cmds
|
||||||
from .objects import LightSource
|
from .objects import LightSource
|
||||||
|
|
@ -304,6 +304,18 @@ class TutorialRoom(DefaultRoom):
|
||||||
self.db.details = {detailkey.lower(): description}
|
self.db.details = {detailkey.lower(): description}
|
||||||
|
|
||||||
|
|
||||||
|
class TutorialStartExit(DefaultExit):
|
||||||
|
"""
|
||||||
|
This is like a normal exit except it makes the `intro` command available
|
||||||
|
on itself. We put it on the exit in order to provide this command to the
|
||||||
|
Limbo room without modifying Limbo itself - deleting the tutorial exit
|
||||||
|
will also clean up the intro command.
|
||||||
|
|
||||||
|
"""
|
||||||
|
def at_object_creation(self):
|
||||||
|
self.cmdset.add(CmdSetEvenniaIntro, persistent=True)
|
||||||
|
|
||||||
|
|
||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Weather room - room with a ticker
|
# Weather room - room with a ticker
|
||||||
|
|
@ -399,8 +411,8 @@ class CmdEvenniaIntro(Command):
|
||||||
from .intro_menu import init_menu
|
from .intro_menu import init_menu
|
||||||
# quell also superusers
|
# quell also superusers
|
||||||
if self.caller.account:
|
if self.caller.account:
|
||||||
|
self.caller.msg("Auto-quelling permissions while in intro ...")
|
||||||
self.caller.account.execute_cmd("quell")
|
self.caller.account.execute_cmd("quell")
|
||||||
self.caller.msg("(Auto-quelling)")
|
|
||||||
init_menu(self.caller)
|
init_menu(self.caller)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -429,7 +441,6 @@ class IntroRoom(TutorialRoom):
|
||||||
"This assigns the health Attribute to "
|
"This assigns the health Attribute to "
|
||||||
"the account."
|
"the account."
|
||||||
)
|
)
|
||||||
self.cmdset.add(CmdSetEvenniaIntro, persistent=True)
|
|
||||||
|
|
||||||
def at_object_receive(self, character, source_location):
|
def at_object_receive(self, character, source_location):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,10 @@ ERROR_NO_SUPERUSER = """
|
||||||
LIMBO_DESC = _("""
|
LIMBO_DESC = _("""
|
||||||
Welcome to your new |wEvennia|n-based game! Visit https://www.evennia.com if you need
|
Welcome to your new |wEvennia|n-based game! Visit https://www.evennia.com if you need
|
||||||
help, want to contribute, report issues or just join the community.
|
help, want to contribute, report issues or just join the community.
|
||||||
As Account #1 you can create a demo/tutorial area with '|wbatchcommand tutorial_world.build|n'.
|
|
||||||
|
As a privileged user, write |wbatchcommand tutorial_world.build|n to build
|
||||||
|
tutorial content. Once built, try |wintro|n for starting help and |wtutorial|n to
|
||||||
|
play the demo game.
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -485,8 +485,9 @@ COMMAND_DEFAULT_CLASS = "evennia.commands.default.muxcommand.MuxCommand"
|
||||||
# Command.arg_regex is a regular expression desribing how the arguments
|
# Command.arg_regex is a regular expression desribing how the arguments
|
||||||
# to the command must be structured for the command to match a given user
|
# to the command must be structured for the command to match a given user
|
||||||
# input. By default the command-name should end with a space or / (since the
|
# input. By default the command-name should end with a space or / (since the
|
||||||
# default commands uses MuxCommand and /switches).
|
# default commands uses MuxCommand and /switches). Note that the extra \n
|
||||||
COMMAND_DEFAULT_ARG_REGEX = r'^[ /]+.*$|$'
|
# is necessary for use with batchprocessor.
|
||||||
|
COMMAND_DEFAULT_ARG_REGEX = r'^[ /]|\n|$'
|
||||||
# By default, Command.msg will only send data to the Session calling
|
# By default, Command.msg will only send data to the Session calling
|
||||||
# the Command in the first place. If set, Command.msg will instead return
|
# the Command in the first place. If set, Command.msg will instead return
|
||||||
# data to all Sessions connected to the Account/Character associated with
|
# data to all Sessions connected to the Account/Character associated with
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue