Skip to content

Commit

Permalink
Merge pull request #1 from evennia/master
Browse files Browse the repository at this point in the history
Pull from evennia master
  • Loading branch information
kenneaal committed Nov 19, 2019
2 parents 924c273 + 41365fd commit f87fdf0
Show file tree
Hide file tree
Showing 344 changed files with 22,080 additions and 12,210 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] Enter a brief description here"
labels: bug
assignees: ''

---

#### Describe the bug
A clear and concise description of what the bug is.

#### To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
4. See error

#### Expected behavior
A clear and concise description of what you expected to happen.

#### Environment, Evennia version, OS etc
If unsure, run `evennia -v` or get the first few lines of the `about` command in-game.

#### Additional context
Any other context about the problem, or ideas on how to solve.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-issue.md
@@ -0,0 +1,14 @@
---
name: Documentation issue
about: Documentation problems and suggestions
title: '[Documentation] Enter a brief description here'
labels: documentation
assignees: ''

---

#### Documentation issue
Describe what the issue is and where it can/should be found.

#### Suggested change
The suggested change.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature Request] Enter a brief description here"
labels: feature-request
assignees: ''

---

#### Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

#### Describe the solution you'd like
A clear and concise description of what you want to happen.

#### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

#### Additional context
Add any other context or screenshots about the feature request here.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -34,6 +34,7 @@ install:
- pip install -e .

before_script:
- make format
- evennia --init testing_mygame
- cp .travis/${TESTING_DB}_settings.py testing_mygame/server/conf/settings.py
- cd testing_mygame
Expand Down
42 changes: 35 additions & 7 deletions CHANGELOG.md
Expand Up @@ -2,10 +2,38 @@

## Evennia 1.0 (2019-) (WIP)

### Already in master
- new `drop:holds()` lock default to limit dropping nonsensical things. Access check
defaults to True for backwards-compatibility in 0.9, will be False in 1.0

### Already in master

- `py` command now reroutes stdout to output results in-game client. `py`
without arguments starts a full interactive Python console.
without arguments starts a full interactive Python console.
- Webclient default to a single input pane instead of two. Now defaults to no help-popup.
- Webclient fix of prompt display
- Webclient multimedia support for relaying images, video and sounds via
`.msg(image=URL)`, `.msg(video=URL)`
and `.msg(audio=URL)`
- Add Spanish translation (fermuch)
- Expand `GLOBAL_SCRIPTS` container to always start scripts and to include all
global scripts regardless of how they were created.
- Change settings to always use lists instead of tuples, to make mutable
settings easier to add to. (#1912)
- Make new `CHANNEL_MUDINFO` setting for specifying the mudinfo channel
- Make `CHANNEL_CONNECTINFO` take full channel definition
- Make `DEFAULT_CHANNELS` list auto-create channels missing at reload
- Webclient `ANSI->HTML` parser updated. Webclient line width changed from 1.6em to 1.1em
to better make ANSI graphics look the same as for third-party clients
- `AttributeHandler.get(return_list=True)` will return `[]` if there are no
Attributes instead of `[None]`.
- Remove `pillow` requirement (install especially if using imagefield)
- Add Simplified Korean translation (user aceamro)
- Show warning on `start -l` if settings contains values unsafe for production.
- Make code auto-formatted with Black.
- Make default `set` command able to edit nested structures (PR by Aaron McMillan)
- Allow running Evennia test suite from core repo with `make test`.
- Return `store_key` from `TickerHandler.add` and add `store_key` as a kwarg to
the `TickerHandler.remove` method. This makes it easier to manage tickers.


## Evennia 0.9 (2018-2019)
Expand Down Expand Up @@ -44,12 +72,12 @@ without arguments starts a full interactive Python console.

- Change webclient from old txws version to use more supported/feature-rich Autobahn websocket library

#### Evennia game index
#### Evennia game index

- Made Evennia game index client a part of core - now configured from settings file (old configs
need to be moved)
- The `evennia connections` command starts a wizard that helps you connect your game to the game index.
- The game index now accepts games with no public telnet/webclient info (for early prototypes).
- The game index now accepts games with no public telnet/webclient info (for early prototypes).

#### New golden-layout based Webclient UI (@friarzen)
- Features
Expand Down Expand Up @@ -184,9 +212,9 @@ without arguments starts a full interactive Python console.

### Contribs

- Evscaperoom - a full puzzle engine for making multiplayer escape rooms in Evennia. Used to make
the entry for the MUD-Coder's Guild's 2019 Game Jam with the theme "One Room", where it ranked #1.
- Evennia game-index client no longer a contrib - moved into server core and configured with new
- Evscaperoom - a full puzzle engine for making multiplayer escape rooms in Evennia. Used to make
the entry for the MUD-Coder's Guild's 2019 Game Jam with the theme "One Room", where it ranked #1.
- Evennia game-index client no longer a contrib - moved into server core and configured with new
setting `GAME_INDEX_ENABLED`.
- The `extended_room` contrib saw some backwards-incompatible refactoring:
+ All commands now begin with `CmdExtendedRoom`. So before it was `CmdExtendedLook`, now
Expand Down
14 changes: 11 additions & 3 deletions Dockerfile
Expand Up @@ -13,15 +13,16 @@
# folder).
#
# You will end up in a shell where the `evennia` command is available. From here you
# can install and run the game normally. Use Ctrl-D to exit the evennia docker container.
# can initialize and/or run the game normally. Use Ctrl-D to exit the evennia docker container.
# For more info see: https://github.com/evennia/evennia/wiki/Getting-Started#quick-start
#
# You can also start evennia directly by passing arguments to the folder:
#
# docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 -v $PWD:/usr/src/game evennia/evennia evennia start -l
#
# This will start Evennia running as the core process of the container. Note that you *must* use -l
# or one of the foreground modes (like evennia ipstart) since otherwise the container will immediately
# die since no foreground process keeps it up.
# or one of the foreground modes (like evennia ipstart), since otherwise the container will immediately
# die because of having no foreground process.
#
# The evennia/evennia base image is found on DockerHub and can also be used
# as a base for creating your own custom containerized Evennia game. For more
Expand Down Expand Up @@ -65,6 +66,13 @@ WORKDIR /usr/src/game
# set bash prompt
ENV PS1 "evennia|docker \w $ "

# create and switch to a non-root user for runtime security
# -D - do not set a password
# -H - do not create a home directory
# -s /bin/false - set login shell to /bin/false
RUN adduser -D -H -s /bin/false evennia
USER evennia

# startup a shell when we start the container
ENTRYPOINT ["/usr/src/evennia/bin/unix/evennia-docker-start.sh"]

Expand Down
38 changes: 38 additions & 0 deletions Makefile
@@ -0,0 +1,38 @@
# This is used with `make <option>` and is used for running various
# administration operations on the code.

BLACK_FORMAT_CONFIGS = --target-version py37 --line-length 100
TEST_GAME_DIR = .test_game_dir
tests?=evennia

default:
@echo " Usage: "
@echo " make install - install evennia (recommended to activate virtualenv first)"
@echo " make fmt/format - run the black autoformatter on the source code"
@echo " make lint - run black in --check mode"
@echo " make test - run evennia test suite with all default values."
@echo " make tests=evennia.path test - run only specific test or tests."
@echo " make testp - run test suite using multiple cores."

install:
pip install -e .

format:
black $(BLACK_FORMAT_CONFIGS) evennia

fmt: format

lint:
black --check $(BLACK_FORMAT_CONFIGS) evennia

test:
evennia --init $(TEST_GAME_DIR);\
cd $(TEST_GAME_DIR);\
evennia migrate;\
evennia test --keepdb $(tests);\

testp:
evennia --init $(TEST_GAME_DIR);\
cd $(TEST_GAME_DIR);\
evennia migrate;\
evennia test --keepdb --parallel 4 $(tests);\
5 changes: 0 additions & 5 deletions bin/player-account-step1.patch
Expand Up @@ -4,7 +4,6 @@ index ec5fc29..62b7936 100644
+++ b/evennia/comms/migrations/0015_auto_20170706_2041.py
@@ -2,7 +2,12 @@
# Generated by Django 1.11.2 on 2017-07-06 20:41
from __future__ import unicode_literals

-from django.db import migrations
+from django.db import migrations, connection
Expand Down Expand Up @@ -60,7 +59,6 @@ index b27c75c..6e40252 100644
+++ b/evennia/objects/migrations/0007_objectdb_db_account.py
@@ -2,21 +2,31 @@
# Generated by Django 1.11.2 on 2017-07-05 17:27
from __future__ import unicode_literals

-from django.db import migrations, models
+from django.db import migrations, models, connection
Expand Down Expand Up @@ -104,7 +102,6 @@ index 80161a1..10fb225 100644
+++ b/evennia/objects/migrations/0009_remove_objectdb_db_player.py
@@ -2,7 +2,12 @@
# Generated by Django 1.11.2 on 2017-07-06 20:41
from __future__ import unicode_literals

-from django.db import migrations
+from django.db import migrations, connection
Expand Down Expand Up @@ -144,7 +141,6 @@ index 99baf70..23f6df9 100644
+++ b/evennia/scripts/migrations/0009_scriptdb_db_account.py
@@ -2,21 +2,31 @@
# Generated by Django 1.11.2 on 2017-07-05 17:27
from __future__ import unicode_literals

-from django.db import migrations, models
+from django.db import migrations, models, connection
Expand Down Expand Up @@ -188,7 +184,6 @@ index d3746a5..20fa63f 100644
+++ b/evennia/scripts/migrations/0011_remove_scriptdb_db_player.py
@@ -2,7 +2,12 @@
# Generated by Django 1.11.2 on 2017-07-06 20:41
from __future__ import unicode_literals

-from django.db import migrations
+from django.db import migrations, connection
Expand Down
52 changes: 38 additions & 14 deletions evennia/__init__.py
Expand Up @@ -136,14 +136,16 @@ def _create_version():
version = "Unknown"
root = os.path.dirname(os.path.abspath(__file__))
try:
with open(os.path.join(root, "VERSION.txt"), 'r') as f:
with open(os.path.join(root, "VERSION.txt"), "r") as f:
version = f.read().strip()
except IOError as err:
print(err)
try:
rev = check_output(
"git rev-parse --short HEAD",
shell=True, cwd=root, stderr=STDOUT).strip().decode()
rev = (
check_output("git rev-parse --short HEAD", shell=True, cwd=root, stderr=STDOUT)
.strip()
.decode()
)
version = "%s (rev %s)" % (version, rev)
except (IOError, CalledProcessError, OSError):
# ignore if we cannot get to git
Expand Down Expand Up @@ -259,9 +261,10 @@ class _EvContainer(object):

def _help(self):
"Returns list of contents"
names = [name for name in self.__class__.__dict__ if not name.startswith('_')]
names += [name for name in self.__dict__ if not name.startswith('_')]
names = [name for name in self.__class__.__dict__ if not name.startswith("_")]
names += [name for name in self.__dict__ if not name.startswith("_")]
print(self.__doc__ + "-" * 60 + "\n" + ", ".join(names))

help = property(_help)

class DBmanagers(_EvContainer):
Expand All @@ -281,6 +284,7 @@ class DBmanagers(_EvContainer):
attributes - Attributes.objects
"""

from .help.models import HelpEntry
from .accounts.models import AccountDB
from .scripts.models import ScriptDB
Expand All @@ -302,7 +306,7 @@ class DBmanagers(_EvContainer):
tags = Tag.objects
# remove these so they are not visible as properties
del HelpEntry, AccountDB, ScriptDB, Msg, ChannelDB
#del ExternalChannelConnection
# del ExternalChannelConnection
del ObjectDB, ServerConfig, Tag, Attribute

managers = DBmanagers()
Expand All @@ -325,15 +329,26 @@ class DefaultCmds(_EvContainer):

def __init__(self):
"populate the object with commands"

def add_cmds(module):
"helper method for populating this object with cmds"
from evennia.utils import utils

cmdlist = utils.variable_from_module(module, module.__all__)
self.__dict__.update(dict([(c.__name__, c) for c in cmdlist]))

from .commands.default import (admin, batchprocess,
building, comms, general,
account, help, system, unloggedin)
from .commands.default import (
admin,
batchprocess,
building,
comms,
general,
account,
help,
system,
unloggedin,
)

add_cmds(admin)
add_cmds(building)
add_cmds(batchprocess)
Expand Down Expand Up @@ -367,19 +382,23 @@ class SystemCmds(_EvContainer):
access the properties on the imported syscmdkeys object.
"""

from .commands import cmdhandler

CMD_NOINPUT = cmdhandler.CMD_NOINPUT
CMD_NOMATCH = cmdhandler.CMD_NOMATCH
CMD_MULTIMATCH = cmdhandler.CMD_MULTIMATCH
CMD_CHANNEL = cmdhandler.CMD_CHANNEL
CMD_LOGINSTART = cmdhandler.CMD_LOGINSTART
del cmdhandler

syscmdkeys = SystemCmds()
del SystemCmds
del _EvContainer

# typeclases
from .utils.utils import class_from_module

BASE_ACCOUNT_TYPECLASS = class_from_module(settings.BASE_ACCOUNT_TYPECLASS)
BASE_OBJECT_TYPECLASS = class_from_module(settings.BASE_OBJECT_TYPECLASS)
BASE_CHARACTER_TYPECLASS = class_from_module(settings.BASE_CHARACTER_TYPECLASS)
Expand All @@ -390,6 +409,9 @@ class SystemCmds(_EvContainer):
BASE_GUEST_TYPECLASS = class_from_module(settings.BASE_GUEST_TYPECLASS)
del class_from_module

# delayed starts
GLOBAL_SCRIPTS.start()


def set_trace(term_size=(140, 40), debugger="auto"):
"""
Expand Down Expand Up @@ -419,20 +441,22 @@ def set_trace(term_size=(140, 40), debugger="auto"):
"""
import sys

dbg = None

if debugger in ('auto', 'pudb'):
if debugger in ("auto", "pudb"):
try:
from pudb import debugger
dbg = debugger.Debugger(stdout=sys.__stdout__,
term_size=term_size)

dbg = debugger.Debugger(stdout=sys.__stdout__, term_size=term_size)
except ImportError:
if debugger == 'pudb':
if debugger == "pudb":
raise
pass

if not dbg:
import pdb

dbg = pdb.Pdb(stdout=sys.__stdout__)

try:
Expand Down

0 comments on commit f87fdf0

Please sign in to comment.