mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 23:17:17 +02:00
Working on cleaning some strange behavior when trying to submitting faulty typeclasses to script system. Also fixing bugs here and there.
This commit is contained in:
parent
dae375d1c4
commit
6cb2b8b745
12 changed files with 301 additions and 141 deletions
|
|
@ -23,15 +23,17 @@ class BodyFunctions(Script):
|
|||
self.key = "bodyfunction"
|
||||
self.desc = "Adds various timed events to a character."
|
||||
self.interval = 20 # seconds
|
||||
#self.repeats = 5 # repeat only a certain number of times
|
||||
self.start_delay = True # wait self.interval until first call
|
||||
self.persistent = False
|
||||
self.persistent = False
|
||||
|
||||
def at_repeat(self):
|
||||
"""
|
||||
This gets called every self.interval seconds. We make
|
||||
a random check here so as to only return 30% of the time.
|
||||
a random check here so as to only return 33% of the time.
|
||||
"""
|
||||
if random.random() > 0.66:
|
||||
#)
|
||||
if random.random() < 0.33:
|
||||
# no message this time
|
||||
return
|
||||
rand = random.random()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue