Update CHANGELOG
This commit is contained in:
parent
bd7c635d93
commit
edc91787c0
3 changed files with 27 additions and 6 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
|
@ -1,5 +1,17 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Main branch
|
||||||
|
|
||||||
|
- [Fix][pull3267]: Missing recache step in ObjectSessionHandler (InspectorCaracal)
|
||||||
|
- [Fix][pull3270]: Evennia is its own MSSP family now, so we should return that
|
||||||
|
instead of 'Custom' (InspectorCaracal)
|
||||||
|
- [Fix][pull3274]: Traceback when creating objects with initial nattributes
|
||||||
|
(InspectorCaracal)
|
||||||
|
|
||||||
|
[pull3267]: https://github.com/evennia/evennia/pull/3267
|
||||||
|
[pull3270]: https://github.com/evennia/evennia/pull/3270
|
||||||
|
[pull3274]: https://github.com/evennia/evennia/pull/3274
|
||||||
|
|
||||||
## Evennia 2.3.0
|
## Evennia 2.3.0
|
||||||
|
|
||||||
Sept 3, 2023
|
Sept 3, 2023
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,11 @@ class AIHandler:
|
||||||
def __init__(self, obj):
|
def __init__(self, obj):
|
||||||
self.obj = obj
|
self.obj = obj
|
||||||
|
|
||||||
|
if hasattr(self, "AI_STATES"):
|
||||||
|
# load AI dict from typeclass core if it exists - allows for setting it
|
||||||
|
# on the typeclass directly.
|
||||||
|
self.add_aidict(self.AI_STATES)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"AIHandler for {self.obj}. Current state: {self.state}"
|
return f"AIHandler for {self.obj}. Current state: {self.state}"
|
||||||
|
|
||||||
|
|
@ -156,7 +161,8 @@ class AIHandler:
|
||||||
object: Randomly chosen element from choices.
|
object: Randomly chosen element from choices.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return random.choices(choices, odds)[0]
|
if choices:
|
||||||
|
return random.choices(choices, odds)[0]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _weighted_choice_dict(choices):
|
def _weighted_choice_dict(choices):
|
||||||
|
|
@ -352,4 +358,7 @@ class AIHandler:
|
||||||
return
|
return
|
||||||
|
|
||||||
# perform the action
|
# perform the action
|
||||||
getattr(self.obj, f"ai_{self.state}")(next_action)
|
try:
|
||||||
|
getattr(self.obj, f"ai_{self.state}")(next_action)
|
||||||
|
except AttributeError:
|
||||||
|
logger.log_err(f"AIHandler: {self.obj} has no ai_{self.state} method.")
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ from os.path import join as osjoin
|
||||||
from string import punctuation
|
from string import punctuation
|
||||||
from unicodedata import east_asian_width
|
from unicodedata import east_asian_width
|
||||||
|
|
||||||
|
import evennia
|
||||||
from django.apps import apps
|
from django.apps import apps
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.exceptions import ValidationError as DjangoValidationError
|
from django.core.exceptions import ValidationError as DjangoValidationError
|
||||||
|
|
@ -34,8 +35,6 @@ from django.core.validators import validate_email as django_validate_email
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.html import strip_tags
|
from django.utils.html import strip_tags
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
import evennia
|
|
||||||
from evennia.utils import logger
|
from evennia.utils import logger
|
||||||
from simpleeval import simple_eval
|
from simpleeval import simple_eval
|
||||||
from twisted.internet import reactor, threads
|
from twisted.internet import reactor, threads
|
||||||
|
|
@ -1064,7 +1063,9 @@ def server_services():
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if hasattr(evennia.SESSION_HANDLER, "server") and hasattr(evennia.SESSION_HANDLER.server, "services"):
|
if hasattr(evennia.SESSION_HANDLER, "server") and hasattr(
|
||||||
|
evennia.SESSION_HANDLER.server, "services"
|
||||||
|
):
|
||||||
server = evennia.SESSION_HANDLER.server.services.namedServices
|
server = evennia.SESSION_HANDLER.server.services.namedServices
|
||||||
else:
|
else:
|
||||||
# This function must be called from inside the evennia process.
|
# This function must be called from inside the evennia process.
|
||||||
|
|
@ -1976,7 +1977,6 @@ def format_grid(elements, width=78, sep=" ", verbatim_elements=None, line_prefi
|
||||||
ic = 0
|
ic = 0
|
||||||
row = ""
|
row = ""
|
||||||
for ie, element in enumerate(elements):
|
for ie, element in enumerate(elements):
|
||||||
|
|
||||||
wl = wls[ie]
|
wl = wls[ie]
|
||||||
lrow = display_len((row))
|
lrow = display_len((row))
|
||||||
# debug = row.replace(" ", ".")
|
# debug = row.replace(" ", ".")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue