comparison Modules/Queue.lua @ 149:4e5d8033ed5f

Fixed queueing single groups rather than using ?queue all?.
author Zerotorescue
date Thu, 20 Jan 2011 06:53:59 +0100
parents ebe6f90c4bb9
children da28be6ccd31
comparison
equal deleted inserted replaced
148:07949e344a5c 149:4e5d8033ed5f
435 end 435 end
436 436
437 mod:BuildQueue(); 437 mod:BuildQueue();
438 end 438 end
439 439
440 function mod:QueueGroup(groupName, craftables) 440 function mod:QueueGroup(groupName, craftables, displayQueue)
441 -- Prepare a table with all possible tradeskill craftables 441 -- Prepare a table with all possible tradeskill craftables
442 if not craftables then 442 if not craftables then
443 craftables = self:GetTradeskillCraftables(); -- nil when no tradeskill window is open 443 craftables = self:GetTradeskillCraftables(); -- nil when no tradeskill window is open
444 end 444 end
445 445
511 end 511 end
512 else 512 else
513 self:Skip(itemId, skipReasons.NOT_CRAFTABLE); 513 self:Skip(itemId, skipReasons.NOT_CRAFTABLE);
514 end 514 end
515 end 515 end
516
517 if displayQueue then
518 mod:BuildQueue();
519 end
516 end 520 end
517 521
518 function mod:Queue(itemId, amount, bonus, craft, groupName) 522 function mod:Queue(itemId, amount, bonus, craft, groupName)
519 tinsert(queue, { 523 tinsert(queue, {
520 ["itemId"] = itemId, -- needed to display the queued item in the queue window 524 ["itemId"] = itemId, -- needed to display the queued item in the queue window
585 function mod:IM_QUEUE_ALL() 589 function mod:IM_QUEUE_ALL()
586 self:QueueAll(); 590 self:QueueAll();
587 end 591 end
588 592
589 function mod:IM_QUEUE_GROUP(event, groupName) 593 function mod:IM_QUEUE_GROUP(event, groupName)
590 self:QueueGroup(groupName); 594 self:QueueGroup(groupName, nil, true);
591 end 595 end
592 end 596 end
593 597
594 do -- Trade skill recipes region 598 do -- Trade skill recipes region
595 -- Reset all filters so no crafts are hidden 599 -- Reset all filters so no crafts are hidden