Fix 'alias' bug ... for sure this time

This commit is contained in:
Howard Abrams 2025-08-16 00:06:23 -07:00
parent f293b506b9
commit c2a286d6f7
2 changed files with 27 additions and 6 deletions

View file

@ -12,7 +12,9 @@ with a location in the game world (like Characters, Rooms, Exits).
from re import split, match, sub, IGNORECASE
from django.conf import settings
from evennia.contrib.rpg.rpsystem.rpsystem import ContribRPObject, parse_sdescs_and_recogs
from evennia.objects.models import ObjectDB
from evennia.prototypes.spawner import spawn
from evennia.utils import delay, logger
from evennia.utils.search import search_object
@ -83,7 +85,25 @@ class ObjectParent:
(char.is_typeclass("typeclasses.characters.Character")
or (char.is_typeclass("typeclasses.puppets.Puppet") and puppets))]
# Removing the ContribRPObject
def get_search_result(self, searchdata, attribute_name=None,
typeclass=None, candidates=None, exact=False,
use_dbref=None, tags=None, **kwargs):
"""
Redefine function to address bug in `ContribRPObject`
where non-builder characters need to call the system's
search when looking for aliases.
"""
return ObjectDB.objects.search_object(
searchdata,
attribute_name=attribute_name,
typeclass=typeclass,
candidates=candidates,
exact=exact,
use_dbref=use_dbref,
tags=tags,
)
class Object(ObjectParent, ContribRPObject):
"""
This is the root Object typeclass, representing all entities that

View file

@ -1,4 +1,6 @@
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Goudy+Bookletter+1911&family=Merienda:wght@300..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700');
/* @import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap'); */
/* @import url('https://fonts.googleapis.com/css2?family=Merienda:wght@300..900&display=swap')
#messagewindow {
background-color: #E3ECDE;
@ -26,7 +28,7 @@ input[type=textarea]:focus {
}
.inputfield {
font-family: "Goudy Bookletter 1911", serif;
font-family: "Cormorant Garamond", serif;
font-weight: 400;
font-style: normal;
font-size: 24px;
@ -93,9 +95,8 @@ textarea.inputfield:focus {
}
.color-003 {
font-weight: bold;
color: #ffd700;
text-shadow: 2px 2px;
font-weight: 700;
color: #d2a000;
}
.color-015 {
font-weight: bold;