google-code-export / evennia

Automatically exported from code.google.com/p/evennia
Other
1 stars 0 forks source link

Feature suggestion: Script call to invoke a repeat #420

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A) Describe the suggested feature and how it is supposed to work and behave
to the end user (player or admin/coder).

Something like script_obj.repeat() which would call script_obj.at_repeat() but 
would also decrement the number of repeats.  Also, it should reset the timer 
until the next repeat fires.

B) List briefly your arguments for why you think this new feature should be
included in Evennia.

I'd like to have a command or routine that would cause a script to advance 
through its limited number of repeats a little faster, by manually invoking a 
repeat, and I'd rather do it cleanly rather than doing something like 
'script_obj.at_repeat(); script_obj.dbobj.db_repeats -= 1'

My particular use case is a 'slow output' script, where lines come by gradually 
instead of all at once.  I want to have it so if they hit 'enter' it advances 
to the next line immediately.

C) If you have any suggestions on the best way to implement this new
feature, write those ideas below.

Original issue reported on code.google.com by daniel@benoy.name on 14 Aug 2013 at 2:26

GoogleCodeExporter commented 9 years ago
Is this really necessary to add as a core function? You can always implement 
this in your own script class; you'd then have more freedom for choosing to 
force-stepping with or without counting down the repeats for example ...
.
Griatch

Original comment by griatch on 21 Aug 2013 at 1:43

GoogleCodeExporter commented 9 years ago
I think it's generally useful to be able to take any script that repeats, and 
have a 'fire now' capability, without having to side-step the way Evennia does 
its repeats system.

Or are you suggesting I put a repeat() method on my base script class or 
something and implement it the way I've suggested?  Because I would have no 
idea where to start.  I wouldn't know what to do to 'reset the clock' on a 
task, for example.  And, say, in the future, the stuff that happens when a 
repeat is called changes slightly inside of Evennia.  I'd like to not have to 
worry about keeping up to date.

To be fair, though, my immediate need for this is gone.  Having output come out 
slowly is actually a little annoying, so I changed it to a press enter prompt.  
So do what you'd like with this ticket, but I think it will come up again down 
the road for me and others.

Original comment by daniel@benoy.name on 21 Aug 2013 at 8:30

GoogleCodeExporter commented 9 years ago
It'd not be sure that one would want to reset the clock (if so one would stop 
the task and create a new one), hence making ones own method would be the most 
flexible. But ok, this might indeed be convenient to have easily available. 
Keeping this as a request to-do. :) 
.
Griatch

Original comment by griatch on 22 Aug 2013 at 2:16