Package logisticspipes.routing.order

Examples of logisticspipes.routing.order.LinkedLogisticsOrderList


    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);
   
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    LinkedLogisticsOrderList list = _table.watchedRequests.get(this.orderId).getValue2();
    if(!list.isEmpty()) {
      this.drawVerticalLine(left + 8, top + 0, top + 17, 0xff00ff00);
    }
    renderLinkedOrderListLines(list, left, top + 17);
    for(Float progress: list.getProgresses()) {
      int pos = (int)(29.0F * progress.floatValue());
      this.drawProgressPoint(left + 8, top + pos, 0xff00ff00);
    }
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glDisable(GL11.GL_BLEND);
   
    RenderHelper.enableGUIStandardItemLighting();
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);
    GL11.glColor4f(0.7F, 0.7F, 0.7F, 1.0F);
    this.mc.getTextureManager().bindTexture(achievementTextures);
    String s = Integer.toString(orderId);
    if(!list.isEmpty()) {
      this.drawTexturedModalRect(left - 5, top - 40 + 17, 0, 202, 26, 26);
      mc.fontRenderer.drawStringWithShadow(s, left + 9 - mc.fontRenderer.getStringWidth(s) / 2, top - 30 + 17, 16777215);
    } else {
      this.drawTexturedModalRect(left - 5, top - 18 + 17, 0, 202, 26, 26);
      mc.fontRenderer.drawStringWithShadow(s, left + 9 - mc.fontRenderer.getStringWidth(s) / 2, top - 18 + 10 + 17, 16777215);
View Full Code Here


    }
   
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glDepthFunc(GL11.GL_LEQUAL);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    LinkedLogisticsOrderList list = _table.watchedRequests.get(this.orderId).getValue2();
    if(!list.isEmpty()) {
      this.drawVerticalLine(innerLeftSide - mapX + 110, innerTopSide - mapY - 197, innerTopSide - mapY - 180, 0xff00ff00);
    }
    renderLinkedOrderListLines(list, innerLeftSide - mapX + 102, innerTopSide - mapY - 180);
    for(Float progress: list.getProgresses()) {
      int pos = (int)(29.0F * progress.floatValue());
      this.drawProgressPoint(innerLeftSide - mapX + 110, innerTopSide - mapY - 197 + pos, 0xff00ff00);
    }
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glDisable(GL11.GL_BLEND);
   
    RenderHelper.enableGUIStandardItemLighting();
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);
    GL11.glColor4f(0.7F, 0.7F, 0.7F, 1.0F);
    this.mc.getTextureManager().bindTexture(achievementTextures);
    String s = Integer.toString(orderId);
    if(!list.isEmpty()) {
      this.drawTexturedModalRect(innerLeftSide - mapX + 97, innerTopSide - mapY - 220, 0, 202, 26, 26);
      mc.fontRenderer.drawStringWithShadow(s, innerLeftSide - mapX + 111 - mc.fontRenderer.getStringWidth(s) / 2, innerTopSide - mapY - 210, 16777215);
    } else {
      this.drawTexturedModalRect(innerLeftSide - mapX + 97, innerTopSide - mapY - 162, 0, 202, 26, 26);
      mc.fontRenderer.drawStringWithShadow(s, innerLeftSide - mapX + 111 - mc.fontRenderer.getStringWidth(s) / 2, innerTopSide - mapY - 152, 16777215);
View Full Code Here

  public <T extends Enum<T>> T readEnum(Class<T> clazz) throws IOException {
    return clazz.getEnumConstants()[this.readInt()];
  }

  public LinkedLogisticsOrderList readLinkedLogisticsOrderList() throws IOException {
    LinkedLogisticsOrderList list = new LinkedLogisticsOrderList();
    list.addAll(this.readList(new IReadListObject<IOrderInfoProvider>() {
      @Override
      public IOrderInfoProvider readObject(LPDataInputStream data) throws IOException {
        return data.readOrder();
      }}));
    list.getSubOrders().addAll(this.readList(new IReadListObject<LinkedLogisticsOrderList>() {
      @Override
      public LinkedLogisticsOrderList readObject(LPDataInputStream data) throws IOException {
        return data.readLinkedLogisticsOrderList();
      }}));
    return list;
View Full Code Here

  public void sendUsedMessage(RequestLog log) {
    Map<ItemIdentifier,Integer> used = new HashMap<ItemIdentifier,Integer>();
    Map<ItemIdentifier,Integer> missing = new HashMap<ItemIdentifier,Integer>();
    buildUsedMap(used, missing);
    log.handleSucessfullRequestOfList(used, new LinkedLogisticsOrderList());
    log.handleMissingItems(missing);
  }
View Full Code Here

      messages.put(item, count);
      RequestTree node = new RequestTree(stack, requester, tree, requestFlags, info);
      isDone = isDone && node.isDone();
    }
    if(isDone) {
      LinkedLogisticsOrderList list = tree.fullFillAll();
      if(log != null) {
        log.handleSucessfullRequestOfList(messages, list);
      }
      return true;
    } else {
View Full Code Here

  }
 
  public static int request(ItemIdentifierStack item, IRequestItems requester, RequestLog log, boolean acceptPartial, boolean simulateOnly, boolean logMissing, boolean logUsed, EnumSet<ActiveRequestType> requestFlags, IAdditionalTargetInformation info) {
    RequestTree tree = new RequestTree(item, requester, null, requestFlags, info);
    if(!simulateOnly &&(tree.isDone() || ((tree.getPromiseItemCount() > 0) && acceptPartial))) {
      LinkedLogisticsOrderList list = tree.fullFillAll();
      if(log != null) {
        log.handleSucessfullRequestOf(item.getItem(), item.getStackSize(), list);
      }
      return tree.getPromiseItemCount();
    } else {
View Full Code Here

      subNode.removeUsedExtras(item,extraMap);
    }
  }

  protected LinkedLogisticsOrderList fullFill() {
    LinkedLogisticsOrderList list = new LinkedLogisticsOrderList();
    for(RequestTreeNode subNode:subRequests) {
      list.getSubOrders().add(subNode.fullFill());
    }
    for(LogisticsPromise promise:promises) {
      LogisticsOrder result = promise.sender.fullFill(promise, target, info);
      if(result != null) {
        list.add(result);
      }
    }
    for(LogisticsPromise promise:extrapromises) {
      if(promise.sender instanceof ICraftItems) {
        ((ICraftItems)promise.sender).registerExtras(promise);
View Full Code Here

TOP

Related Classes of logisticspipes.routing.order.LinkedLogisticsOrderList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.