Feature - Implemented 8745: Change wait() to (not) print countdown messages to the CLI

Recent change 8745 stops wait() from printing messages to the CLI, but this "breaks" some scripts which rely on wait() to provide visual feedback; it now looks like the script simply hangs.

Would it be possible to revert the change, but provide another means to silently delay in scripts, either an overloaded function (e.g. wait(delay, display = true) or a new function e.g. sleep/waitq(delay) ).
 

bumcheekcity

Active member
I am in favour of wait(int delay, boolean display=true). Would keep backwards compatibility and minimize the number of functions we have.
 
Even though I never want the wait countdown and wait(delay, false) would be more typing for me, I'm gonna have to agree here because I would hate it if a change to the system modified a script's behavior. Fix this before I get used to it and suffer the pain of falsifying all my waits.

Also, waitq would work as well. Minimizing the number of functions should be of no concern.
 

Bale

Minion
Please! The current behavior of wait() is not advantageous in the majority of situations. Please revert it to its original behavior and add this function for people who actually do want a version of wait() that lacks feedback.
 

Theraze

Active member
Enough talking about how this would be good. :p
> wait 5

Countdown: 5 seconds...
Countdown: 4 seconds...
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.

> wait 5 quiet

> ash wait(5,true)

Countdown: 5 seconds...
Countdown: 4 seconds...
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Returned: void

> ash wait(5,silent)

Unknown variable 'silent' ()
Returned: void

> ash wait(5,"silent")

Returned: void

> ash wait(5,false)

Returned: void

Overloaded wait will accept quiet, silent, or false as a disabling of the display. Using contains, so it should work regardless of how it's done exactly (wait 5 silently will work just fine as well).
 

Attachments

  • WaitCommand.patch
    2.6 KB · Views: 25

Theraze

Active member
Okay, so now we have this...
> waitq 1

> wait 1

Countdown: 1 second...
Waiting completed.

> ash waitq(1)

Returned: void

> ash wait(1)

Countdown: 1 second...
Waiting completed.
Returned: void

Hits another file... also needs to register a new command, since it's not just a new function.
 

Attachments

  • WaitCommand.patch
    2.7 KB · Views: 27

Fluxxdog

Active member
The waitq does seem tidier. A bit easier to change scripts too, all you need to do is add one letter.
 

Theraze

Active member
Works far as I know. Wait/pause should have original functionality, waitq (at Veracity requested/named (well, not originally, but judged that it should be so)) should be a silent wait.
 

Theraze

Active member
Any chance someone with commit can look at the patch in #7? Should provide for Veracity's requested waitq command with quiet waiting, while the wait command regains its original functionality.
 
Top