Feature - Implemented Displaying multiple queued commands

Theraze

Active member
If you queue multiple commands in the CLI, it only shows the currently executing and last ones... any between those will not display, even though they execute properly. I've noticed this usually when executing my adventure, eatdrink, adventure, overdrink commands, but it's easily seen.
 

Theraze

Active member
I'm thinking it would be in swingui/CommandDisplayFrame between the 140-144 (currently executing) and 146-147 (new command). Possibly replacing the 140-144 section. Could make the first one display as Current, or tag a private bool to tell the code that it was done... or actually could just make it be Current 1, Current 2, Current 3... just not sure how to parse through multiple CommandDisplayFrame.handler.command entries at this point of my thought processes.
 

Theraze

Active member
Sorry to bump my own bit here.

Some sidenotes... apparently clear and cls (both do same) will clear your further command queue. Useful if you've queued something up wrong.
Abort will cancel all current scripts... same as escape, but if you really wanted to know what to type to do it, there you have it.

> eatdrink

> CURRENT: eatdrink
> QUEUED 1: eatdrink
> CURRENT: eatdrink
> QUEUED 1: eatdrink
> QUEUED 2: eatdrink

Okay... got it. Could have run it through a switch, but it seemed sort of useless since the only special cases I have are first (CURRENT) and last (command, not using the array yet). As that hints at, the newest is included in the for-loop as well, so that it has access to the count more easily. I could have left it outside and done a size() + 1 alternatively, but... *shrugs* It's early, my brain is still moving into gear, and I don't think it'd actually be significantly more efficient.

Edit: Just to clarify what happened... In the patch, I didn't have the array properly pulling off the current item, it just used the old version of the display, so it would display the first item as many times as you had old items, then display the newest. I'd have a fixed version up, but the computer I was remoted to and coding on is currently not responding... I'm guessing I knocked out the charging cable on my laptop. Patch will be up when laptop is.
 
Last edited:

slyz

Developer
I didn't quite understand the original problem: when I queue CLI commands, I see all of them being executed, one after the other. Does the problem happen with more than 2 or 3 commands in the queue?
 

Theraze

Active member
The issue is that when you add a new item to the queue, the present behaviour is that it only shows the currently executing script/command and the newest script/command. I'd like it to display the entire queue of commands waiting to happen, so I'm less likely to (if a script takes 5 minutes to execute) double or triple up. When you run it currently, do you ever see more than CURRENTLY: <command> and a single QUEUED: <command>?
 

Winterbay

Active member
When I get to actually being able to install patches this is one that is definitely going in. I've always been a bit annoyed at that behaviour :)
(especially if I manage to queue up commands while running farm.ash which can take 30-40 minutes to run).
 

Theraze

Active member
> CURRENT: pirate
> QUEUED 1: eatdrink
> QUEUED 2: pirate
> QUEUED 3: eatdrink

Got it. Just needed to call a get, and define it as a string. Also, moved the new entry out of the list... was easier than I'd thought, since it's actually the list size we want as the first entry in the queue is the currently running one. Anyways, here's the patch.

Sidenote: Pirate script doesn't check for exploring in the right zone... there went tomorrow's OD adventures. Oh well. :)
 

Attachments

  • DisplayCommandQueue.patch
    1.3 KB · Views: 29
Top