Resolved Inventory interaction no longer opens inventory

Discussion in 'Client & Site Support' started by SlashnHax, Oct 10, 2015.

  1. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,838
    Likes Received:
    788
    Before, if you tried to interact with an item in your inventory and it wasn't open, it would open the backpack, but recently this doesn't seem to happen.

    Is this intended or did something change?
     
  2. Cloud

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,322
    Likes Received:
    745
    Something likely broke.
     
  3. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,838
    Likes Received:
    788
  4. Cloud

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,322
    Likes Received:
    745
    Is it just the inventory or does this also happen for equiped items and such?
     
  5. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,838
    Likes Received:
    788
    I've only tested it with the inventory, I'll try equipped items in a sec.
     
  6. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,211
    Likes Received:
    647
    Did you end up fixing the inventory opening that i told you about a while back? It wouldn't hover the ribbon to get to the inventory component, but if you hover it yourself it opens the inventory fine
     
  7. Cloud

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,322
    Likes Received:
    745
    No, it's likely the same issue.
    --- Double Post Merged, Oct 19, 2015, Original Post Date: Oct 14, 2015 ---
    Bump guys? @SlashnHax
     
  8. Draggin

    Joined:
    Aug 10, 2015
    Messages:
    144
    Likes Received:
    25
    @Cloud Please find this and fix this as it is the only bug in Alpha Fighter.
    THE ONLY BUG.

    Trying to alch something with the equipment tab open for 9 hours is not good.
     
  9. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,838
    Likes Received:
    788
    My bad, yeah, it's the same issue for equipped items (tested with Ring of Duelling).

    I tried hovering over the ribbon, like @Aidden said, and then it seemed to be able to open the equipment tab by itself.
    I've added explicit inventory opening for next update due to this bug xD
     
  10. Draggin

    Joined:
    Aug 10, 2015
    Messages:
    144
    Likes Received:
    25
    You the man
     
  11. Baddest Man on Earth

    Joined:
    Nov 26, 2014
    Messages:
    610
    Likes Received:
    242
    For anyone who want.

    Code (Text):
    1. /**
    2. * Interacts with a SpriteItem. Only works if item is in inventory or
    3. * equipped.
    4. *
    5. * @param item   The item to interact with
    6. * @param action The action to interact
    7. * @return Returns true if interaction was successful
    8. */
    9. public static boolean item(SpriteItem item, String action) {
    10.     if (item != null && item.isValid()) {
    11.         Openable tab;
    12.         SpriteItem.Origin origin = item.getOrigin();
    13.         if (origin.equals(SpriteItem.Origin.INVENTORY)) {
    14.             tab = InterfaceWindows.getInventory();
    15.         } else if (origin.equals(SpriteItem.Origin.EQUIPMENT)) {
    16.             tab = InterfaceWindows.getEquipment();
    17.         } else {
    18.             return false;
    19.         }
    20.         if (tab.isOpen()) {
    21.             return item.interact(action);
    22.         } else {
    23.             if (tab.open()) {
    24.                 final Openable t = tab;
    25.                 Execution.delayUntil(t::isOpen, Random.nextInt(1500, 3000));
    26.             }
    27.         }
    28.     }
    29.     return false;
    30. }
     
  12. Cloud

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,322
    Likes Received:
    745
    Under what conditions is the ribbon visible? Can someone loan me an account that has that?
     
  13. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,211
    Likes Received:
    647
    The ribbons always visible afaik. But it doesn't know to hover the icon on the ribbon that then gives you access to the inventory button
     
  14. Cloud

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,322
    Likes Received:
    745
    I borrowed an account and it wasn't there, hence why I was asking.
     
  15. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,211
    Likes Received:
    647
    DM me on slack and i'll show you
     
  16. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,838
    Likes Received:
    788
    That name though, wouldn't interact have been a better choice? xD
     
    Aidden likes this.
  17. Baddest Man on Earth

    Joined:
    Nov 26, 2014
    Messages:
    610
    Likes Received:
    242
    The class name is Interact...
     
  18. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,838
    Likes Received:
    788
    Strange, normally you'd name the class a noun, not a verb... Like Interaction or something :p Just nitpicking, but I thought conventions was one of your pet peeves too?
     
  19. Baddest Man on Earth

    Joined:
    Nov 26, 2014
    Messages:
    610
    Likes Received:
    242
    Are we really going to talk about this?
     
  20. Aidden

    Aidden The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,211
    Likes Received:
    647
    I'm assuming he's done this because then he can have different interact methods for different types of object in one class, rather than creating an Item class, and Npc class etc with separate interact methods (hence the method being called item). It's a bit backwards, but saves making multiple classes just to have one method in them.
     

Share This Page

Loading...