1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bug InterfaceMode

Discussion in 'Developer Support' started by instigator, Aug 26, 2015.

  1. instigator

    Joined:
    Aug 5, 2015
    Messages:
    12
    Likes Received:
    0
    Attempting to detect the interface mode for the purpose of hud-based actions...

    Code (Text):
    1.         if (InterfaceMode.LEGACY.equals(InterfaceMode.getCurrent())) {
    2.             System.out.println("Legacy InterfaceMode.");
    3.         } else if (InterfaceMode.MODERN.equals(InterfaceMode.getCurrent())) {
    4.             System.out.println("Modern InterfaceMode.");
    5.         } else {
    6.             System.out.println("Unknown InterfaceMode.");
    7.         }
    Outputs:
    even in legacy mode...

    This is a considerably large issue for me as I wish to produce something that is universal and I, myself, only use legacy when I can help it.

    However, in addition to this issue, I'm presented with an additional issue which I've noticed has an affect on other developers' bots as well...
    When using
    Code (Text):
    1.         if (!ActionWindow.BACKPACK.isOpen()) {
    2.             ActionWindow.BACKPACK.open();
    3.         }
    The inventory does not open...

    Its possible that I'm doing something wrong, sure, but I believe this to be a bug... If I'm doing something wrong, please tell me..

    Edit:
    The second bug is not entirely a bug. I've found what was causing the issue and the interface is now opening. However, the custom ribbon on the ActionWindow causes the ActionWindow.BACKPACK.open function to fail...

    Edit2:
    This temporarily fixes my issue with legacy mode:
    Code (Text):
    1.        if (!ActionWindow.BACKPACK.isOpen()) {
    2.             ActionWindow.BACKPACK.open();
    3.         }
    4.         if (!LegacyTab.BACKPACK.isOpen()) {
    5.             LegacyTab.BACKPACK.open();
    6.         }
    but I'd rather not use this indefinitely as I'm sure that I will, at some point, come into contact with other issues...
     
    #1 instigator, Aug 26, 2015
    Last edited: Aug 26, 2015
  2. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
  3. instigator

    Joined:
    Aug 5, 2015
    Messages:
    12
    Likes Received:
    0
    More info on the bug...
    I'm not sure that I fully understand the output being the way that it is, but...

    Started the client, Logged in and checked:
    Remaining logged in, switched to modern:
    Remaining logged in, switched to legacy:
    Logging out and back in, testing again:
    To check, I didn't even take the chance of using any if statements as I was concerned that I would screw up as I'm half asleep, I used:
    Code (Text):
    1. System.out.println("InterfaceMode: " + InterfaceMode.getCurrent());
     
  4. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    What do you mean by custom ribbon?
     
  5. instigator

    Joined:
    Aug 5, 2015
    Messages:
    12
    Likes Received:
    0
    [​IMG]
    ^ When you click the button that's currently in the bottom-right corner. Editor ribbon or something like that.

    Edit:
    While I have your attention here, I would like to make a suggestion...
    Something that's a nightmare for me, both as a user and as a dev, is the notification about the slim headers.. PLEASE set this up so that it has a "don't show again" option.. As a user and as a dev, this is highly irritating to see EVERY time a bot is started..
     
    #5 instigator, Aug 26, 2015
    Last edited: Aug 26, 2015
  6. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
    Approve, but I wouldn't advise ignoring that warning. It can result in some seriously undesirable behaviors. If they are game-breaking then I would NOT approve of this suggestion but that's for @Cloud to decide. If it is game-breaking then I would also encourage @Cloud to look into supporting it to make the issue moot.
     
  7. instigator

    Joined:
    Aug 5, 2015
    Messages:
    12
    Likes Received:
    0
    I run the game with small headers as I use legacy mode - its automatically enabled and cannot be disabled. In addition, it enables the hidden headers... Given this, I am still able to use the bots in legacy mode, EXCEPT that the Alpha collection has issues with its map usage (which there's points where it should be using ground walking anyway).... Outside of the Alpha series, I've seen no issues in using the small/hidden headers...
     
  8. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    That notification typically only appears on modern interface modes, but since the check is broken it was always showing. We're not going to suppress it because on modern interface mode it is essentially, well, essential to not use slim headers.

    The InterfaceMode check has been fixed for the next release. In addition I'm looking into your ribbon complaints.

    Edit: When using that minimized ribbon does it hover the button?
     
  9. instigator

    Joined:
    Aug 5, 2015
    Messages:
    12
    Likes Received:
    0
    No. The minimized ribbon is ignored.
    In addition, I'd like to note that slim/hidden headers seems to work fine for me on the modern interface type as well.
    --- Double Post Merged, Aug 30, 2015, Original Post Date: Aug 28, 2015 ---
    This Code:
    Code (Text):
    1.        SpriteItemQueryResults itms = Inventory.getItems(items); //This has been verified to be yielding results; the correct amount in addition
    2.         SpriteItem itm = itms.first();
    3.         itm.interact(itm.getDefinition().getInventoryActions().get(0));//This seems to be where the issue is...
    4.  
    Yields this result:
    (Exhibit A occurs at a random point, no time guarantee)
    [​IMG]
    (Exhibit B is an animated GIF)
    [​IMG]
     

Share This Page

Loading...