mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 13:37:17 +02:00
Use with_metaclass from future.utils for python3 compat.
This commit is contained in:
parent
79437c0e48
commit
8a66fc40a9
11 changed files with 21 additions and 26 deletions
|
|
@ -12,6 +12,7 @@ from evennia.typeclasses.models import TypeclassBase
|
|||
from evennia.scripts.models import ScriptDB
|
||||
from evennia.scripts.manager import ScriptManager
|
||||
from evennia.utils import logger
|
||||
from future.utils import with_metaclass
|
||||
|
||||
__all__ = ["DefaultScript", "DoNothing", "Store"]
|
||||
|
||||
|
|
@ -132,13 +133,12 @@ class ExtendedLoopingCall(LoopingCall):
|
|||
return interval - (total_runtime % self.interval)
|
||||
return None
|
||||
|
||||
class ScriptBase(ScriptDB):
|
||||
class ScriptBase(with_metaclass(TypeclassBase, ScriptDB)):
|
||||
"""
|
||||
Base class for scripts. Don't inherit from this, inherit from the
|
||||
class `DefaultScript` below instead.
|
||||
|
||||
"""
|
||||
__metaclass__ = TypeclassBase
|
||||
objects = ScriptManager()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue