Replace inlinefunc parser with FuncParser mostly
This commit is contained in:
parent
8c3910a033
commit
773bb31f55
10 changed files with 294 additions and 322 deletions
|
|
@ -7,7 +7,7 @@ from django.db.models import Q, Min, Max
|
|||
from evennia.objects.models import ObjectDB
|
||||
from evennia.locks.lockhandler import LockException
|
||||
from evennia.commands.cmdhandler import get_and_merge_cmdsets
|
||||
from evennia.utils import create, utils, search, logger
|
||||
from evennia.utils import create, utils, search, logger, funcparser
|
||||
from evennia.utils.utils import (
|
||||
inherits_from,
|
||||
class_from_module,
|
||||
|
|
@ -22,10 +22,11 @@ from evennia.utils.eveditor import EvEditor
|
|||
from evennia.utils.evmore import EvMore
|
||||
from evennia.prototypes import spawner, prototypes as protlib, menus as olc_menus
|
||||
from evennia.utils.ansi import raw as ansi_raw
|
||||
from evennia.utils.inlinefuncs import raw as inlinefunc_raw
|
||||
|
||||
COMMAND_DEFAULT_CLASS = class_from_module(settings.COMMAND_DEFAULT_CLASS)
|
||||
|
||||
_FUNCPARSER = funcparser.FuncParser(settings.INLINEFUNC_MODULES)
|
||||
|
||||
# limit symbol import for API
|
||||
__all__ = (
|
||||
"ObjManipCommand",
|
||||
|
|
@ -2385,7 +2386,7 @@ class CmdExamine(ObjManipCommand):
|
|||
value = utils.to_str(value)
|
||||
if crop:
|
||||
value = utils.crop(value)
|
||||
value = inlinefunc_raw(ansi_raw(value))
|
||||
value = _FUNCPARSER.parse(ansi_raw(value), escape=True)
|
||||
if category:
|
||||
return f"{attr}[{category}] = {value}"
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue