Added tickerhandler to ev.py and improved Script docs.
This commit is contained in:
parent
6ea4125ef1
commit
5c902ef14f
2 changed files with 4 additions and 16 deletions
1
ev.py
1
ev.py
|
|
@ -153,6 +153,7 @@ from src.objects.objects import Object, Character, Room, Exit
|
||||||
|
|
||||||
from src.utils.search import *
|
from src.utils.search import *
|
||||||
from src.utils.create import *
|
from src.utils.create import *
|
||||||
|
from src.scripts.tickerhandler import TICKER_HANDLER as tickerhandler
|
||||||
from src.utils import logger
|
from src.utils import logger
|
||||||
from src.utils import utils
|
from src.utils import utils
|
||||||
from src.utils import gametime
|
from src.utils import gametime
|
||||||
|
|
|
||||||
|
|
@ -408,8 +408,11 @@ class Script(ScriptBase):
|
||||||
is persistent, the pause state will survive a shutdown.
|
is persistent, the pause state will survive a shutdown.
|
||||||
unpause() - restart a previously paused script. The script will
|
unpause() - restart a previously paused script. The script will
|
||||||
continue as if it was never paused.
|
continue as if it was never paused.
|
||||||
|
force_repeat() - force-step the script, regardless of how much remains
|
||||||
|
until next step. This counts like a normal firing in all ways.
|
||||||
time_until_next_repeat() - if a timed script (interval>0), returns
|
time_until_next_repeat() - if a timed script (interval>0), returns
|
||||||
time until next tick
|
time until next tick
|
||||||
|
remaining_repeats() - number of repeats remaining, if limited
|
||||||
|
|
||||||
* Hook methods
|
* Hook methods
|
||||||
|
|
||||||
|
|
@ -565,19 +568,3 @@ class ValidateChannelHandler(Script):
|
||||||
#print "ValidateChannelHandler run."
|
#print "ValidateChannelHandler run."
|
||||||
channelhandler.CHANNELHANDLER.update()
|
channelhandler.CHANNELHANDLER.update()
|
||||||
|
|
||||||
#class ClearAttributeCache(Script):
|
|
||||||
# "Clear the attribute cache."
|
|
||||||
# def at_script_creation(self):
|
|
||||||
# "Setup the script"
|
|
||||||
# self.key = "sys_cache_clear"
|
|
||||||
# self.desc = _("Clears the Attribute Cache")
|
|
||||||
# self.interval = 3600 * 2
|
|
||||||
# self.persistent = True
|
|
||||||
# def at_repeat(self):
|
|
||||||
# "called every 2 hours. Sets a max attr-cache limit to 100 MB." # enough for normal usage?
|
|
||||||
# if is_pypy:
|
|
||||||
# # pypy don't support get_size, so we have to skip out here.
|
|
||||||
# return
|
|
||||||
# attr_cache_size, _, _ = caches.get_cache_sizes()
|
|
||||||
# if attr_cache_size > _ATTRIBUTE_CACHE_MAXSIZE:
|
|
||||||
# caches.flush_attr_cache()
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue